cray-libsci/cp2k: add constraints to get consistently linked executables (#29396)

* cray-libsci: only be a provider for scalapack with +mpi

If a package explicitly links the scalapack provider we might otherwise end up with different variants of libsci being linked: the explicitly linked one and the one added by the Cray compiler wrappers.

* cp2k: require cray-libsci+openmp with +openmp for consistency

otherwise we might get 2 different libsci linked: one explicitly, the other one via the Cray compiler wrappers, leading at least to segfaults during cleanup

* cp2k: depend on cray-fftw+openmp with +openmp
This commit is contained in:
Tiziano Müller 2022-03-08 19:32:15 +01:00 committed by GitHub
parent 5bea24526f
commit 94ce7f5040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -83,7 +83,12 @@ class Cp2k(MakefilePackage, CudaPackage):
with when('+openmp'):
depends_on('fftw+openmp', when='^fftw')
depends_on('amdfftw+openmp', when='^amdfftw')
depends_on('cray-fftw+openmp', when='^cray-fftw')
depends_on('openblas threads=openmp', when='^openblas')
# The Cray compiler wrappers will automatically add libsci_mp with
# -fopenmp. Since CP2K unconditionally links blas/lapack/scalapack
# we have to be consistent.
depends_on('cray-libsci+openmp', when='^cray-libsci')
with when('smm=libxsmm'):
depends_on('libxsmm@1.17:~header-only', when='@9.1:')

View File

@ -30,7 +30,7 @@ class CrayLibsci(Package):
provides("blas")
provides("lapack")
provides("scalapack")
provides("scalapack", when="+mpi")
canonical_names = {
'gcc': 'GNU',