diff options
-rw-r--r-- | var/spack/repos/builtin/packages/gromacs/package.py | 44 |
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 |