Skip to content

Commit

Permalink
abort when rocm not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Aug 26, 2024
1 parent b15ec93 commit c7d1afa
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ if ! command -v mpicc &> /dev/null ;then
fi


if [[ $(hostname) == tioga* ]]; then
if [[ -z $ROCM_PATH ]]; then
# ROCM_PATH is needed below to install the AMD OpenCL ICD link
echo "**** Error: No ROCM_PATH environment variable set."
echo "**** Please load the appropriate 'rocm' module."
exit 3
fi
fi

usage()
{
echo "Usage: $0 [--install-prefix=DIR] [--branch=NAME] [--conda-prefix=DIR]"
Expand Down Expand Up @@ -216,14 +225,9 @@ if [[ $(uname) == "Darwin" ]]; then
fi

if [[ $(hostname) == tioga* ]]; then
if [[ ! -f $CONDA_PREFIX/etc/OpenCL/vendors/amd_ceesd.icd ]]; then
echo "**** Installing AMD OpenCL ICD (rocm) for Tioga"
if [[ -n $ROCM_PATH ]]; then
echo "**** Warning: No rocm module loaded, assuming v6.1.2"
ROCM_PATH="/opt/rocm-6.1.2"
fi
echo "$ROCM_PATH/lib/libamdocl64.so" > $CONDA_PREFIX/etc/OpenCL/vendors/amd_ceesd.icd
fi
echo "**** Installing AMD OpenCL ICD (rocm) for Tioga"
#shellcheck disable=SC2153
echo "$ROCM_PATH/lib/libamdocl64.so" > "$CONDA_PREFIX/etc/OpenCL/vendors/amd_ceesd.icd"
fi

# Install an environment activation script
Expand Down

0 comments on commit c7d1afa

Please sign in to comment.