From 7bae865c7e2f2d09a002bb491f423408df3ee8dd Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 31 May 2021 16:16:00 +0200 Subject: Propagate openmp to blas for sirius and spla (#24027) And also update lowerbounds of dependencies --- var/spack/repos/builtin/packages/sirius/package.py | 32 ++++++++++++++-------- var/spack/repos/builtin/packages/spla/package.py | 6 ++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py index fa4ce5cc36..ce09e01037 100644 --- a/var/spack/repos/builtin/packages/sirius/package.py +++ b/var/spack/repos/builtin/packages/sirius/package.py @@ -79,7 +79,8 @@ class Sirius(CMakePackage, CudaPackage): depends_on('gsl') depends_on('lapack') depends_on('fftw-api@3') - depends_on('libxc') + depends_on('libxc@3.0.0:') + depends_on('libxc@4.0.0:', when='@7.2.0:') depends_on('spglib') depends_on('hdf5+hl') depends_on('pkgconfig', type='build') @@ -94,20 +95,20 @@ class Sirius(CMakePackage, CudaPackage): depends_on('magma', when='+magma') depends_on('boost cxxstd=14 +filesystem', when='+boost_filesystem') - depends_on('spfft@1.0.3:', when='@6.4.0:') - depends_on('spfft+cuda', when='@6.4.0:+cuda') - depends_on('spfft+rocm', when='@6.4.0:+rocm') + depends_on('spfft@0.9.6: +mpi', when='@6.4.0:') + depends_on('spfft@0.9.13:', when='@7.0.1:') + depends_on('spfft+cuda', when='+cuda ^spfft') + depends_on('spfft+rocm', when='+rocm ^spfft') + depends_on('spfft+openmp', when='+openmp ^spfft') - depends_on('spla@1.4.0:', when='@7.0.0:') - depends_on('spla+cuda', when='@7.0.0:+cuda') - depends_on('spla+rocm', when='@7.0.0:+rocm') - - depends_on('elpa+openmp', when='+elpa+openmp') - depends_on('elpa~openmp', when='+elpa~openmp') + depends_on('spla@1.1.0:', when='@7.0.2:') + depends_on('spla+cuda', when='+cuda ^spla') + depends_on('spla+rocm', when='+rocm ^spla') + depends_on('spla+openmp', when='+openmp ^spla') depends_on('nlcglib', when='+nlcglib') - depends_on('libvdwxc+mpi', when='+vdwxc') + depends_on('libvdwxc@0.3.0:+mpi', when='+vdwxc') depends_on('scalapack', when='+scalapack') @@ -126,6 +127,15 @@ class Sirius(CMakePackage, CudaPackage): conflicts('+boost_filesystem', when='~apps') conflicts('^libxc@5.0.0') # known to produce incorrect results + # Propagate openmp to blas + depends_on('openblas threads=openmp', when='+openmp ^openblas') + depends_on('amdblis threads=openmp', when='+openmp ^amdblis') + depends_on('blis threads=openmp', when='+openmp ^blis') + depends_on('intel-mkl threads=openmp', when='+openmp ^intel-mkl') + + depends_on('elpa+openmp', when='+elpa+openmp') + depends_on('elpa~openmp', when='+elpa~openmp') + # TODO: # add support for CRAY_LIBSCI, testing diff --git a/var/spack/repos/builtin/packages/spla/package.py b/var/spack/repos/builtin/packages/spla/package.py index a4fe79a47e..75c264ffc0 100644 --- a/var/spack/repos/builtin/packages/spla/package.py +++ b/var/spack/repos/builtin/packages/spla/package.py @@ -43,6 +43,12 @@ class Spla(CMakePackage): depends_on('hsakmt-roct', when='+rocm', type='link') depends_on('hsa-rocr-dev', when='+rocm', type='link') + # Propagate openmp to blas + depends_on('openblas threads=openmp', when='+openmp ^openblas') + depends_on('amdblis threads=openmp', when='+openmp ^amdblis') + depends_on('blis threads=openmp', when='+openmp ^blis') + depends_on('intel-mkl threads=openmp', when='+openmp ^intel-mkl') + def cmake_args(self): args = [ self.define_from_variant('SPLA_OMP', 'openmp'), -- cgit v1.2.3-70-g09d2