summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/blaspp/package.py
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2021-02-23 00:16:02 -0800
committerGitHub <noreply@github.com>2021-02-23 09:16:02 +0100
commitbcc370102f4ce254d32d7305c96679eaeee5371e (patch)
treeda12d78b9809f3f3ea8f4278b03e098b90b3258e /var/spack/repos/builtin/packages/blaspp/package.py
parent7226bd64dc3b46a1ed361f1e9d7fb4a2a5b65200 (diff)
downloadspack-bcc370102f4ce254d32d7305c96679eaeee5371e.tar.gz
spack-bcc370102f4ce254d32d7305c96679eaeee5371e.tar.bz2
spack-bcc370102f4ce254d32d7305c96679eaeee5371e.tar.xz
spack-bcc370102f4ce254d32d7305c96679eaeee5371e.zip
openblas: add "locking" variant, updated blaspp (#21770)
BlasPP by ECP SLATE will fail to install by default (`spack install blaspp`) because: - the default BLAS installation in Spack is OpenBLAS - BlasPP conflicts with `threads=none` for all recent OpenBLAS releases OpenBLAS introduced a threadsafe compile option with 0.3.7+ aka `USE_LOCKING`: ``` 61 # If you want to build a single-threaded OpenBLAS, but expect to call this 62 # from several concurrent threads in some other program, comment this in for 63 # thread safety. (This is done automatically for USE_THREAD=1 , and should not 64 # be necessary when USE_OPENMP=1) 65 # USE_LOCKING = 1 ``` According to tests, with `spack install --test root blaspp`, this exactly addresses the issues in BlasPP tests. It also seems to be a good option to set by default for OpenBLAS and users that do not need this safety net can always disable it. Solve issues with newer OpenBLAS by requiring `+locking` over none-default threading options.
Diffstat (limited to 'var/spack/repos/builtin/packages/blaspp/package.py')
-rw-r--r--var/spack/repos/builtin/packages/blaspp/package.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py
index 78532c1fb1..2a012c1ec1 100644
--- a/var/spack/repos/builtin/packages/blaspp/package.py
+++ b/var/spack/repos/builtin/packages/blaspp/package.py
@@ -29,8 +29,13 @@ class Blaspp(CMakePackage, CudaPackage):
depends_on('cmake@3.15.0:', type='build')
depends_on('blas')
+ # only supported with clingo solver: virtual dependency preferences
+ # depends_on('openblas threads=openmp', when='+openmp ^openblas')
+
# BLASpp tests will fail when using openblas > 0.3.5 without multithreading support
- conflicts('^openblas@0.3.6: threads=none', msg='BLASpp requires openblas multithreading support')
+ # locking is only supported in openblas 3.7+
+ conflicts('^openblas@0.3.6 threads=none', msg='BLASpp requires a threadsafe openblas')
+ conflicts('^openblas@0.3.7: ~locking', msg='BLASpp requires a threadsafe openblas')
def cmake_args(self):
spec = self.spec