easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
106 stars 285 forks source link

also add path to `libtorch.so` & co to `$LIBRARY_PATH` in generated module file for PyTorch #3488

Closed boegel closed 1 month ago

boegel commented 1 month ago

(created using eb --new-pr)

fix for failing RPATH sanity check for dorado when using RPATH linking:

Sanity check failed:
Library libtorch.so not found for /software/dorado/0.7.3-foss-2023a-CUDA-12.1.1/bin/dorado
Library libtorch_cpu.so not found for /software/dorado/0.7.3-foss-2023a-CUDA-12.1.1/bin/dorado
...
boegel commented 1 month ago

Works as intended, diff after re-generating module file with --module-only:

$ diff -u /apps/gent/RHEL9/cascadelake-volta-ib/modules/all/PyTorch/2.1.2-foss-2023a-CUDA-12.1.1.lua.bk /apps/gent/RHEL9/cascadelake-volta-ib/modules/all/PyTorch/2.1.2-foss-2023a-CUDA-12.1.1.lua
--- /apps/gent/RHEL9/cascadelake-volta-ib/modules/all/PyTorch/2.1.2-foss-2023a-CUDA-12.1.1.lua.bk       2024-10-12 00:17:25.068272275 +0200
+++ /apps/gent/RHEL9/cascadelake-volta-ib/modules/all/PyTorch/2.1.2-foss-2023a-CUDA-12.1.1.lua  2024-10-15 21:45:59.651791287 +0200
@@ -110,6 +110,7 @@

 prepend_path("CMAKE_PREFIX_PATH", pathJoin(root, "lib/python3.11/site-packages/torch"))
 prepend_path("LD_LIBRARY_PATH", pathJoin(root, "lib/python3.11/site-packages/torch/lib"))
+prepend_path("LIBRARY_PATH", pathJoin(root, "lib/python3.11/site-packages/torch/lib"))
 prepend_path("PATH", pathJoin(root, "bin"))
 setenv("EBROOTPYTORCH", root)
 setenv("EBVERSIONPYTORCH", "2.1.2")
boegel commented 1 month ago

All PyTorch module files on both generoso and jsc-zen3 have been re-generated via --module-only to ensure they also update $LIBRARY_PATH