diff options
author | rfeki <113144418+rfeki@users.noreply.github.com> | 2023-09-18 14:28:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 12:28:37 -0700 |
commit | 60ce6c7302cb0531ce8a6cdd8e0fb60937dfe31a (patch) | |
tree | 9456f3b95cea4ca214eed32f214cec4bfd2f7fb9 /var | |
parent | d111bde69e309c03b1df3332d732636e42f4b88d (diff) | |
download | spack-60ce6c7302cb0531ce8a6cdd8e0fb60937dfe31a.tar.gz spack-60ce6c7302cb0531ce8a6cdd8e0fb60937dfe31a.tar.bz2 spack-60ce6c7302cb0531ce8a6cdd8e0fb60937dfe31a.tar.xz spack-60ce6c7302cb0531ce8a6cdd8e0fb60937dfe31a.zip |
Add cuda as a variant to opa-psm2 (#39754)
Signed-off-by: Raafat Feki <rfeki@cornelisnetworks.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/opa-psm2/package.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/opa-psm2/package.py b/var/spack/repos/builtin/packages/opa-psm2/package.py index 9aab415750..38d1ab5e97 100644 --- a/var/spack/repos/builtin/packages/opa-psm2/package.py +++ b/var/spack/repos/builtin/packages/opa-psm2/package.py @@ -6,7 +6,7 @@ from spack.package import * -class OpaPsm2(MakefilePackage): +class OpaPsm2(MakefilePackage, CudaPackage): """Omni-Path Performance Scaled Messaging 2 (PSM2) library""" homepage = "https://github.com/cornelisnetworks/opa-psm2" @@ -31,6 +31,7 @@ class OpaPsm2(MakefilePackage): variant("avx2", default=True, description="Enable AVX2 instructions") depends_on("numactl") + depends_on("cuda@8:", when="+cuda") # patch to get the Makefile to use the spack compiler wrappers patch( @@ -45,6 +46,8 @@ class OpaPsm2(MakefilePackage): # this variable must be set when we use the Intel compilers to # ensure that the proper flags are set env.set("CCARCH", "icc") + if "+cuda" in self.spec: + env.set("PSM_CUDA", "1") def edit(self, spec, prefix): # Change the makefile so libraries and includes are not |