Add cuda as a variant to opa-psm2 (#39754)
Signed-off-by: Raafat Feki <rfeki@cornelisnetworks.com>
This commit is contained in:
		| @@ -6,7 +6,7 @@ | |||||||
| from spack.package import * | from spack.package import * | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class OpaPsm2(MakefilePackage): | class OpaPsm2(MakefilePackage, CudaPackage): | ||||||
|     """Omni-Path Performance Scaled Messaging 2 (PSM2) library""" |     """Omni-Path Performance Scaled Messaging 2 (PSM2) library""" | ||||||
| 
 | 
 | ||||||
|     homepage = "https://github.com/cornelisnetworks/opa-psm2" |     homepage = "https://github.com/cornelisnetworks/opa-psm2" | ||||||
| @@ -31,6 +31,7 @@ class OpaPsm2(MakefilePackage): | |||||||
|     variant("avx2", default=True, description="Enable AVX2 instructions") |     variant("avx2", default=True, description="Enable AVX2 instructions") | ||||||
| 
 | 
 | ||||||
|     depends_on("numactl") |     depends_on("numactl") | ||||||
|  |     depends_on("cuda@8:", when="+cuda") | ||||||
| 
 | 
 | ||||||
|     # patch to get the Makefile to use the spack compiler wrappers |     # patch to get the Makefile to use the spack compiler wrappers | ||||||
|     patch( |     patch( | ||||||
| @@ -45,6 +46,8 @@ def setup_build_environment(self, env): | |||||||
|             # this variable must be set when we use the Intel compilers to |             # this variable must be set when we use the Intel compilers to | ||||||
|             # ensure that the proper flags are set |             # ensure that the proper flags are set | ||||||
|             env.set("CCARCH", "icc") |             env.set("CCARCH", "icc") | ||||||
|  |         if "+cuda" in self.spec: | ||||||
|  |             env.set("PSM_CUDA", "1") | ||||||
| 
 | 
 | ||||||
|     def edit(self, spec, prefix): |     def edit(self, spec, prefix): | ||||||
|         # Change the makefile so libraries and includes are not |         # Change the makefile so libraries and includes are not | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 rfeki
					rfeki