summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/cp2k/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/cp2k/package.py')
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py28
1 files changed, 4 insertions, 24 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index ab17b7ca2a..486221957a 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -154,6 +154,10 @@ class Cp2k(MakefilePackage, CudaPackage):
# cp2k with option smm=blas on aarch64
conflicts('smm=libxsmm', when='target=aarch64:', msg='libxsmm is not available on arm')
+ conflicts('^fftw~openmp', when='+openmp')
+ conflicts('^openblas threads=none', when='+openmp')
+ conflicts('^openblas threads=pthreads', when='+openmp')
+
conflicts('~openmp', when='@8:', msg='Building without OpenMP is not supported in CP2K 8+')
@property
@@ -178,31 +182,7 @@ class Cp2k(MakefilePackage, CudaPackage):
def archive_files(self):
return [os.path.join(self.stage.source_path, self.makefile)]
- def consistency_check(self, spec):
- """
- Consistency checks.
- Due to issue #1712 we can not put them into depends_on/conflicts.
- """
-
- if '+openmp' in spec:
- if '^openblas' in spec and '^openblas threads=openmp' not in spec:
- raise InstallError(
- '^openblas threads=openmp required for cp2k+openmp'
- ' with openblas')
-
- if '^fftw' in spec and '^fftw +openmp' not in spec:
- raise InstallError(
- '^fftw +openmp required for cp2k+openmp'
- ' with fftw')
-
- # MKL doesn't need to be checked since they are
- # OMP thread-safe when using mkl_sequential
- # BUT: we should check the version of MKL IF it is used for FFTW
- # since there we need at least v14 of MKL to be safe!
-
def edit(self, spec, prefix):
- self.consistency_check(spec)
-
pkgconf = which('pkg-config')
if '^fftw' in spec: