From 3812edd0db57db1fc10eb9bcc1201bc5a5d19aa2 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Sun, 13 Nov 2022 19:47:24 -0800 Subject: [plasma] add support for building with 'cray-libsci' (#33869) --- var/spack/repos/builtin/packages/plasma/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- cgit v1.2.3-70-g09d2