Skip to content

Commit

Permalink
Update for tioga
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Sep 4, 2024
2 parents 389fc11 + 2625406 commit 3c6be83
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
12 changes: 9 additions & 3 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 @@ -54,9 +54,15 @@ switch_requirements_to_ssh() {
done < "$input_file" > "$output_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

# Update the requirements file to use ssh for git cloning
switch_requirements_to_ssh $requirements_file ssh_requirements.txt
export MPI4PY_BUILD_CONFIGURE=1
# Install the packages from the new requirements file
pip install --src . -r ssh_requirements.txt
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
12 changes: 4 additions & 8 deletions version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,17 @@ 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
echo "*** Emirge git modules"
Expand Down

0 comments on commit 3c6be83

Please sign in to comment.