Gromacs CUDA patch + some version constraints (#22851)
This commit is contained in:
parent
4807956977
commit
4adb76c4c5
@ -54,6 +54,7 @@ class Gromacs(CMakePackage):
|
||||
version('5.1.5', sha256='c25266abf07690ecad16ed3996899b1d489cbb1ef733a1befb3b5c75c91a703e')
|
||||
version('5.1.4', sha256='0f3793d8f1f0be747cf9ebb0b588fb2b2b5dc5acc32c3046a7bee2d2c03437bc')
|
||||
version('5.1.2', sha256='39d6f1d7ae8ba38cea6089da40676bfa4049a49903d21551abc030992a58f304')
|
||||
version('4.6.7', sha256='6afb1837e363192043de34b188ca3cf83db6bd189601f2001a1fc5b0b2a214d9')
|
||||
version('4.5.5', sha256='e0605e4810b0d552a8761fef5540c545beeaf85893f4a6e21df9905a33f871ba')
|
||||
|
||||
variant('mpi', default=True, description='Activate MPI support')
|
||||
@ -115,10 +116,11 @@ class Gromacs(CMakePackage):
|
||||
depends_on('lapack', when='+lapack')
|
||||
depends_on('blas', when='+blas')
|
||||
|
||||
depends_on('hwloc', when='+hwloc')
|
||||
depends_on('hwloc@1:1.999', when='+hwloc@2016:2018.999')
|
||||
depends_on('hwloc', when='+hwloc@2019:')
|
||||
|
||||
patch('gmxDetectCpu-cmake-3.14.patch', when='@2018:2019.3^cmake@3.14.0:')
|
||||
patch('gmxDetectSimd-cmake-3.14.patch', when='@:2017.99^cmake@3.14.0:')
|
||||
patch('gmxDetectSimd-cmake-3.14.patch', when='@5.0:2017.99^cmake@3.14.0:')
|
||||
|
||||
filter_compiler_wrappers(
|
||||
'*.cmake',
|
||||
@ -135,6 +137,33 @@ def patch(self):
|
||||
# Disable obsolete workaround
|
||||
filter_file('ifdef __PGI', 'if 0', 'src/gromacs/fileio/xdrf.h')
|
||||
|
||||
if '+cuda' in self.spec:
|
||||
# Upstream supports building of last two major versions of Gromacs.
|
||||
# Older versions of Gromacs need to be patched to build with more recent
|
||||
# versions of CUDA library.
|
||||
|
||||
# Hardware version 3.0 is supported up to CUDA 10.2 (Gromacs 4.6-2020.3
|
||||
# needs to be patched, 2020.4 is handling it correctly)
|
||||
|
||||
if self.spec.satisfies('@4.6:2020.3^cuda@11:'):
|
||||
filter_file(r'-gencode;arch=compute_30,code=sm_30;?', '',
|
||||
'cmake/gmxManageNvccConfig.cmake')
|
||||
filter_file(r'-gencode;arch=compute_30,code=compute_30;?', '',
|
||||
'cmake/gmxManageNvccConfig.cmake')
|
||||
|
||||
# Hardware version 2.0 is supported up to CUDA 8 (Gromacs 4.6-2016.3
|
||||
# needs to be patched, 2016.4 is handling it correctly, removed in 2019)
|
||||
|
||||
if self.spec.satisfies('@4.6:2016.3^cuda@9:'):
|
||||
filter_file(r'-gencode;arch=compute_20,code=sm_20;?', '',
|
||||
'cmake/gmxManageNvccConfig.cmake')
|
||||
filter_file(r'-gencode;arch=compute_20,code=compute_20;?', '',
|
||||
'cmake/gmxManageNvccConfig.cmake')
|
||||
|
||||
if self.spec.satisfies('@4.6:5.0.999^cuda@9:'):
|
||||
filter_file(r'-gencode;arch=compute_20,code=sm_21;?', '',
|
||||
'cmake/gmxManageNvccConfig.cmake')
|
||||
|
||||
def cmake_args(self):
|
||||
|
||||
options = []
|
||||
|
Loading…
Reference in New Issue
Block a user