Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions easybuild/easyconfigs/d/DGL/DGL-1.1.1-foss-2022a-CUDA-11.7.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
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'}

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",
},
# DGL really needs cub >= 1.17, cub version in CUDA 11.7.0 is only 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 = [
{'dgl-1.1.1.tar.gz': '076026a7818f2396056252269d7960c561840bb0fe89494e11f8d6c524891c49'},
{'metis-5.1.1-DistDGL-v0.5.tar.gz': 'cedf0b32d32a8496bac7eb078b2b8260fb00ddb8d50c27e4082968a01bc33331'},
{'GKlib-METIS-v5.1.1-DistDGL-0.5.tar.gz': '52aa0d383d42360f4faa0ae9537ba2ca348eeab4db5f2dfd6343192d0ff4b833'},
{'tensorpipe-20230206.tar.gz': 'fc0a4f914c3496539fbb5db8948d629b3d2b64e019c5204345ca0b427eb46f6b'},
{'pcg-20220408.tar.gz': 'e4612f432d4e03dcd86ee49d863c2453c00fe9bac3fe6fbbac1e92ae1675467b'},
{'libxsmm-20230504.tar.gz': 'c72972c05ea30908c072f9bf3f9f4f7e510fa9bd85dc42b0710f3b0a4640b98e'},
{'thrust-1.17.0.tar.gz': 'b02aca5d2325e9128ed9d46785b8e72366f758b873b95001f905f22afcf31bbf'},
{'cub-1.17.0.tar.gz': '16fd4860ae3196bc3eb08bf5754fa2a9697951ddae36dc9721e6614388893618'},
{'DGL-1.1.1_use_externals_instead_of_submodules.patch':
'b98bb1b90ea5cb64e492fee3b2390eff4d9901a37c954c39326ce667a0ecdd8e'},
{'DGL-1.1.1_nanoflanSearchParams.patch': '3538bf470d2457f24b44636ca2422b0df8f5bd5f6157ca8ffc94f0c022844d57'},
]

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.36'),
('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'
14 changes: 14 additions & 0 deletions easybuild/easyconfigs/d/DGL/DGL-1.1.1_nanoflanSearchParams.patch
Original file line number Diff line number Diff line change
@@ -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<FloatType, IdType> 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 */
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions easybuild/easyconfigs/d/DLPack/DLPack-0.8-GCC-11.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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': 'GCC', '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'),
]

sanity_check_paths = {
'files': ['include/dlpack/dlpack.h', 'lib/cmake/dlpack/dlpackConfig.cmake'],
'dirs': [],
}

moduleclass = 'lib'
38 changes: 38 additions & 0 deletions easybuild/easyconfigs/d/DMLC-Core/DMLC-Core-0.5-GCC-11.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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': 'GCC', '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'),
]

_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'
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
easyblock = 'CMakeMake'

name = 'nanoflann'
version = '1.5.0'

homepage = 'https://github.com/jlblancoc/nanoflann'
description = "nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies."

toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
toolchainopts = {'optarch': False} # optarch causes test error on zen2

github_account = 'jlblancoc'
source_urls = [GITHUB_SOURCE]
sources = ['v%(version)s.tar.gz']
patches = [
'%(name)s-%(version)s_use_external_googletest.patch',
]
checksums = [
{'v1.5.0.tar.gz': '89aecfef1a956ccba7e40f24561846d064f309bc547cc184af7f4426e42f8e65'},
{'nanoflann-1.5.0_use_external_googletest.patch':
'5f0b99b0558bdf76c19d52eb82d10cdcc104eb6c2fb1891e033b5c96fb47f7b9'},
]

builddependencies = [
('binutils', '2.38'),
('CMake', '3.24.3'),
('googletest', '1.11.0'),
]

configopts = '-DNANOFLANN_BUILD_TESTS=ON'

runtest = 'test'

sanity_check_paths = {
'files': ['include/nanoflann.hpp', 'lib/pkgconfig/nanoflann.pc'],
'dirs': ['share/nanoflann/cmake'],
}

moduleclass = 'lib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Use external googletest

Åke Sandgren, 20230213
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc84430..31ab273 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,10 @@ endif()
# Tests
option(NANOFLANN_BUILD_TESTS "Build unit tests" ON)
if(NANOFLANN_BUILD_TESTS)
+ find_package(GTest)
+ if (NOT GTEST_FOUND)
+ message(ERROR "Testing requires googletest.")
+ endif()
enable_testing()
add_subdirectory(tests)
endif()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2e593da..9c3b443 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -8,17 +8,6 @@ if(MSVC)
add_definitions(-D_VARIADIC_MAX=10)
endif(MSVC)

-if(NOT TARGET gtest)
- # Treat this directory as "system" to ignore pedantic warnings.
- if(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem gtest-1.8.0/include")
- endif()
-
- # Compile gtest from sources:
- add_subdirectory(gtest-1.8.0)
- INCLUDE_DIRECTORIES("gtest-1.8.0/include/")
-endif()
-
set(EXECUTABLE_OUTPUT_PATH "${${PROJECT_NAME}_BINARY_DIR}")

# Tests based on Google gtest:
@@ -37,4 +26,4 @@ ADD_TEST(unit_tests_run ${EXECUTABLE_OUTPUT_PATH}/unit_tests)
set_tests_properties(unit_tests_run PROPERTIES DEPENDS unit_tests_build)

# Add the required libraries for linking:
-TARGET_LINK_LIBRARIES(unit_tests mygtest nanoflann)
+TARGET_LINK_LIBRARIES(unit_tests ${GTEST_LIBRARIES} nanoflann)
Loading