summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/plasma/package.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/plasma/package.py b/var/spack/repos/builtin/packages/plasma/package.py
index f6f32d0629..fab8f1e1fe 100644
--- a/var/spack/repos/builtin/packages/plasma/package.py
+++ b/var/spack/repos/builtin/packages/plasma/package.py
@@ -85,6 +85,14 @@ class Plasma(CMakePackage):
patch("protect_cmake_version.patch", when="@19.8.0:19.8.9")
patch("fix_cmake_include.patch", when="@19.8.0:19.8.9")
+ @when("@22.9.29")
+ def patch(self):
+ filter_file(
+ "^(#define PLASMA_CORE_LAPACK_H)$",
+ '\\1\n\n#include "plasma_config.h"',
+ "include/core_lapack.h",
+ )
+
@when("@develop:")
def patch(self):
python("tools/generate_precisions.py")
@@ -107,6 +115,17 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
if package in self.spec:
for lib in ("CBLAS", "LAPACKE"):
options.append(self.define("{}_PROVIDER".format(lib), provider))
+ if "cray-libsci" in self.spec:
+ for lib in ("CBLAS", "LAPACKE"):
+ libsci_prefix = self.spec["cray-libsci"].package.external_prefix
+ options.append(self.define("{}_PROVIDER".format(lib), "generic"))
+ options.append(
+ self.define("{}_INCLUDE_DIRS".format(lib), join_path(libsci_prefix, "include"))
+ )
+ options.append(
+ self.define("{}_LIBRARIES".format(lib), self.spec["blas"].libs.joined(";"))
+ )
+ options.append(self.define("CBLAS_ADD_TYPEDEF", True))
return options