diff options
author | Loris Ercole <30901257+lorisercole@users.noreply.github.com> | 2024-01-23 21:52:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 12:52:38 -0800 |
commit | 4c86ecc5311cb7ab875eab29984e86da6e633690 (patch) | |
tree | a3fe05931020bfc5ccdee9bb7952688a38ab5945 | |
parent | 890a46c07160b63c6667790452229df74dbe2836 (diff) | |
download | spack-4c86ecc5311cb7ab875eab29984e86da6e633690.tar.gz spack-4c86ecc5311cb7ab875eab29984e86da6e633690.tar.bz2 spack-4c86ecc5311cb7ab875eab29984e86da6e633690.tar.xz spack-4c86ecc5311cb7ab875eab29984e86da6e633690.zip |
autodock-gpu: build with the specified `cuda_arch` (#42244)
The CUDA target should be specified at build time, otherwise
by default `autodock-gpu` will be built for compute capabilities
52, 60, 61, 70, which may cause errors on unsopported cards.
-rw-r--r-- | var/spack/repos/builtin/packages/autodock-gpu/package.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/autodock-gpu/package.py b/var/spack/repos/builtin/packages/autodock-gpu/package.py index a3e5a4c329..e687cfd4ce 100644 --- a/var/spack/repos/builtin/packages/autodock-gpu/package.py +++ b/var/spack/repos/builtin/packages/autodock-gpu/package.py @@ -6,7 +6,7 @@ from spack.package import * -class AutodockGpu(MakefilePackage): +class AutodockGpu(MakefilePackage, CudaPackage): """AutoDock-GPU: AutoDock for GPUs and other accelerators. OpenCL and Cuda accelerated version of AutoDock 4.2.6. It leverages its embarrasingly parallelizable LGA by processing @@ -30,14 +30,19 @@ class AutodockGpu(MakefilePackage): multi=False, ) variant("overlap", default=False, description="Overlap CPU and GPU operations") + variant("cuda", default=True, description="Build with CUDA") depends_on("cuda") + conflicts("~cuda") # the cuda variant is mandatory + conflicts("+cuda", when="cuda_arch=none") + @property def build_targets(self): spec = self.spec return [ "DEVICE={0}".format(spec.variants["device"].value.upper()), + "TARGETS={0}".format(" ".join(spec.variants["cuda_arch"].value)), "GPU_INCLUDE_PATH={0}".format(spec["cuda"].prefix.include), "GPU_LIBRARY_PATH={0}".format(spec["cuda"].libs.directories[0]), "OVERLAP={0}".format("ON" if "+overlap" in spec else "OFF"), |