diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/nvhpc/package.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nvhpc/package.py b/var/spack/repos/builtin/packages/nvhpc/package.py index cd52b8a634..7579afd873 100644 --- a/var/spack/repos/builtin/packages/nvhpc/package.py +++ b/var/spack/repos/builtin/packages/nvhpc/package.py @@ -355,6 +355,9 @@ class Nvhpc(Package): ) variant("lapack", default=True, description="Enable LAPACK") variant("mpi", default=False, description="Enable MPI") + variant( + "default_cuda", default="default", description="Default CUDA version, for example 11.8" + ) provides("blas", when="+blas") provides("lapack", when="+lapack") @@ -373,6 +376,8 @@ class Nvhpc(Package): env.set("NVHPC_SILENT", "true") env.set("NVHPC_ACCEPT_EULA", "accept") env.set("NVHPC_INSTALL_DIR", self.prefix) + if self.spec.variants["default_cuda"].value != "default": + env.set("NVHPC_DEFAULT_CUDA", self.spec.variants["default_cuda"].value) if self.spec.variants["install_type"].value == "network": local_dir = join_path(self._version_prefix(), "share_objects") |