summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeselin Dobrev <v-dobrev@users.noreply.github.com>2022-11-13 19:47:24 -0800
committerGitHub <noreply@github.com>2022-11-13 21:47:24 -0600
commit3812edd0db57db1fc10eb9bcc1201bc5a5d19aa2 (patch)
treeffd4f8be95be467b3baa99d7a3da00cb5e55237f
parent3ea9c8529ae5518e6e4663ae853010b51f997965 (diff)
downloadspack-adelie-v0.19.0.tar.gz
spack-adelie-v0.19.0.tar.bz2
spack-adelie-v0.19.0.tar.xz
spack-adelie-v0.19.0.zip
[plasma] add support for building with 'cray-libsci' (#33869)adelie-v0.19.0
-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