PI, CUDA und OpenSuSE

Status
Es sind keine weiteren Antworten möglich.

steins-ursel

Aktives Mitglied
Hallo!
Nach einem Rechnerumbau, habe ich mich nochmals mit obigen Thema intensiv auseinandergesetzt. Leider ist die Aktivierung nach PI HowTO alles andere als einfach, vor allem auf Ubuntu ausgelegt. Das Cuda SDK von Nvidia habe ich installiert, Tensorflow ist auch drauf inkl. cuDNN
Doch beim Stacken langweilt sich die GPU zu Tode, während die CPU das Letzte gibt.
Hab ich da einen Denkfehler, dass das Stacken nur per CPU geht?
 
"Certain processes in PixInsight, like StarNet2 and the RC-Astro XTerminator tools, benefit massively from running on the GPU. Typically they take minutes to finish when using the CPU, but with a CUDA capable GPU they'll be done in less than 30s."
 
Hallo,

Hast du geprüft ob Tensorflow die GPU erkennt?

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))
Wenn ja hängt es von der Software ob und wie sie auf der GPU rechnet.

Grüße
Stefanie
 
Hallo,

Hast du geprüft ob Tensorflow die GPU erkennt?

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))
Wenn ja hängt es von der Software ob und wie sie auf der GPU rechnet.

Grüße
Stefanie
Hallo Stefanie,

danke für die Tip's,
bin aber erstmal mit Fehlermeldungen unterwegs.

"pip install tensorflow" lief ohne Fehler zum Schluss durch, dann kam es dicke.

Bash:
thomas@linux:~> python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2023-08-17 11:13:18.455474: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2023-08-17 11:13:18.455484: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2023-08-17 11:13:18.991121: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 11:13:18.991263: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2023-08-17 11:13:18.991293: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublas.so.11'; dlerror: libcublas.so.11: cannot open shared object file: No such file or directory
2023-08-17 11:13:18.991319: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublasLt.so.11'; dlerror: libcublasLt.so.11: cannot open shared object file: No such file or directory
2023-08-17 11:13:18.991345: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory
2023-08-17 11:13:19.002620: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusparse.so.11'; dlerror: libcusparse.so.11: cannot open shared object file: No such file or directory
2023-08-17 11:13:19.002657: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory
2023-08-17 11:13:19.002663: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1835] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
[]

Muss ich ertsmal ausknobeln, warum die Bibliotheken nicht gefunden werden.
Habe mich zwar hier angemeldet, aber die Installation unter der SuSE ist alles andere als trivial.
 
Ich empfehle (falls nicht geschehen) genau dieser Anleitung Schritt für Schritt zu folgen:


Am besten in einer neuen Environment.

Viel Erfolg
Stefanie

Nachtrag, könnte auch daran liegen:

„TensorFlow only officially support Ubuntu. However, the following instructions may also work for other Linux distros.“

Vielleicht lieber Ubuntu nutzen?
 
Zuletzt bearbeitet:
Ich empfehle (falls nicht geschehen) genau dieser Anleitung Schritt für Schritt zu folgen:

Am besten in einer neuen Environment.

Viel Erfolg
Stefanie
Danke für die Hilfe, musste ein wenig manuell die Library's verlinken und von CUDA 12.0 auf 11.8 downgraden
Die Karte wird jetzt gefunden:
Bash:
thomas@linux:~> python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
2023-08-17 12:08:58.054381: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.065360: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.065464: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.065811: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-17 12:08:58.067027: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.067126: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.067226: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.115053: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.115150: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.115235: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:08:58.115305: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.
2023-08-17 12:08:58.115321: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 13469 MB memory:  -> device: 0, name: NVIDIA RTX A4000, pci bus id: 0000:01:00.0, compute capability: 8.6
tf.Tensor(-1340.5828, shape=(), dtype=float32)

und

Bash:
thomas@linux:~> python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2023-08-17 12:09:07.344395: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:09:07.354502: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-17 12:09:07.354632: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
 
Hallo Thomas,
das ganze würde mich auch interessieren. Mich hat aber diese umständliche Anleitung abgeschreckt, die wie Du schon angemerkt hast, für Ubuntu ist. ich hab auch Opensuse, derzeit 15.5. Ich hab noch ne alte 960er Karte mit 4GB Speicher. Lohnt sich das für mich?

