summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2023-04-22 03:02:28 -0400
committerGitHub <noreply@github.com>2023-04-22 09:02:28 +0200
commitd443a44854d3fa989b772f56bf0de3a17b73db7f (patch)
treec06b9278763d1d820b25f0636c88e6e92788506d /var
parent6808df572934949bbe70e618ac70a17808d1532e (diff)
downloadspack-d443a44854d3fa989b772f56bf0de3a17b73db7f.tar.gz
spack-d443a44854d3fa989b772f56bf0de3a17b73db7f.tar.bz2
spack-d443a44854d3fa989b772f56bf0de3a17b73db7f.tar.xz
spack-d443a44854d3fa989b772f56bf0de3a17b73db7f.zip
openblas: New version 0.3.23 (#36986)
Silence make Set a fixed and large NUM_THREADS by default, to avoid that it gets initialized with the host # CPUs. Set OMP_NUM_THREADS/OPENBLAS_NUM_THREADS in terms of make_jobs so that tests don't need excessive CPU. Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index c06fd91203..a4f0e28b43 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -20,6 +20,8 @@ class Openblas(MakefilePackage):
libraries = ["libopenblas"]
version("develop", branch="develop")
+ version("0.3.23", sha256="5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114")
+ version("0.3.22", sha256="7fa9685926ba4f27cfe513adbf9af64d6b6b63f9dcabb37baefad6a65ff347a7")
version("0.3.21", sha256="f36ba3d7a60e7c8bcc54cd9aaa9b1223dd42eaf02c811791c37e8ca707c241ca")
version("0.3.20", sha256="8495c9affc536253648e942908e88e097f2ec7753ede55aca52e5dead3029e3c")
version("0.3.19", sha256="947f51bfe50c2a0749304fbe373e00e7637600b0a47b78a51382aeb30ca08562")
@@ -339,6 +341,15 @@ class Openblas(MakefilePackage):
return args
+ def setup_build_environment(self, env):
+ # When building OpenBLAS with threads=openmp, `make all`
+ # runs tests, so we set the max number of threads at runtime
+ # accordingly
+ if self.spec.satisfies("threads=openmp"):
+ env.set("OMP_NUM_THREADS", str(make_jobs))
+ elif self.spec.satisfies("threads=pthreads"):
+ env.set("OPENBLAS_NUM_THREADS", str(make_jobs))
+
@property
def make_defs(self):
# Configure fails to pick up fortran from FC=/abs/path/to/fc, but
@@ -422,6 +433,10 @@ class Openblas(MakefilePackage):
if self.spec.satisfies("+bignuma"):
make_defs.append("BIGNUMA=1")
+ # Avoid that NUM_THREADS gets initialized with the host's number of CPUs.
+ if self.spec.satisfies("threads=openmp") or self.spec.satisfies("threads=pthreads"):
+ make_defs.append("NUM_THREADS=512")
+
return make_defs
@property
@@ -448,7 +463,7 @@ class Openblas(MakefilePackage):
@property
def build_targets(self):
- return self.make_defs + ["all"]
+ return ["-s"] + self.make_defs + ["all"]
@run_after("build")
@on_package_attributes(run_tests=True)