summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorg-mathias <40861554+g-mathias@users.noreply.github.com>2020-08-07 15:03:14 +0200
committerGitHub <noreply@github.com>2020-08-07 07:03:14 -0600
commitc1efa09928b540f9350d9b29503f1c5e1a38aa23 (patch)
tree69d28939ca85c4e461add68a9e1f058c22909d0b /var
parent6fc6f1ea9d8d7142ea3374b9a54d053b1f0d1dd4 (diff)
downloadspack-c1efa09928b540f9350d9b29503f1c5e1a38aa23.tar.gz
spack-c1efa09928b540f9350d9b29503f1c5e1a38aa23.tar.bz2
spack-c1efa09928b540f9350d9b29503f1c5e1a38aa23.tar.xz
spack-c1efa09928b540f9350d9b29503f1c5e1a38aa23.zip
gromacs: new version 2020.3; variant nosuffix and mkl support (#17908)
* new version 2020.3; new variants nosuffix and fft; version selections for plumed * fixed too long lines * fixed whitespaces * revised fft interface according to @haampie 's suggestions Co-authored-by: lu64bag3 <gerald.mathias@lrz.de>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py44
1 files changed, 38 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index 31b5d701fe..8042e38864 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -24,6 +24,7 @@ class Gromacs(CMakePackage):
maintainers = ['junghans', 'marvinbernhardt']
version('master', branch='master')
+ version('2020.3', sha256='903183691132db14e55b011305db4b6f4901cc4912d2c56c131edfef18cc92a9')
version('2020.2', sha256='7465e4cd616359d84489d919ec9e4b1aaf51f0a4296e693c249e83411b7bd2f3')
version('2020.1', sha256='e1666558831a3951c02b81000842223698016922806a8ce152e8f616e29899cf')
version('2020', sha256='477e56142b3dcd9cb61b8f67b24a55760b04d1655e8684f979a75a5eec40ba01')
@@ -58,23 +59,37 @@ class Gromacs(CMakePackage):
description='Produces a double precision version of the executables')
variant('plumed', default=False, description='Enable PLUMED support')
variant('cuda', default=False, description='Enable CUDA support')
+ variant('nosuffix', default=False, description='Disable default suffixes')
variant('build_type', default='RelWithDebInfo',
description='The build type to build',
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel',
'Reference', 'RelWithAssert', 'Profile'))
- variant('rdtscp', default=True, description='Enable RDTSCP instruction usage')
+ variant('rdtscp', default=True,
+ description='Enable RDTSCP instruction usage')
variant('mdrun_only', default=False,
description='Enables the build of a cut-down version'
' of libgromacs and/or the mdrun program')
- variant('openmp', default=True, description='Enables OpenMP at configure time')
- variant('double_precision', default=False, description='Enables a double-precision configuration')
- variant('hwloc', default=True, description='Use the hwloc portable hardware locality library')
+ variant('openmp', default=True,
+ description='Enables OpenMP at configure time')
+ variant('double_precision', default=False,
+ description='GMX_RELAXED_DOUBLE_PRECISION for Fujitsu PRIMEHPC')
+ variant('hwloc', default=True,
+ description='Use the hwloc portable hardware locality library')
depends_on('mpi', when='+mpi')
+ # define matching plumed versions
+ depends_on('plumed@2.6.0:2.6.9+mpi', when='@2020.2+plumed+mpi')
+ depends_on('plumed@2.6.0:2.6.9~mpi', when='@2020.2+plumed~mpi')
+ depends_on('plumed@2.6.0:2.6.9+mpi', when='@2019.6+plumed+mpi')
+ depends_on('plumed@2.6.0:2.6.9~mpi', when='@2019.6+plumed~mpi')
+ depends_on('plumed@2.5.0:2.5.9+mpi', when='@2019.4+plumed+mpi')
+ depends_on('plumed@2.5.0:2.5.9~mpi', when='@2019.4+plumed~mpi')
+ depends_on('plumed@2.5.0:2.5.9+mpi', when='@2018.6+plumed+mpi')
+ depends_on('plumed@2.5.0:2.5.9~mpi', when='@2018.6+plumed~mpi')
depends_on('plumed+mpi', when='+plumed+mpi')
depends_on('plumed~mpi', when='+plumed~mpi')
- depends_on('fftw+mpi', when='+mpi')
- depends_on('fftw~mpi', when='~mpi')
+ depends_on('fftw-api@3', when='~cuda')
+ depends_on('mkl', when='fft=mkl')
depends_on('cmake@2.8.8:3.99.99', type='build')
depends_on('cmake@3.4.3:3.99.99', type='build', when='@2018:')
depends_on('cmake@3.13.0:3.99.99', type='build', when='@master')
@@ -104,6 +119,9 @@ class Gromacs(CMakePackage):
if '+double' in self.spec:
options.append('-DGMX_DOUBLE:BOOL=ON')
+ if '+nosuffix' in self.spec:
+ options.append('-DGMX_DEFAULT_SUFFIX:BOOL=OFF')
+
if '~shared' in self.spec:
options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
@@ -174,4 +192,18 @@ class Gromacs(CMakePackage):
else:
options.append('-DGMX_RELAXED_DOUBLE_PRECISION:BOOL=OFF')
+ if '^mkl' in self.spec:
+ # fftw-api@3 is provided by intel-mkl or intel-parllel-studio
+ # we use the mkl interface of gromacs
+ options.append('-DGMX_FFT_LIBRARY=mkl')
+ options.append('-DMKL_INCLUDE_DIR={0}'.
+ format(self.spec['mkl'].headers.directories[0]))
+ # The 'blas' property provides a minimal set of libraries
+ # that is sufficient for fft. Using full mkl fails the cmake test
+ options.append('-DMKL_LIBRARIES={0}'.
+ format(self.spec['blas'].libs.joined(';')))
+ else:
+ # we rely on the fftw-api@3
+ options.append('-DGMX_FFT_LIBRARY=fftw3')
+
return options