diff --git a/easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a-CUDA-11.7.0.eb b/easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a-CUDA-11.7.0.eb new file mode 100644 index 000000000000..eec9c886699a --- /dev/null +++ b/easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a-CUDA-11.7.0.eb @@ -0,0 +1,167 @@ +easyblock = 'CMakeMake' + +name = 'DGL' +version = '1.1.1' +versionsuffix = '-CUDA-%(cudaver)s' + +homepage = 'https://www.dgl.ai' +description = """DGL is an easy-to-use, high performance and scalable Python package for deep learning on graphs. +DGL is framework agnostic, meaning if a deep graph model is a component of an end-to-end application, the rest +of the logics can be implemented in any major frameworks, such as PyTorch, Apache MXNet or TensorFlow.""" + +toolchain = {'name': 'foss', 'version': '2022a'} +# GCC 10.3.0 vectorizer causes errors in nanoflann on skylake and later +# and since nanoflann is just a header file we need to turn it off for anything that uses it +# TH? toolchainopts = {'vectorize': False} + +github_account = 'dmlc' +source_urls = [GITHUB_LOWER_SOURCE] +sources = [ + { + 'download_filename': '%(version)s.tar.gz', + 'filename': '%(namelower)s-%(version)s.tar.gz', + }, + { + 'source_urls': ['https://github.com/KarypisLab/METIS/archive'], + 'download_filename': 'v5.1.1-DistDGL-v0.5.tar.gz', + 'filename': 'metis-5.1.1-DistDGL-v0.5.tar.gz', + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/METIS --strip-components=1 -xf %s", + }, + { + 'source_urls': ['https://github.com/KarypisLab/GKlib/archive'], + 'download_filename': 'METIS-v6.1.1-DistDGL-0.5.tar.gz', + 'filename': 'GKlib-METIS-v6.1.1-DistDGL-0.5.tar.gz', + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/METIS/GKlib --strip-components=2 -xf %s", + }, + { + 'filename': 'tensorpipe-20230206.tar.gz', + 'git_config': { + 'url': 'https://github.com/pytorch', + 'repo_name': 'tensorpipe', + 'commit': '6042f1a4cbce8eef997f11ed0012de137b317361', + 'recursive': True, + }, + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/tensorpipe --strip-components=1 -xf %s", + }, + { + 'filename': 'pcg-20220408.tar.gz', + 'git_config': { + 'url': 'https://github.com/imneme', + 'repo_name': 'pcg-cpp', + 'commit': '428802d1a5634f96bcd0705fab379ff0113bcf13', + 'recursive': True, + }, + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/pcg --strip-components=1 -xf %s", + }, + # requires commit 8009060 due to LIBXSMM_MELTW_FLAG_OPREDUCE_VECS_REDOP_MAX + # -> do not use outdated dependency ver 1.17 + { + 'filename': 'libxsmm-20230504.tar.gz', + 'git_config': { + 'url': 'https://github.com/libxsmm', + 'repo_name': 'libxsmm', + 'commit': '80090603e43f6ddc870cc42e1403dd0af07744cc', + 'recursive': True, + }, + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/libxsmm --strip-components=1 -xf %s", + }, + # DGL really needs cub >= 1.17, CUDA 11.7 only have 1.15 + { + 'source_urls': ['https://github.com/NVIDIA/thrust/archive'], + 'download_filename': '1.17.0.tar.gz', + 'filename': 'thrust-1.17.0.tar.gz', + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/thrust --strip-components=1 -xf %s", + }, + { + 'source_urls': ['https://github.com/NVIDIA/cub/archive'], + 'download_filename': '1.17.0.tar.gz', + 'filename': 'cub-1.17.0.tar.gz', + 'extract_cmd': + "tar -C %(namelower)s-%(version)s/third_party/thrust/dependencies/cub --strip-components=1 -xf %s", + }, +] +patches = [ + '%(name)s-%(version)s_use_externals_instead_of_submodules.patch', + '%(name)s-%(version)s_nanoflanSearchParams.patch' +] +checksums = [ + '076026a7818f2396056252269d7960c561840bb0fe89494e11f8d6c524891c49', # dgl-1.1.1.tar.gz + 'cedf0b32d32a8496bac7eb078b2b8260fb00ddb8d50c27e4082968a01bc33331', # metis-5.1.1-DistDGL-v0.5.tar.gz + '52aa0d383d42360f4faa0ae9537ba2ca348eeab4db5f2dfd6343192d0ff4b833', # GKlib-METIS-v5.1.1-DistDGL-0.5.tar.gz + None, # tensorpipe-20230206.tar.gz + None, # pcg-20220408.tar.gz + None, # libxsmm-20230504.tar.gz + 'b02aca5d2325e9128ed9d46785b8e72366f758b873b95001f905f22afcf31bbf', # thrust-1.17.0.tar.gz + '16fd4860ae3196bc3eb08bf5754fa2a9697951ddae36dc9721e6614388893618', # cub-1.17.0.tar.gz + 'b98bb1b90ea5cb64e492fee3b2390eff4d9901a37c954c39326ce667a0ecdd8e', + # DGL-1.1.1_use_externals_instead_of_submodules.patch + '82c1414116a95d4efaf99d4025d223af97a4fb87aac471e60a008618edae38bb', + # DGL-1.1.1_nanoflanSearchParams.patch +] + +builddependencies = [ + ('CMake', '3.24.3'), + ('googletest', '1.11.0'), +] + +dependencies = [ + ('Python', '3.10.4'), + ('SciPy-bundle', '2022.05'), + ('networkx', '2.8.4'), + ('tqdm', '4.64.0'), + ('DLPack', '0.8'), + ('DMLC-Core', '0.5'), + ('Parallel-Hashmap', '1.33'), + ('nanoflann', '1.5.0'), + # ('libxsmm', '1.17'), # requires commit 8009060 due to LIBXSMM_MELTW_FLAG_OPREDUCE_VECS_REDOP_MAX + ('CUDA', '11.7.0', '', SYSTEM), + ('NCCL', '2.12.12', versionsuffix), + ('PyTorch', '1.12.0', versionsuffix), +] + +_copts = [ + '-DUSE_AVX=OFF', # AVX + LIBXSMM requires libxsmm tag 1.eol + '-DBUILD_CPP_TEST=ON', + '-DUSE_CUDA=ON', # Must be "ON", as opposed to "1" or so, due to bad CMake code in DGL + '-DUSE_NCCL=ON', + '-DUSE_SYSTEM_NCCL=ON', + '-DBUILD_WITH_SHARED_NCCL=ON', + '-DUSE_FP16=ON', +] +configopts = ' '.join(_copts) + +# Must not build shared libs, DGL uses internal versions of, among others, METIS +# but it doesn't install these internal libraries and simply assumes that everything is +# statically linked. +build_shared_libs = False + +runtest = 'test' + +exts_defaultclass = 'PythonPackage' +exts_default_options = { + 'easyblock': 'PythonPackage', + 'download_dep_fail': True, + 'use_pip': True, + 'sanity_pip_check': True, + 'runtest': True, +} + +exts_list = [ + ('dgl', version, { + 'installopts': "--use-feature=in-tree-build ", + 'source_tmpl': '%(namelower)s-%(version)s.tar.gz', + 'start_dir': 'python', + 'checksums': ['076026a7818f2396056252269d7960c561840bb0fe89494e11f8d6c524891c49'], + }), +] + +sanity_check_paths = { + 'files': ['lib/libdgl.%s' % SHLIB_EXT], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = { + 'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'ai' diff --git a/easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a.eb b/easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a.eb new file mode 100644 index 000000000000..76093e5be3e6 --- /dev/null +++ b/easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a.eb @@ -0,0 +1,148 @@ +easyblock = 'CMakeMake' + +name = 'DGL' +version = '1.1.1' + +homepage = 'https://www.dgl.ai' +description = """DGL is an easy-to-use, high performance and scalable Python package for deep learning on graphs. +DGL is framework agnostic, meaning if a deep graph model is a component of an end-to-end application, the rest +of the logics can be implemented in any major frameworks, such as PyTorch, Apache MXNet or TensorFlow.""" + +toolchain = {'name': 'foss', 'version': '2022a'} +# GCC 10.3.0 vectorizer causes errors in nanoflann on skylake and later +# and since nanoflann is just a header file we need to turn it off for anything that uses it +# TH? toolchainopts = {'vectorize': False} + +github_account = 'dmlc' +source_urls = [GITHUB_LOWER_SOURCE] +sources = [ + { + 'download_filename': '%(version)s.tar.gz', + 'filename': '%(namelower)s-%(version)s.tar.gz', + }, + { + 'source_urls': ['https://github.com/KarypisLab/METIS/archive'], + 'download_filename': 'v5.1.1-DistDGL-v0.5.tar.gz', + 'filename': 'metis-5.1.1-DistDGL-v0.5.tar.gz', + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/METIS --strip-components=1 -xf %s", + }, + { + 'source_urls': ['https://github.com/KarypisLab/GKlib/archive'], + 'download_filename': 'METIS-v5.1.1-DistDGL-0.5.tar.gz', + 'filename': 'GKlib-METIS-v5.1.1-DistDGL-0.5.tar.gz', + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/METIS/GKlib --strip-components=1 -xf %s", + }, + { + 'filename': 'tensorpipe-20230206.tar.gz', + 'git_config': { + 'url': 'https://github.com/pytorch', + 'repo_name': 'tensorpipe', + 'commit': '6042f1a4cbce8eef997f11ed0012de137b317361', + 'recursive': True, + }, + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/tensorpipe --strip-components=1 -xf %s", + }, + { + 'filename': 'pcg-20220408.tar.gz', + 'git_config': { + 'url': 'https://github.com/imneme', + 'repo_name': 'pcg-cpp', + 'commit': '428802d1a5634f96bcd0705fab379ff0113bcf13', + 'recursive': True, + }, + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/pcg --strip-components=1 -xf %s", + }, + # requires commit 8009060 due to + # LIBXSMM_MELTW_FLAG_OPREDUCE_VECS_REDOP_MAX + # -> do not use outdated dependency ver 1.17 + { + 'filename': 'libxsmm-20230504.tar.gz', + 'git_config': { + 'url': 'https://github.com/libxsmm', + 'repo_name': 'libxsmm', + 'commit': '80090603e43f6ddc870cc42e1403dd0af07744cc', + 'recursive': True, + }, + 'extract_cmd': "tar -C %(namelower)s-%(version)s/third_party/libxsmm --strip-components=1 -xf %s", + }, +] +patches = [ + '%(name)s-%(version)s_use_externals_instead_of_submodules.patch', + '%(name)s-%(version)s_nanoflanSearchParams.patch' +] + +checksums = [ + '076026a7818f2396056252269d7960c561840bb0fe89494e11f8d6c524891c49', # dgl-1.1.1.tar.gz + 'cedf0b32d32a8496bac7eb078b2b8260fb00ddb8d50c27e4082968a01bc33331', # metis-5.1.1-DistDGL-v0.5.tar.gz + '52aa0d383d42360f4faa0ae9537ba2ca348eeab4db5f2dfd6343192d0ff4b833', # GKlib-METIS-v5.1.1-DistDGL-0.5.tar.gz + None, # tensorpipe-20230206.tar.gz + None, # pcg-20220408.tar.gz + None, # libxsmm-20230504.tar.gz + 'b98bb1b90ea5cb64e492fee3b2390eff4d9901a37c954c39326ce667a0ecdd8e', + # DGL-1.1.1_use_externals_instead_of_submodules.patch + '82c1414116a95d4efaf99d4025d223af97a4fb87aac471e60a008618edae38bb', + # DGL-1.1.1_nanoflanSearchParams.patch +] + +builddependencies = [ + ('CMake', '3.24.3'), + ('googletest', '1.11.0'), +] + +dependencies = [ + ('Python', '3.10.4'), + ('SciPy-bundle', '2022.05'), + ('networkx', '2.8.4'), + ('tqdm', '4.64.0'), + ('DLPack', '0.8'), + ('DMLC-Core', '0.5'), + ('Parallel-Hashmap', '1.33'), + ('nanoflann', '1.5.0'), + # ('libxsmm', '1.17'), # requires commit 8009060 due to LIBXSMM_MELTW_FLAG_OPREDUCE_VECS_REDOP_MAX + ('PyTorch', '1.12.0'), +] + +_copts = [ + '-DUSE_AVX=OFF', # AVX + LIBXSMM requires libxsmm tag 1.eol + '-DBUILD_CPP_TEST=ON', + '-DUSE_CUDA=OFF', # Must be "ON", as opposed to "1" or so, due to bad CMake code in DGL + '-DUSE_NCCL=OFF', + '-DUSE_FP16=ON', +] +configopts = ' '.join(_copts) + +# Must not build shared libs, DGL uses internal versions of, among others, METIS +# but it doesn't install these internal libraries and simply assumes that everything is +# statically linked. +build_shared_libs = False + +runtest = 'test' + +exts_defaultclass = 'PythonPackage' +exts_default_options = { + 'easyblock': 'PythonPackage', + 'download_dep_fail': True, + 'use_pip': True, + 'sanity_pip_check': True, + 'runtest': True, +} + +exts_list = [ + ('dgl', version, { + 'installopts': "--use-feature=in-tree-build ", + 'source_tmpl': '%(namelower)s-%(version)s.tar.gz', + 'start_dir': 'python', + 'checksums': ['076026a7818f2396056252269d7960c561840bb0fe89494e11f8d6c524891c49'], + }), +] + +sanity_check_paths = { + 'files': ['lib/libdgl.%s' % SHLIB_EXT], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = { + 'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'ai' diff --git a/easybuild/easyconfigs/d/DGL/DGL-1.1.1_nanoflanSearchParams.patch b/easybuild/easyconfigs/d/DGL/DGL-1.1.1_nanoflanSearchParams.patch new file mode 100644 index 000000000000..08da7660fedb --- /dev/null +++ b/easybuild/easyconfigs/d/DGL/DGL-1.1.1_nanoflanSearchParams.patch @@ -0,0 +1,14 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2023/07 +# allow using nanoflann 1.5.0, which provides nanoflann::SearchParameters(), but not nanoflann::SearchParams() +diff -ru dgl-1.1.1/src/graph/transform/cpu/kdtree_ndarray_adapter.h dgl-1.1.1_nanoflanSearchParams/src/graph/transform/cpu/kdtree_ndarray_adapter.h +--- dgl-1.1.1/src/graph/transform/cpu/kdtree_ndarray_adapter.h 2023-06-23 07:00:04.000000000 +0200 ++++ dgl-1.1.1_nanoflanSearchParams/src/graph/transform/cpu/kdtree_ndarray_adapter.h 2023-07-06 12:17:16.433558692 +0200 +@@ -74,7 +74,7 @@ + FloatType* out_dists) const { + nanoflann::KNNResultSet resultSet(num_closest); + resultSet.init(out_idxs, out_dists); +- index_->findNeighbors(resultSet, query_pt, nanoflann::SearchParams()); ++ index_->findNeighbors(resultSet, query_pt, nanoflann::SearchParameters()); + } + + /** @brief Interface expected by KDTreeSingleIndexAdaptor */ diff --git a/easybuild/easyconfigs/d/DGL/DGL-1.1.1_use_externals_instead_of_submodules.patch b/easybuild/easyconfigs/d/DGL/DGL-1.1.1_use_externals_instead_of_submodules.patch new file mode 100644 index 000000000000..aca0d70b0e20 --- /dev/null +++ b/easybuild/easyconfigs/d/DGL/DGL-1.1.1_use_externals_instead_of_submodules.patch @@ -0,0 +1,64 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2023/07 +# based on DGL-0.9.1_use_externals_instead_of_submodules.patch, +# but build libxsmm because LIBXSMM_MELTW_FLAG_OPREDUCE_VECS_REDOP_MAX is required from commit 8009060 > v1.17 +diff -ru dgl-1.1.1/CMakeLists.txt dgl-1.1.1_use_externals_instead_of_submodules/CMakeLists.txt +--- dgl-1.1.1/CMakeLists.txt 2023-06-23 07:00:04.000000000 +0200 ++++ dgl-1.1.1_use_externals_instead_of_submodules/CMakeLists.txt 2023-07-06 11:08:46.258340318 +0200 +@@ -176,12 +176,12 @@ + + # include directories + target_include_directories(dgl PRIVATE "include") +-target_include_directories(dgl PRIVATE "third_party/dlpack/include") +-target_include_directories(dgl PRIVATE "third_party/dmlc-core/include") +-target_include_directories(dgl PRIVATE "third_party/phmap/") ++#target_include_directories(dgl PRIVATE "third_party/dlpack/include") ++#target_include_directories(dgl PRIVATE "third_party/dmlc-core/include") ++#target_include_directories(dgl PRIVATE "third_party/phmap/") + target_include_directories(dgl PRIVATE "third_party/METIS/include/") + target_include_directories(dgl PRIVATE "tensoradapter/include") +-target_include_directories(dgl PRIVATE "third_party/nanoflann/include") ++#target_include_directories(dgl PRIVATE "third_party/nanoflann/include") + target_include_directories(dgl PRIVATE "third_party/libxsmm/include") + target_include_directories(dgl PRIVATE "third_party/pcg/include") + +@@ -189,7 +189,7 @@ + if (USE_HDFS) + option(DMLC_HDFS_SHARED "dgl has to build with dynamic hdfs library" ON) + endif() +-add_subdirectory("third_party/dmlc-core") ++#add_subdirectory("third_party/dmlc-core") + list(APPEND DGL_LINKER_LIBS dmlc) + set(GOOGLE_TEST 0) # Turn off dmlc-core test + +@@ -220,6 +220,7 @@ + endif(REBUILD_LIBXSMM) + add_dependencies(dgl libxsmm) + list(APPEND DGL_LINKER_LIBS -L${CMAKE_SOURCE_DIR}/third_party/libxsmm/lib/ xsmm.a) ++ list(APPEND DGL_LINKER_LIBS flexiblas) + endif((NOT MSVC) AND USE_LIBXSMM) + + if(NOT MSVC) +@@ -305,15 +306,18 @@ + # Testing + if(BUILD_CPP_TEST) + message(STATUS "Build with unittest") +- add_subdirectory(./third_party/googletest) ++ #add_subdirectory(./third_party/googletest) + enable_testing() + include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR}) + include_directories("include") +- include_directories("third_party/dlpack/include") +- include_directories("third_party/dmlc-core/include") +- include_directories("third_party/phmap") ++ #include_directories("third_party/dlpack/include") ++ #include_directories("third_party/dmlc-core/include") ++ #include_directories("third_party/phmap") + include_directories("third_party/libxsmm/include") + include_directories("third_party/pcg/include") ++ if (USE_AVX) #TH? ++ include_directories("third_party/xbyak") #TH ? ++ endif(USE_AVX) #TH ? + file(GLOB_RECURSE TEST_SRC_FILES ${PROJECT_SOURCE_DIR}/tests/cpp/*.cc) + add_executable(runUnitTests ${TEST_SRC_FILES}) + target_link_libraries(runUnitTests gtest gtest_main) +Only in dgl-1.1.1_use_externals_instead_of_submodules: .CMakeLists.txt.swp diff --git a/easybuild/easyconfigs/d/DLPack/DLPack-0.8-GCCcore-11.3.0.eb b/easybuild/easyconfigs/d/DLPack/DLPack-0.8-GCCcore-11.3.0.eb new file mode 100644 index 000000000000..9e75d6265f4b --- /dev/null +++ b/easybuild/easyconfigs/d/DLPack/DLPack-0.8-GCCcore-11.3.0.eb @@ -0,0 +1,27 @@ +easyblock = 'CMakeMake' + +name = 'DLPack' +version = '0.8' + +homepage = 'https://dmlc.github.io/dlpack/latest/' +description = """DLPack is a stable in-memory data structure for an ndarray +system to interact with a variety of frameworks.""" + +toolchain = {'name': 'GCCcore', 'version': '11.3.0'} + +github_account = 'dmlc' +source_urls = [GITHUB_LOWER_SOURCE] +sources = ['v%(version)s.tar.gz'] +checksums = ['cf965c26a5430ba4cc53d61963f288edddcd77443aa4c85ce722aaf1e2f29513'] + +builddependencies = [ + ('CMake', '3.24.3'), + ('binutils', '2.38'), +] + +sanity_check_paths = { + 'files': ['include/dlpack/dlpack.h', 'lib/cmake/dlpack/dlpackConfig.cmake'], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/d/DMLC-Core/DMLC-Core-0.5-GCCcore-11.3.0.eb b/easybuild/easyconfigs/d/DMLC-Core/DMLC-Core-0.5-GCCcore-11.3.0.eb new file mode 100644 index 000000000000..ecf46088b9c6 --- /dev/null +++ b/easybuild/easyconfigs/d/DMLC-Core/DMLC-Core-0.5-GCCcore-11.3.0.eb @@ -0,0 +1,39 @@ +easyblock = 'CMakeMake' + +name = 'DMLC-Core' +version = '0.5' + +homepage = 'https://dmlc-core.readthedocs.io/en/latest' +description = """DMLC-Core is the backbone library to support all DMLC +projects, offers the bricks to build efficient and scalable distributed +machine learning libraries.""" + +toolchain = {'name': 'GCCcore', 'version': '11.3.0'} + +github_account = 'dmlc' +source_urls = [GITHUB_LOWER_SOURCE] +sources = ['v%(version)s.tar.gz'] +checksums = ['cd97475ae1ecf561a1cb1129552f9889d52b11b3beb4c56e5345d007d5020ece'] + +builddependencies = [ + ('CMake', '3.24.3'), + ('googletest', '1.11.0'), + ('binutils', '2.38'), +] + +_copts = [ + '-DUSE_CXX14_IF_AVAILABLE=ON', + '-DGOOGLE_TEST=ON', +] +configopts = ' '.join(_copts) + +build_shared_libs = True + +runtest = 'test' + +sanity_check_paths = { + 'files': ['include/dmlc/common.h', 'lib/cmake/dmlc/dmlc-config.cmake', 'lib/libdmlc.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/Parallel-Hashmap/Parallel-Hashmap-1.33-GCCcore-11.3.0.eb b/easybuild/easyconfigs/p/Parallel-Hashmap/Parallel-Hashmap-1.33-GCCcore-11.3.0.eb new file mode 100644 index 000000000000..d0412b48cc90 --- /dev/null +++ b/easybuild/easyconfigs/p/Parallel-Hashmap/Parallel-Hashmap-1.33-GCCcore-11.3.0.eb @@ -0,0 +1,34 @@ +easyblock = 'CMakeMake' + +name = 'Parallel-Hashmap' +version = '1.33' + +homepage = 'https://github.com/greg7mdp/parallel-hashmap' +description = """Parallel Hashmap is built on a modified version of +Abseil's flat_hash_map. Parallel Hashmap has lower space requirements, +is nearly as fast as the underlying flat_hash_map, and can be used from +multiple threads with high levels of concurrency.""" + +# There is no actual library built, so it can be at GCCcore level despite being a C++ "library" +toolchain = {'name': 'GCCcore', 'version': '11.3.0'} + +github_account = 'greg7mdp' +source_urls = [GITHUB_LOWER_SOURCE] +sources = ['%(version)s.tar.gz'] +checksums = ['f6e4d0508c4d935fa25dcbaec63fbe0d7503435797e275ec109e8a3f1462a4cd'] + +builddependencies = [ + ('binutils', '2.38'), + ('CMake', '3.24.3'), +] + +configopts = '-DPHMAP_BUILD_TESTS=OFF' # The test code doesn't build + +sanity_check_paths = { + 'files': ['include/parallel_hashmap/phmap%s.h' % x for x in [ + '', '_base', '_bits', '_config', '_dump', '_fwd_decl', '_utils' + ]], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a-CUDA-11.7.0.eb b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a-CUDA-11.7.0.eb index 9ebc11b3bd21..4e259b401cff 100644 --- a/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a-CUDA-11.7.0.eb +++ b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a-CUDA-11.7.0.eb @@ -1,3 +1,4 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2024/03 easyblock = 'PythonBundle' name = 'RFdiffusion' @@ -5,57 +6,90 @@ version = '1.1.0' versionsuffix = '-CUDA-%(cudaver)s' homepage = 'https://github.com/RosettaCommons/RFdiffusion' -description = """ -RFdiffusion is an open source method for structure generation, with or without conditional information -(a motif, target etc). It can perform a whole range of protein design challenges as we have outlined -in the RFdiffusion paper. +description = """RFdiffusion is an open source method for structure generation, with or without +conditional information (a motif, target etc). It can perform a whole range of +protein design challenges as we have outlined in the RFdiffusion paper +https://www.biorxiv.org/content/10.1101/2022.12.09.519842v1 """ toolchain = {'name': 'foss', 'version': '2022a'} +_pysp = '%(installdir)s/lib/python%(pyshortver)s/site-packages' + dependencies = [ - ('CUDA', '11.7.0', '', SYSTEM), ('Python', '3.10.4'), - ('SciPy-bundle', '2022.05'), - ('e3nn', '0.3.3', versionsuffix), ('wandb', '0.13.4'), + ('CUDA', '11.7.0', '', SYSTEM), + ('PyTorch', '1.12.0', versionsuffix), + ('e3nn', '0.3.3', versionsuffix), + ('Hydra', '1.3.2'), + ('DGL', '1.1.1', versionsuffix), + ('RFdiffusion-models', '1.1.0', '', SYSTEM), + ('RFdiffusion-schedules', '1.1.0', '', SYSTEM), ] use_pip = True +sanity_pip_check = True exts_list = [ - ('pynvml', '11.0.0', { - 'checksums': ['d5fc4a22d355b40c341d6ba0aa888a2d4d2253177d243900f8401b7e6cacb1bb'], + ('asttokens', '2.2.1', { + 'checksums': ['4622110b2a6f30b77e1473affaa97e711bc2f07d3f10848420ff1898edbe94f3'], + }), + ('executing', '1.2.0', { + 'checksums': ['19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107'], + }), + ('icecream', '2.1.3', { + 'checksums': ['0aa4a7c3374ec36153a1d08f81e3080e83d8ac1eefd97d2f4fe9544e8f9b49de'], }), ('dllogger', '1.0.0', { 'source_urls': ['https://github.com/NVIDIA/dllogger/archive/refs/tags'], 'sources': ['v%(version)s.zip'], 'checksums': ['07d0cd9b9b56f454f0c186a0889137e9f94e1979fca3d35911967c874c93c191'], }), - ('decorator', '5.1.1', { - 'checksums': ['637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330'], + ('pynvml', '11.5.0', { + 'checksums': ['d027b21b95b1088b9fc278117f9f61b7c67f8e33a787e9f83f735f0f71ac32d0'], }), - ('se3-transformer', version, { + ('SE3Transformer', version, { + 'modulename': 'se3_transformer', 'source_tmpl': 'v%(version)s.tar.gz', - 'source_urls': ['https://github.com/RosettaCommons/RFdiffusion/archive/refs/tags'], + 'source_urls': ['https://github.com/RosettaCommons/RFdiffusion/archive/refs/tags/'], 'start_dir': 'env/SE3Transformer', 'checksums': ['57d82f0d43540c2912eda3f1d34ad90b13db14966ee069c427e217fe78f0297f'], }), (name, version, { - 'patches': ['%(name)s-%(version)s_fix-find-packages.patch'], - 'sources': { - 'filename': '%(name)s-%(version)s.tar.gz', - 'download_filename': 'v%(version)s.tar.gz', - 'source_urls': ['https://github.com/RosettaCommons/RFdiffusion/archive/refs/tags'], - }, + 'patches': [ + 'RFdiffusion-1.1.0_setup.patch', + # change default paths of models and schedules to $RFDIFFUSION_MODELS and RFDIFFUSION_SCHEDULES + # to be set by dependencies RFDiffusion-models and RFDiffusion-schedules. + # Expect default config in _pysp/rfdiffusion/config/inference: + 'RFdiffusion-1.1.0_data_paths.patch', + ], + 'source_urls': ['https://github.com/RosettaCommons/RFdiffusion/archive/refs/tags/'], + 'sources': [{'filename': '%(name)s-%(version)s.tar.gz', 'download_filename': 'v%(version)s.tar.gz'}], 'checksums': [ {'RFdiffusion-1.1.0.tar.gz': '57d82f0d43540c2912eda3f1d34ad90b13db14966ee069c427e217fe78f0297f'}, - {'RFdiffusion-1.1.0_fix-find-packages.patch': - 'e25da7f476acacb6af58bd84f40aca712538900b0b48532b22f9a133d6886da2'}, + {'RFdiffusion-1.1.0_setup.patch': '1d17fae9d4d3716814f0d9bb6587658590dc07772c87e92fb9ad81cda6a2539d'}, + {'RFdiffusion-1.1.0_data_paths.patch': '3d1ddd1684004b4757958ef3d07b96a0f8976091fe670381fc723ad4eb6d65a5'}, ], }), ] -sanity_pip_check = True +postinstallcmds = [ + 'cp -rpP config examples %s/%%(namelower)s' % _pysp, +] + +sanity_check_commands = [ + "run_inference.py --help", + "run_inference.py 'contigmap.contigs=[150-150]' " + + "inference.output_prefix=test_outputs/test inference.num_designs=1" +] + +sanity_check_paths = { + 'files': [], + 'dirs': [ + '%s/%%(namelower)s/inference' % _pysp, + '%s/%%(namelower)s/examples' % _pysp, + '%s/%%(namelower)s/config/inference' % _pysp] +} moduleclass = 'bio' diff --git a/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a.eb b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a.eb deleted file mode 100644 index 04ca8f30e95d..000000000000 --- a/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0-foss-2022a.eb +++ /dev/null @@ -1,56 +0,0 @@ -easyblock = 'PythonBundle' - -name = 'RFdiffusion' -version = '1.1.0' - -homepage = 'https://github.com/RosettaCommons/RFdiffusion' -description = """ -RFdiffusion is an open source method for structure generation, with or without conditional information -(a motif, target etc). It can perform a whole range of protein design challenges as we have outlined -in the RFdiffusion paper. -""" - -toolchain = {'name': 'foss', 'version': '2022a'} - -dependencies = [ - ('Python', '3.10.4'), - ('SciPy-bundle', '2022.05'), - ('e3nn', '0.3.3'), - ('wandb', '0.13.4'), -] - -use_pip = True - -exts_list = [ - ('pynvml', '11.0.0', { - 'checksums': ['d5fc4a22d355b40c341d6ba0aa888a2d4d2253177d243900f8401b7e6cacb1bb'], - }), - ('dllogger', '1.0.0', { - 'source_urls': ['https://github.com/NVIDIA/dllogger/archive/refs/tags'], - 'sources': ['v%(version)s.zip'], - 'checksums': ['07d0cd9b9b56f454f0c186a0889137e9f94e1979fca3d35911967c874c93c191'], - }), - ('decorator', '5.1.1', { - 'checksums': ['637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330'], - }), - ('se3-transformer', version, { - 'source_tmpl': 'v%(version)s.tar.gz', - 'source_urls': ['https://github.com/RosettaCommons/RFdiffusion/archive/refs/tags'], - 'start_dir': 'env/SE3Transformer', - 'checksums': ['57d82f0d43540c2912eda3f1d34ad90b13db14966ee069c427e217fe78f0297f'], - }), - (name, version, { - 'patches': ['%(name)s-%(version)s_fix-find-packages.patch'], - 'source_urls': ['https://github.com/RosettaCommons/RFdiffusion/archive/refs/tags'], - 'sources': ['v%(version)s.tar.gz'], - 'checksums': [ - {'v1.1.0.tar.gz': '57d82f0d43540c2912eda3f1d34ad90b13db14966ee069c427e217fe78f0297f'}, - {'RFdiffusion-1.1.0_fix-find-packages.patch': - 'e25da7f476acacb6af58bd84f40aca712538900b0b48532b22f9a133d6886da2'}, - ], - }), -] - -sanity_pip_check = True - -moduleclass = 'bio' diff --git a/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0_data_paths.patch b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0_data_paths.patch new file mode 100644 index 000000000000..b07527abc13d --- /dev/null +++ b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0_data_paths.patch @@ -0,0 +1,62 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2024/03 +# default paths for config, models, schedules, and examples in site-packages/rfdiffusion, $RFDIFFUSION_MODELS, and $RFDIFFUSION_SCHEDULES +diff -ru RFdiffusion-1.1.0/rfdiffusion/inference/model_runners.py RFdiffusion-1.1.0_data_paths/rfdiffusion/inference/model_runners.py +--- RFdiffusion-1.1.0/rfdiffusion/inference/model_runners.py 2023-04-03 23:33:05.000000000 +0200 ++++ RFdiffusion-1.1.0_data_paths/rfdiffusion/inference/model_runners.py 2023-08-08 18:04:13.224021765 +0200 +@@ -17,7 +17,8 @@ + + from rfdiffusion.model_input_logger import pickle_function_call + import sys +- ++from rfdiffusion import __path__ as rfdiffusion_dir ++ + SCRIPT_DIR=os.path.dirname(os.path.realpath(__file__)) + + TOR_INDICES = util.torsion_indices +@@ -63,7 +64,7 @@ + if conf.inference.model_directory_path is not None: + model_directory = conf.inference.model_directory_path + else: +- model_directory = f"{SCRIPT_DIR}/../../models" ++ model_directory = os.getenv('RFDIFFUSION_MODELS') + + print(f"Reading models from {model_directory}") + +@@ -122,7 +123,7 @@ + if conf.inference.schedule_directory_path is not None: + schedule_directory = conf.inference.schedule_directory_path + else: +- schedule_directory = f"{SCRIPT_DIR}/../../schedules" ++ schedule_directory = os.getenv('RFDIFFUSION_SCHEDULES') + + # Check for cache schedule + if not os.path.exists(schedule_directory): +@@ -148,7 +149,7 @@ + if self.inf_conf.input_pdb is None: + # set default pdb + script_dir=os.path.dirname(os.path.realpath(__file__)) +- self.inf_conf.input_pdb=os.path.join(script_dir, '../../examples/input_pdbs/1qys.pdb') ++ self.inf_conf.input_pdb=os.path.join(rfdiffusion_dir[0], './examples/input_pdbs/1qys.pdb') + self.target_feats = iu.process_target(self.inf_conf.input_pdb, parse_hetatom=True, center=False) + self.chain_idx = None + +diff -ru RFdiffusion-1.1.0/scripts/run_inference.py RFdiffusion-1.1.0_data_paths/scripts/run_inference.py +--- RFdiffusion-1.1.0/scripts/run_inference.py 2023-04-03 23:33:05.000000000 +0200 ++++ RFdiffusion-1.1.0_data_paths/scripts/run_inference.py 2023-08-08 18:06:05.112486398 +0200 +@@ -28,6 +28,7 @@ + import random + import glob + ++from rfdiffusion import __path__ as rfdiffusion_dir + + def make_deterministic(seed=0): + torch.manual_seed(seed) +@@ -35,7 +36,7 @@ + random.seed(seed) + + +-@hydra.main(version_base=None, config_path="../config/inference", config_name="base") ++@hydra.main(version_base=None, config_path=os.path.join(rfdiffusion_dir[0], "config", "inference"), config_name="base") + def main(conf: HydraConfig) -> None: + log = logging.getLogger(__name__) + if conf.inference.deterministic: diff --git a/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0_setup.patch b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0_setup.patch new file mode 100644 index 000000000000..1b4d7dfc7516 --- /dev/null +++ b/easybuild/easyconfigs/r/RFdiffusion/RFdiffusion-1.1.0_setup.patch @@ -0,0 +1,19 @@ +diff -ru RFdiffusion-1.1.0/setup.py RFdiffusion-1.1.0_setup/setup.py +--- RFdiffusion-1.1.0/setup.py 2023-04-03 23:33:05.000000000 +0200 ++++ RFdiffusion-1.1.0_setup/setup.py 2023-07-05 14:23:28.233820745 +0200 +@@ -1,10 +1,10 @@ + from distutils.core import setup +- ++from setuptools import find_packages + setup(name='rfdiffusion', +- version='1.0.0', ++ version='1.1.0', + description='RFdiffusion is an open source method for protein structure generation.', + author='Rosetta Commons', + url='https://github.com/RosettaCommons/RFdiffusion', + scripts=["scripts/run_inference.py"], +- packages=["rfdiffusion"], +- install_requires=['torch', 'se3-transformer']) +\ No newline at end of file ++ packages=find_packages(), ++ install_requires=['torch', 'se3-transformer'])