diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cp2k/package.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index e551e790a7..734b2c0aa3 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -20,6 +20,7 @@ class Cp2k(MakefilePackage, CudaPackage): git = 'https://github.com/cp2k/cp2k.git' list_url = 'https://github.com/cp2k/cp2k/releases' + version('7.1', sha256='ccd711a09a426145440e666310dd01cc5772ab103493c4ae6a3470898cd0addb') version('6.1', sha256='af803558e0a6b9e9d9ce8a3ab955ba32bacd179922455424e061c82c9fefa34b') version('5.1', sha256='e23613b593354fa82e0b8410e17d94c607a0b8c6d9b5d843528403ab09904412') version('4.1', sha256='4a3e4a101d8a35ebd80a9e9ecb02697fb8256364f1eccdbe4e5a85d31fe21343') @@ -43,6 +44,7 @@ class Cp2k(MakefilePackage, CudaPackage): variant('sirius', default=False, description=('Enable planewave electronic structure' ' calculations via SIRIUS')) + variant('cosma', default=False, description='Use COSMA for p?gemm') # override cuda_arch from CudaPackage since we only support one arch # at a time and only specific ones for which we have parameter files @@ -104,10 +106,13 @@ class Cp2k(MakefilePackage, CudaPackage): depends_on('mpi@2:', when='+mpi') depends_on('scalapack', when='+mpi') + depends_on('cosma+scalapack', when='+cosma') + depends_on('cosma+cuda+scalapack', when='+cosma+cuda') depends_on('elpa@2011.12:2016.13+openmp', when='+openmp+elpa@:5.999') depends_on('elpa@2011.12:2017.11+openmp', when='+openmp+elpa@6.0:') depends_on('elpa@2011.12:2016.13~openmp', when='~openmp+elpa@:5.999') depends_on('elpa@2011.12:2017.11~openmp', when='~openmp+elpa@6.0:') + depends_on('elpa@2018.05:~openmp', when='~openmp+elpa@7.0:') depends_on('plumed+shared+mpi', when='+plumed+mpi') depends_on('plumed+shared~mpi', when='+plumed~mpi') @@ -123,13 +128,17 @@ class Cp2k(MakefilePackage, CudaPackage): depends_on('sirius+fortran+vdwxc+shared~openmp', when='+sirius~openmp') # the bundled libcusmm uses numpy in the parameter prediction (v7+) + # which is written using Python 3 depends_on('py-numpy', when='@7:+cuda', type='build') + depends_on('python@3.6:', when='@7:+cuda', type='build') - # PEXSI, ELPA and SIRIUS need MPI in CP2K + # PEXSI, ELPA, COSMA and SIRIUS depend on MPI conflicts('~mpi', '+pexsi') conflicts('~mpi', '+elpa') conflicts('~mpi', '+sirius') + conflicts('~mpi', '+cosma') conflicts('+sirius', '@:6.999') # sirius support was introduced in 7+ + conflicts('+cosma', '@:7.999') # COSMA support was introduced in 8+ conflicts('~cuda', '+cuda_fft') conflicts('~cuda', '+cuda_blas') @@ -286,6 +295,12 @@ class Cp2k(MakefilePackage, CudaPackage): elif self.spec.variants['blas'].value == 'accelerate': cppflags += ['-D__ACCELERATE'] + if '+cosma' in spec: + # add before ScaLAPACK to override the p?gemm symbols + cosma = spec['cosma'].libs + ldflags.append(cosma.search_flags) + libs.extend(cosma) + # MPI if '+mpi' in self.spec: cppflags.extend([ |