From 6d64ffdd1a686807d6a836a2b307126a3a11c2fb Mon Sep 17 00:00:00 2001 From: Annop Wongwathanarat Date: Thu, 22 Dec 2022 08:50:51 +0000 Subject: [PATCH] quantum-espresso: enable linking with armpl-gcc and acfl for BLAS and FFT (#34416) --- .../repos/builtin/packages/quantum-espresso/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index c6b930dec86..022073a9b4d 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -74,6 +74,8 @@ class QuantumEspresso(CMakePackage, Package): depends_on("openblas threads=openmp", when="^openblas") depends_on("amdblis threads=openmp", when="^amdblis") depends_on("intel-mkl threads=openmp", when="^intel-mkl") + depends_on("armpl-gcc threads=openmp", when="^armpl-gcc") + depends_on("acfl threads=openmp", when="^acfl") # Add Cuda Fortran support # depends on NVHPC compiler, not directly on CUDA toolkit @@ -407,6 +409,13 @@ def cmake_args(self): if "+qmcpack" in spec: cmake_args.append(self.define("QE_ENABLE_PW2QMCPACK", True)) + if "^armpl-gcc" in spec or "^acfl" in spec: + cmake_args.append(self.define("BLAS_LIBRARIES", spec["blas"].libs.joined(";"))) + cmake_args.append(self.define("LAPACK_LIBRARIES", spec["lapack"].libs.joined(";"))) + # Up to q-e@7.1 set BLA_VENDOR to All to force detection of vanilla scalapack + if spec.satisfies("@:7.1"): + cmake_args.append(self.define("BLA_VENDOR", "All")) + return cmake_args