-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19490 from akesandgren/20240104152455_new_pr_SUND…
…IALS660 {math}[foss/2022b,foss/2023a] SUNDIALS v6.6.0 enable KLU and CUDA solvers
- Loading branch information
Showing
4 changed files
with
149 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-6.6.0-foss-2023a-CUDA-12.1.1.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
easyblock = 'CMakeMake' | ||
|
||
name = 'SUNDIALS' | ||
version = '6.6.0' | ||
versionsuffix = '-CUDA-%(cudaver)s' | ||
|
||
homepage = 'https://computing.llnl.gov/projects/sundials' | ||
|
||
description = "SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic Equation Solvers" | ||
|
||
toolchain = {'name': 'foss', 'version': '2023a'} | ||
toolchainopts = {'openmp': True, 'usempi': True, 'pic': True} | ||
|
||
source_urls = ['https://github.com/LLNL/sundials/releases/download/v%(version)s/'] | ||
sources = [SOURCELOWER_TAR_GZ] | ||
patches = [ | ||
'%(name)s-%(version)s_fix_bad_find_library_calls.patch', | ||
] | ||
checksums = [ | ||
{'sundials-6.6.0.tar.gz': 'f90029b8da846c8faff5530fd1fa4847079188d040554f55c1d5d1e04743d29d'}, | ||
{'SUNDIALS-6.6.0_fix_bad_find_library_calls.patch': | ||
'c5e3248bd036fee17436649280ff7156a2722698c33ec20a5e635e3a60d16823'}, | ||
] | ||
|
||
builddependencies = [ | ||
('CMake', '3.26.3'), | ||
] | ||
|
||
dependencies = [ | ||
('CUDA', '12.1.1', '', SYSTEM), | ||
('SuiteSparse', '7.1.0'), | ||
] | ||
|
||
_copts = [ | ||
'-DENABLE_MPI=ON', | ||
'-DENABLE_OPENMP=ON', | ||
'-DENABLE_LAPACK=ON', | ||
'-DENABLE_KLU=ON', | ||
'-DENABLE_CUDA=ON', | ||
'-DCMAKE_CUDA_ARCHITECTURES="%(cuda_cc_cmake)s"', | ||
] | ||
configopts = ' '.join(_copts) | ||
|
||
local_solvers = ['arkode', 'cvode', 'cvodes', 'ida', 'idas', 'kinsol'] | ||
|
||
sanity_check_paths = { | ||
'files': ['lib/libsundials_%s.a' % s for s in local_solvers + | ||
['nvecopenmp', 'nvecparallel', 'nvecserial']] + | ||
['lib/libsundials_%s.%s' % (s, SHLIB_EXT) for s in local_solvers + | ||
['nvecopenmp', 'nvecparallel', 'nvecserial']], | ||
'dirs': ['examples/%s' % s for s in local_solvers] + | ||
['include/%s' % s for s in local_solvers] + | ||
['examples/nvector', 'include/nvector', 'include/sundials'], | ||
} | ||
|
||
moduleclass = 'math' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-6.6.0_fix_bad_find_library_calls.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Make FindKLU use default search paths so it finds our SuiteSparse installation. | ||
|
||
Åke Sandgren, 2023-12-20 | ||
diff -ru sundials-6.6.0.orig/cmake/tpl/FindKLU.cmake sundials-6.6.0/cmake/tpl/FindKLU.cmake | ||
--- sundials-6.6.0.orig/cmake/tpl/FindKLU.cmake 2023-07-20 20:47:41.062113287 +0200 | ||
+++ sundials-6.6.0/cmake/tpl/FindKLU.cmake 2023-12-20 13:27:56.974985727 +0100 | ||
@@ -55,25 +55,25 @@ | ||
else () | ||
# find library with user provided directory path | ||
set(KLU_LIBRARY_NAME klu) | ||
- find_library(KLU_LIBRARY ${KLU_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
+ find_library(KLU_LIBRARY ${KLU_LIBRARY_NAME} ${KLU_LIBRARY_DIR}) | ||
endif () | ||
mark_as_advanced(KLU_LIBRARY) | ||
|
||
if (NOT AMD_LIBRARY) | ||
set(AMD_LIBRARY_NAME amd) | ||
- find_library(AMD_LIBRARY ${AMD_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
+ find_library(AMD_LIBRARY ${AMD_LIBRARY_NAME} ${KLU_LIBRARY_DIR}) | ||
mark_as_advanced(AMD_LIBRARY) | ||
endif () | ||
|
||
if (NOT COLAMD_LIBRARY) | ||
set(COLAMD_LIBRARY_NAME colamd) | ||
- find_library(COLAMD_LIBRARY ${COLAMD_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
+ find_library(COLAMD_LIBRARY ${COLAMD_LIBRARY_NAME} ${KLU_LIBRARY_DIR}) | ||
mark_as_advanced(COLAMD_LIBRARY) | ||
endif () | ||
|
||
if (NOT BTF_LIBRARY) | ||
set(BTF_LIBRARY_NAME btf) | ||
- find_library( BTF_LIBRARY ${BTF_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
+ find_library( BTF_LIBRARY ${BTF_LIBRARY_NAME} ${KLU_LIBRARY_DIR}) | ||
mark_as_advanced(BTF_LIBRARY) | ||
endif () | ||
|
||
@@ -83,7 +83,7 @@ | ||
if(WIN32 AND NOT MSYS) | ||
set(CMAKE_FIND_LIBRARY_PREFIXES "") | ||
endif() | ||
- find_library( SUITESPARSECONFIG_LIBRARY ${SUITESPARSECONFIG_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
+ find_library( SUITESPARSECONFIG_LIBRARY ${SUITESPARSECONFIG_LIBRARY_NAME} ${KLU_LIBRARY_DIR}) | ||
mark_as_advanced(SUITESPARSECONFIG_LIBRARY) | ||
endif () | ||
|