summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAlberto Invernizzi <9337627+albestro@users.noreply.github.com>2024-02-07 17:01:11 +0100
committerGitHub <noreply@github.com>2024-02-07 17:01:11 +0100
commit9aed13adb93cfc2f3bcf68a7bf9d4b61e9a4483e (patch)
treedd3cc33709003ab02b45448922f61fc2c1f786e7 /var
parent85b6c344bd975a43bfea94033bb5d3383f318510 (diff)
downloadspack-9aed13adb93cfc2f3bcf68a7bf9d4b61e9a4483e.tar.gz
spack-9aed13adb93cfc2f3bcf68a7bf9d4b61e9a4483e.tar.bz2
spack-9aed13adb93cfc2f3bcf68a7bf9d4b61e9a4483e.tar.xz
spack-9aed13adb93cfc2f3bcf68a7bf9d4b61e9a4483e.zip
nvpl-blas and nvpl-lapack: new packages for NVidia performance libraries (#41775)
Co-authored-by: Raffaele SolcĂ  <rasolca@cscs.ch>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/nvpl-blas/package.py69
-rw-r--r--var/spack/repos/builtin/packages/nvpl-lapack/package.py69
2 files changed, 138 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nvpl-blas/package.py b/var/spack/repos/builtin/packages/nvpl-blas/package.py
new file mode 100644
index 0000000000..211717d2bb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvpl-blas/package.py
@@ -0,0 +1,69 @@
+# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class NvplBlas(Package):
+ """
+ NVPL BLAS (NVIDIA Performance Libraries BLAS) is part of NVIDIA Performance Libraries
+ that provides standard Fortran 77 BLAS APIs as well as C (CBLAS).
+ """
+
+ homepage = "https://docs.nvidia.com/nvpl/_static/blas/index.html"
+ url = (
+ "https://developer.download.nvidia.com/compute/nvpl/redist"
+ "/nvpl_blas/linux-sbsa/nvpl_blas-linux-sbsa-0.1.0-archive.tar.xz"
+ )
+
+ maintainers("albestro", "rasolca")
+
+ license("UNKNOWN")
+
+ version("0.1.0", sha256="4ccc894593cbcbfaa1a4f3c54505982691971667acf191c9ab0f4252a37c8063")
+
+ provides("blas")
+
+ variant("ilp64", default=False, description="Force 64-bit Fortran native integers")
+ variant(
+ "threads",
+ default="none",
+ description="Multithreading support",
+ values=("openmp", "none"),
+ multi=False,
+ )
+
+ requires("target=armv8.2a:", msg="Any CPU with Arm-v8.2a+ microarch")
+
+ conflicts("%gcc@:7")
+ conflicts("%clang@:13")
+
+ conflicts("threads=openmp", when="%clang")
+
+ @property
+ def blas_headers(self):
+ return find_all_headers(self.spec.prefix.include)
+
+ @property
+ def blas_libs(self):
+ spec = self.spec
+
+ if "+ilp64" in spec:
+ int_type = "ilp64"
+ else:
+ int_type = "lp64"
+
+ if spec.satisfies("threads=openmp"):
+ threading_type = "gomp"
+ else:
+ # threads=none
+ threading_type = "seq"
+
+ name = ["libnvpl_blas_core", f"libnvpl_blas_{int_type}_{threading_type}"]
+
+ return find_libraries(name, spec.prefix.lib, shared=True, recursive=True)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/nvpl-lapack/package.py b/var/spack/repos/builtin/packages/nvpl-lapack/package.py
new file mode 100644
index 0000000000..3a2aa064e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvpl-lapack/package.py
@@ -0,0 +1,69 @@
+# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class NvplLapack(Package):
+ """
+ NVPL LAPACK (NVIDIA Performance Libraries LAPACK) is part of NVIDIA Performance Libraries
+ that provides standard Fortran 90 LAPACK APIs.
+ """
+
+ homepage = "https://docs.nvidia.com/nvpl/_static/lapack/index.html"
+ url = (
+ "https://developer.download.nvidia.com/compute/nvpl/redist"
+ "/nvpl_lapack/linux-sbsa/nvpl_lapack-linux-sbsa-0.2.0.1-archive.tar.xz"
+ )
+
+ maintainers("albestro", "rasolca")
+
+ license("UNKNOWN")
+
+ version("0.1.0", sha256="7054f775b18916ee662c94ad7682ace53debbe8ee36fa926000fe412961edb0b")
+
+ provides("lapack")
+
+ variant("ilp64", default=False, description="Force 64-bit Fortran native integers")
+ variant(
+ "threads",
+ default="none",
+ description="Multithreading support",
+ values=("openmp", "none"),
+ multi=False,
+ )
+
+ requires("target=armv8.2a:", msg="Any CPU with Arm-v8.2a+ microarch")
+
+ conflicts("%gcc@:7")
+ conflicts("%clang@:13")
+
+ conflicts("threads=openmp", when="%clang")
+
+ @property
+ def lapack_headers(self):
+ return find_all_headers(self.spec.prefix.include)
+
+ @property
+ def lapack_libs(self):
+ spec = self.spec
+
+ if "+ilp64" in spec:
+ int_type = "ilp64"
+ else:
+ int_type = "lp64"
+
+ if spec.satisfies("threads=openmp"):
+ threading_type = "gomp"
+ else:
+ # threads=none
+ threading_type = "seq"
+
+ name = ["libnvpl_lapack_core", f"libnvpl_lapack_{int_type}_{threading_type}"]
+
+ return find_libraries(name, spec.prefix.lib, shared=True, recursive=True)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)