diff options
-rw-r--r-- | var/spack/repos/builtin/packages/cp2k/package.py | 28 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libvdwxc/package.py | 4 |
2 files changed, 6 insertions, 26 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: diff --git a/var/spack/repos/builtin/packages/libvdwxc/package.py b/var/spack/repos/builtin/packages/libvdwxc/package.py index 786561ce42..2e0934ab2f 100644 --- a/var/spack/repos/builtin/packages/libvdwxc/package.py +++ b/var/spack/repos/builtin/packages/libvdwxc/package.py @@ -19,13 +19,13 @@ class Libvdwxc(AutotoolsPackage): variant("mpi", default=True, description="Enable MPI support") variant("pfft", default=False, description="Enable support for PFFT") - depends_on("fftw@3:", when="~mpi") + depends_on("fftw-api@3") depends_on("mpi@2:", when="+mpi") - depends_on("fftw@3:+mpi", when="+mpi") depends_on("pfft", when="+pfft") # pfft needs MPI conflicts("~mpi", "+pfft") + conflicts("^fftw~mpi", "+mpi") def configure_args(self): spec = self.spec |