gdrcopy: inherit from CudaPackage, update dependencies (#39596)

This commit is contained in:
Scot Halverson 2023-09-11 14:36:20 -06:00 committed by GitHub
parent e797a89fe1
commit 145d44cd97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,13 +6,14 @@
from spack.package import * from spack.package import *
class Gdrcopy(MakefilePackage): class Gdrcopy(MakefilePackage, CudaPackage):
"""A fast GPU memory copy library based on NVIDIA GPUDirect """A fast GPU memory copy library based on NVIDIA GPUDirect
RDMA technology.""" RDMA technology."""
homepage = "https://github.com/NVIDIA/gdrcopy" homepage = "https://github.com/NVIDIA/gdrcopy"
url = "https://github.com/NVIDIA/gdrcopy/archive/v2.1.tar.gz" url = "https://github.com/NVIDIA/gdrcopy/archive/v2.1.tar.gz"
git = "https://github.com/NVIDIA/gdrcopy" git = "https://github.com/NVIDIA/gdrcopy"
maintainers("scothalverson")
version("master", branch="master") version("master", branch="master")
version("2.3", sha256="b85d15901889aa42de6c4a9233792af40dd94543e82abe0439e544c87fd79475") version("2.3", sha256="b85d15901889aa42de6c4a9233792af40dd94543e82abe0439e544c87fd79475")
@ -24,13 +25,19 @@ class Gdrcopy(MakefilePackage):
# Don't call ldconfig: https://github.com/NVIDIA/gdrcopy/pull/229 # Don't call ldconfig: https://github.com/NVIDIA/gdrcopy/pull/229
patch("ldconfig.patch", when="@2.0:") patch("ldconfig.patch", when="@2.0:")
depends_on("check")
requires("+cuda")
def build(self, spec, prefix): def build(self, spec, prefix):
make("lib") make("lib")
make("exes")
def install(self, spec, prefix): def install(self, spec, prefix):
mkdir(prefix.include) mkdir(prefix.include)
mkdir(prefix.lib64) mkdir(prefix.lib64)
if spec.satisfies("@2.2:"): if spec.satisfies("@2.2:"):
make("lib_install", "prefix={0}".format(self.prefix)) make("lib_install", "prefix={0}".format(self.prefix))
make("exes_install", "prefix={0}".format(self.prefix))
else: else:
make("lib_install", "PREFIX={0}".format(self.prefix)) make("lib_install", "PREFIX={0}".format(self.prefix))
make("exes_install", "PREFIX={0}".format(self.prefix))