update CP2K pkg for 8+ (#18607)
* cp2k: do not support ~openmp for v8+ * sirius: version bump * cp2k: fix overlapping deps for elpa fixes #18029 * cp2k: update SIRIUS dependency for v8+ * spfft: requires CMake 3.11+ * cp2k: fix build with +sirius
This commit is contained in:
parent
34f4049815
commit
2bc9821c43
@ -30,7 +30,7 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
version('master', branch='master', submodules="True")
|
version('master', branch='master', submodules="True")
|
||||||
|
|
||||||
variant('mpi', default=True, description='Enable MPI support')
|
variant('mpi', default=True, description='Enable MPI support')
|
||||||
variant('openmp', default=False, description='Enable OpenMP support')
|
variant('openmp', default=True, description='Enable OpenMP support')
|
||||||
variant('smm', default='libxsmm', values=('libxsmm', 'libsmm', 'blas'),
|
variant('smm', default='libxsmm', values=('libxsmm', 'libsmm', 'blas'),
|
||||||
description='Library for small matrix multiplications')
|
description='Library for small matrix multiplications')
|
||||||
variant('plumed', default=False, description='Enable PLUMED support')
|
variant('plumed', default=False, description='Enable PLUMED support')
|
||||||
@ -103,10 +103,10 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
depends_on('cosma+scalapack', when='+cosma')
|
depends_on('cosma+scalapack', when='+cosma')
|
||||||
depends_on('cosma+cuda+scalapack', when='+cosma+cuda')
|
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: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:2017.11+openmp', when='+openmp+elpa@6.0:6.999')
|
||||||
depends_on('elpa@2018.05:+openmp', when='+openmp+elpa@7.0:')
|
depends_on('elpa@2018.05:+openmp', when='+openmp+elpa@7.0:')
|
||||||
depends_on('elpa@2011.12:2016.13~openmp', when='~openmp+elpa@:5.999')
|
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:2017.11~openmp', when='~openmp+elpa@6.0:6.999')
|
||||||
depends_on('elpa@2018.05:~openmp', when='~openmp+elpa@7.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')
|
||||||
depends_on('plumed+shared~mpi', when='+plumed~mpi')
|
depends_on('plumed+shared~mpi', when='+plumed~mpi')
|
||||||
@ -119,8 +119,10 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
# only OpenMP should be consistenly used, all other common things
|
# only OpenMP should be consistenly used, all other common things
|
||||||
# like ELPA, SCALAPACK are independent and Spack will ensure that
|
# like ELPA, SCALAPACK are independent and Spack will ensure that
|
||||||
# a consistent/compat. combination is pulled in to the dependency graph.
|
# a consistent/compat. combination is pulled in to the dependency graph.
|
||||||
depends_on('sirius+fortran+vdwxc+shared+openmp', when='+sirius+openmp')
|
depends_on('sirius@:6.999+fortran+vdwxc+shared+openmp', when='@:7.999+sirius+openmp')
|
||||||
depends_on('sirius+fortran+vdwxc+shared~openmp', when='+sirius~openmp')
|
depends_on('sirius@:6.999+fortran+vdwxc+shared~openmp', when='@:7.999+sirius~openmp')
|
||||||
|
|
||||||
|
depends_on('sirius@7:+fortran+vdwxc+shared+openmp', when='@8:+sirius+openmp')
|
||||||
|
|
||||||
# the bundled libcusmm uses numpy in the parameter prediction (v7+)
|
# the bundled libcusmm uses numpy in the parameter prediction (v7+)
|
||||||
# which is written using Python 3
|
# which is written using Python 3
|
||||||
@ -152,6 +154,8 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
# cp2k with option smm=blas on aarch64
|
# cp2k with option smm=blas on aarch64
|
||||||
conflicts('smm=libxsmm', when='target=aarch64:', msg='libxsmm is not available on arm')
|
conflicts('smm=libxsmm', when='target=aarch64:', msg='libxsmm is not available on arm')
|
||||||
|
|
||||||
|
conflicts('~openmp', when='@8:', msg='Building without OpenMP is not supported in CP2K 8+')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def makefile_architecture(self):
|
def makefile_architecture(self):
|
||||||
return '{0.architecture}-{0.compiler.name}'.format(self.spec)
|
return '{0.architecture}-{0.compiler.name}'.format(self.spec)
|
||||||
@ -432,7 +436,7 @@ def edit(self, spec, prefix):
|
|||||||
if spec.satisfies('+sirius'):
|
if spec.satisfies('+sirius'):
|
||||||
sirius = spec['sirius']
|
sirius = spec['sirius']
|
||||||
cppflags.append('-D__SIRIUS')
|
cppflags.append('-D__SIRIUS')
|
||||||
fcflags += ['-I{0}'.format(os.path.join(sirius.prefix, 'fortran'))]
|
fcflags += ['-I{0}'.format(sirius.prefix.include.sirius)]
|
||||||
libs += list(sirius.libs)
|
libs += list(sirius.libs)
|
||||||
|
|
||||||
if spec.satisfies('+cuda'):
|
if spec.satisfies('+cuda'):
|
||||||
|
@ -21,7 +21,9 @@ class Sirius(CMakePackage, CudaPackage):
|
|||||||
version('develop', branch='develop')
|
version('develop', branch='develop')
|
||||||
version('master', branch='master')
|
version('master', branch='master')
|
||||||
|
|
||||||
version('6.5.6', sha256='c8120100bde4477545eae489ea7f9140d264a3f88696ec92728616d78f214cae')
|
version('7.0.0', sha256='da783df11e7b65668e29ba8d55c8a6827e2216ad6d88040f84f42ac20fd1bb99')
|
||||||
|
version('6.5.6', sha256='c8120100bde4477545eae489ea7f9140d264a3f88696ec92728616d78f214cae',
|
||||||
|
preferred=True)
|
||||||
version('6.5.5', sha256='0b23d3a8512682eea67aec57271031c65f465b61853a165015b38f7477651dd1')
|
version('6.5.5', sha256='0b23d3a8512682eea67aec57271031c65f465b61853a165015b38f7477651dd1')
|
||||||
version('6.5.4', sha256='5f731926b882a567d117afa5e0ed33291f1db887fce52f371ba51f014209b85d')
|
version('6.5.4', sha256='5f731926b882a567d117afa5e0ed33291f1db887fce52f371ba51f014209b85d')
|
||||||
version('6.5.3', sha256='eae0c303f332425a8c792d4455dca62557931b28a5df8b4c242652d5ffddd580')
|
version('6.5.3', sha256='eae0c303f332425a8c792d4455dca62557931b28a5df8b4c242652d5ffddd580')
|
||||||
|
@ -34,6 +34,7 @@ class Spfft(CMakePackage, CudaPackage):
|
|||||||
values=('Debug', 'Release', 'RelWithDebInfo'))
|
values=('Debug', 'Release', 'RelWithDebInfo'))
|
||||||
depends_on('fftw-api@3')
|
depends_on('fftw-api@3')
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
|
depends_on('cmake@3.11:', type='build')
|
||||||
|
|
||||||
# ROCM variants + dependencies
|
# ROCM variants + dependencies
|
||||||
variant('rocm', default=False, description="Use ROCm backend")
|
variant('rocm', default=False, description="Use ROCm backend")
|
||||||
|
Loading…
Reference in New Issue
Block a user