From d97f7b94f6c92678d9af9d12af14fcc0af376550 Mon Sep 17 00:00:00 2001 From: AlexanderRichert-NOAA Date: Thu, 15 Feb 2024 02:53:13 +0000 Subject: [PATCH] update spack package for lapack --- spack/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spack/package.py b/spack/package.py index 4854c5c3..f050edcb 100644 --- a/spack/package.py +++ b/spack/package.py @@ -89,6 +89,16 @@ def cmake_args(self): if self.spec.satisfies("@5:"): args.append(self.define_from_variant("BUILD_DEPRECATED", "deprecated")) + if self.spec.satisfies("@develop"): + # Use the LAPACK provider set by Spack even if the compiler supports native BLAS + bla_vendors = {"openblas": "OpenBLAS"} + lapack_provider = self.spec["lapack"].name + if lapack_provider in bla_vendors.keys(): + bla_vendor = bla_vendors[lapack_provider] + else: + bla_vendor = "All" + args.append(self.define("BLA_VENDOR", bla_vendor)) + return args def setup_run_environment(self, env):