Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AMD ICD installation on Tioga #173

Merged
merged 5 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions install-pip-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Usage: install-pip-dependencies <requirements_file> <install_location>
#

set -o nounset -o errexit
set -o errexit

origin=$(pwd)
requirements_file="${1-mirgecom/requirements.txt}"
Expand All @@ -28,7 +28,7 @@ python -m pip install pybind11
# Some nice-to haves for development
python -m pip install pytest pudb flake8 pep8-naming flake8-quotes flake8-bugbear \
flake8-comprehensions pytest-pudb sphinx \
sphinx_math_dollar sphinx_copybutton furo
sphinx_math_dollar sphinx_copybutton furo ruff


if [[ $(mpicc --version) == "IBM XL"* ]]; then
Expand All @@ -40,4 +40,11 @@ fi

# Install the packages from the requirements file
export MPI4PY_BUILD_CONFIGURE=1

if [[ $(hostname) == tioga* ]]; then
# Need extra flags for the mpi4py build
LDFLAGS="$LDFLAGS -Wl,-rpath $CRAYLIBS_X86_64" \
pip install 'mpi4py>=4'
fi

pip install --src . -r "$requirements_file"
15 changes: 15 additions & 0 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 @@ -215,6 +224,12 @@ if [[ $(uname) == "Darwin" ]]; then
fi
fi

if [[ $(hostname) == tioga* ]]; then
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
rm -rf "$mcprefix"/config
mkdir -p "$mcprefix"/config
Expand Down
10 changes: 4 additions & 6 deletions version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,18 @@ echo
echo "*** OS packages"

set +e
set -x

command -v brew && brew list --versions 2>/dev/null
command -v apt && apt list --installed 2>/dev/null
command -v rpm && rpm -qa 2>/dev/null
command -v brew && echo "brew list --versions" && brew list --versions 2>/dev/null
command -v apt && echo "apt list --installed" && apt list --installed 2>/dev/null
command -v rpm && echo "rpm -qa" && rpm -qa 2>/dev/null

set +x
set -e


echo
echo "*** OS modules"

command -v module && module list
command -v module && module --redirect list


echo
Expand Down