Skip to content

Commit

Permalink
set NVHPC_CUDA_HOME to /cuda/<cuda_ver>
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Oct 2, 2024
1 parent 7123581 commit 49aa876
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions features/src/nvhpc/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "NVHPC SDK",
"id": "nvhpc",
"version": "24.12.0",
"version": "24.12.1",
"description": "A feature to install the NVHPC SDK",
"options": {
"version": {
"type": "string",
"proposals": [
"24.9",
"24.7",
"24.5",
"24.3",
"24.1",
Expand All @@ -20,7 +22,7 @@
"22.9",
"22.7"
],
"default": "24.5",
"default": "24.9",
"description": "Version of NVHPC SDK to install."
}
},
Expand Down
2 changes: 1 addition & 1 deletion features/src/nvhpc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ check_packages ${pkgs[@]};
export NVHPC="/opt/nvidia/hpc_sdk";
export NVHPC_VERSION="${NVHPC_VERSION}";
export NVHPC_ROOT="${NVHPC}/Linux_$(uname -p)/${NVHPC_VERSION}";
export NVHPC_CUDA_HOME="${NVHPC_ROOT}/cuda";
export NVHPC_CUDA_HOME="$(dirname "$(find "$NVHPC_ROOT/cuda" -type f -name 'version.json' | head -n1)")";
export NVHPC_MODULEFILE_DIRS="($(find "${NVHPC}/" -type d -name modulefiles -exec echo -n \"{}\"\ \;))";

if ! test -L /usr/local/cuda; then
Expand Down
2 changes: 1 addition & 1 deletion features/test/nvhpc/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module list 1>&2

# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib.
check "version" bash -c "echo '$NVHPC_VERSION' | grep '24.5'"
check "version" bash -c "echo '$NVHPC_VERSION' | grep '24.9'"
check "installed" stat /opt/nvidia/hpc_sdk
check "nvc++ exists and is on path" which nvc++
check "mpic++ exists and is on path" which mpic++
Expand Down

0 comments on commit 49aa876

Please sign in to comment.