diff --git a/install-pip-dependencies.sh b/install-pip-dependencies.sh index 09d6f19..ba4960b 100755 --- a/install-pip-dependencies.sh +++ b/install-pip-dependencies.sh @@ -9,7 +9,7 @@ # Usage: install-pip-dependencies # -set -o nounset -o errexit +set -o errexit origin=$(pwd) requirements_file="${1-mirgecom/requirements.txt}" @@ -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 @@ -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 diff --git a/install.sh b/install.sh index e8ee2c3..6319351 100755 --- a/install.sh +++ b/install.sh @@ -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]" @@ -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 diff --git a/version.sh b/version.sh index 243b525..c1f35e3 100755 --- a/version.sh +++ b/version.sh @@ -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"