Wenn Du mal Zeit und Lust hast, wäre es klasse, wenn Du die Unterschiede der Installation zwischen Ubuntu und Opensuse mal aufschreiben würdest :D Ich hab zwar ein wenig Ahnung von Linux, bin aber eher Anwender und kein Crack _affeaugen: Was Du hier alles rausgefunden hast hätte meine Kenntnisse definitiv zu sehr herausgefordert ;)
 
Hallo Sepp,

ich setzte mich mal Abend's hin, und schreibe das mal alles auf. Brauche ich auch für später, um die Sache wiederholen zu können ...
Habe gerade einen größeren Rechnerumbau getätigt, habe es dann auch HW-mäßig ein wenig krachen lasen (Von AM4 auf AM5, SuSE von 15.4 auf 15.5)
 
Super, vielen Dank! Mach Dir aber keinen Stress ;)

Ich habs letzte Woche ähnlich gemacht, allerdings hab ich mein AM4 letztmalig aufgerüstet (hatte da erst letztes Jahr auf 64G hochgerüstet _affeaugen: und da wars mir zu schade auf AM5 mit DDR5 zu wechseln, das kommt dann in 5 Jahren...) und auch endlich von 15.4 auf 15.5 upgedatet...
 
Hallo Sepp,

so sollte es funktionieren!

Vorwort: Es kommen jetzt so um die >6GB an Library's auf den Rechner, also Platz vorhalten

Zur Karte die passenden Treiber installieren und auf Funktionfähigkeit testen.

Bash:
sudo zypper addrepo https://developer.download.nvidia.com/compute/cuda/repos/opensuse15/x86_64/cuda-opensuse15.repo
sudo zypper refresh
sudo zypper install cuda-11-8 cuda-toolkit-11-8

unter NVIDIA für Version 11.x (cuDNN v8.9.4 (August 8th, 2023), for CUDA 11.x) den "Local Installer for Linux x86_64 (Tar)" downloaden

die Datei mit dem mc öffnen, alle Dateien unter
(Achtung root Rechte benötigt)
tar:cudnn-linux-x86_64-8.9.4.25_cuda12-archive/lib nach /usr/lib kopieren, im Verzeuichnis /usr/lib ein ldconfig ausführen
tar:cudnn-linux-x86_64-8.9.4.25_cuda12-archive/include nach /usr/include kopieren
(Man könnte auch symbolische Links setzen ;-) )

Bash:
python3 -m pip install nvidia-cudnn-cu11==8.6.0.163 tensorflow
(ggf. mehrfach hintereinander starten, bis keine Fehlermeldung mehr kommt)

Test auf Hardware
Bash:
python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

Ausgabe letzte Zeile z.B.
Bash:
2023-08-17 16:14:07.967525: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 13587 MB memory:  -> device: 0, name: NVIDIA RTX A4000, pci bus id: 0000:01:00.0, compute capability: 8.6 tf.Tensor(-720.282, shape=(), dtype=float32)

Test auf ein Device
Bash:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

Ausgabe letzte Zeile z.B.
Bash:
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

Test mit PI und StarNett steht noch aus, brauche ich Zeit
 
Zuletzt bearbeitet:
Hallo,

abgesehen von den …XTerminatoren bringt CUDA in PI gar nichts, bei denen aber sehr viel.

Gruss Jürgen
 
Super, da habe ich dann für meinen Urlaub etwas zu tun (falls Schlechtwetter sein sollte ;-) )
Hallo Sepp,

habe da noch was vergessen. Nach dieser Seite hier, muss noch vor Python pip ein
Bash:
FILENAME=libtensorflow-cpu-linux-x86_64-2.13.0.tar.gz
wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/${FILENAME}
sudo tar -C /usr/local -xzf ${FILENAME}

Weitere Hinweise stehen da auch noch zur Info. Da es ein wenig viel Gefummel am System war, kann das eine oder Andere untergegangen sein.

P.S. Starnet V2 reißt aktuell das gesamte Pi beim Anwenden selbigen runter. Muss mal schauen woran das liegt.
 
Status
Es sind keine weiteren Antworten möglich.
Zurück
Oben