summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTiziano Müller <tiziano.mueller@hpe.com>2021-12-02 00:00:01 +0100
committerGitHub <noreply@github.com>2021-12-01 17:00:01 -0600
commit08b00f8804c988d95430ff9087894f9e5c7712cc (patch)
treec4714b675ddb865fa6b690d991a60cdb07d0e4cc /var
parent326acea29dbb077a31180c439db079bf5ea272ea (diff)
downloadspack-08b00f8804c988d95430ff9087894f9e5c7712cc.tar.gz
spack-08b00f8804c988d95430ff9087894f9e5c7712cc.tar.bz2
spack-08b00f8804c988d95430ff9087894f9e5c7712cc.tar.xz
spack-08b00f8804c988d95430ff9087894f9e5c7712cc.zip
cp2k: fix build issues without cuda, and with elpa on openSUSE (#27738)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 42958771ff..18ec324a7e 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -486,11 +486,11 @@ class Cp2k(MakefilePackage, CudaPackage):
# Currently AOCC support only static libraries of ELPA
if '%aocc' in spec:
- libs.append(join_path(elpa.prefix.lib,
+ libs.append(join_path(elpa.libs.directories[0],
('libelpa{elpa_suffix}.a'
.format(elpa_suffix=elpa_suffix))))
else:
- libs.append(join_path(elpa.prefix.lib,
+ libs.append(join_path(elpa.libs.directories[0],
('libelpa{elpa_suffix}.{dso_suffix}'
.format(elpa_suffix=elpa_suffix,
dso_suffix=dso_suffix))))
@@ -661,7 +661,7 @@ class Cp2k(MakefilePackage, CudaPackage):
]
def build(self, spec, prefix):
- if len(spec.variants['cuda_arch'].value) > 1:
+ if '+cuda' in spec and len(spec.variants['cuda_arch'].value) > 1:
raise InstallError("cp2k supports only one cuda_arch at a time")
# Apparently the Makefile bases its paths on PWD