diff --git a/install-pip-dependencies.sh b/install-pip-dependencies.sh index 53c5ea2..f192b34 100755 --- a/install-pip-dependencies.sh +++ b/install-pip-dependencies.sh @@ -37,8 +37,23 @@ if [[ $(mpicc --version) == "IBM XL"* ]]; then exit 1 fi +switch_requirements_to_ssh() { + input_file="$1" + output_file="$2" + + # Read the input file + while IFS= read -r line; do + # Check if the line starts with "git+https://github" + if [[ $line == *editable\ git+https://github* ]]; then + # Replace "git+https://github" with "git+ssh://git@github" + modified_line=${line//git+https:\/\/github/git+ssh:\/\/git@github} + echo "$modified_line" + else + echo "$line" + fi + done < "$input_file" > "$output_file" +} -# Install the packages from the requirements file export MPI4PY_BUILD_CONFIGURE=1 if [[ $(hostname) == tioga* || $(hostname) == odyssey || $(hostname) == tuolumne* ]]; then @@ -47,4 +62,7 @@ if [[ $(hostname) == tioga* || $(hostname) == odyssey || $(hostname) == tuolumne pip install 'mpi4py>=4' fi -pip install --src . -r "$requirements_file" +# Update the requirements file to use ssh for git cloning +switch_requirements_to_ssh $requirements_file ssh_requirements.txt +# Install the packages from the new requirements file +pip install --src . -r ssh_requirements.txt diff --git a/install.sh b/install.sh index e313249..3630e3b 100755 --- a/install.sh +++ b/install.sh @@ -15,12 +15,11 @@ if ! command -v mpicc &> /dev/null ;then exit 2 fi - if [[ $(hostname) == tioga* || $(hostname) == odyssey || $(hostname) == tuolumne* ]]; 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." + echo "**** Please load the appropriate 'rocm' module for AMD platforms." exit 3 else echo "==== Using system ROCM at $ROCM_PATH" @@ -66,7 +65,7 @@ conda_env_file="" opt_modules=0 # Switch mirgecom to use ssh URL -opt_git_ssh=0 +opt_git_ssh=1 # Skip cloning mirgecom opt_skip_clone=0 diff --git a/version.sh b/version.sh index 218e15f..c1f35e3 100755 --- a/version.sh +++ b/version.sh @@ -88,13 +88,11 @@ command -v rpm && echo "rpm -qa" && rpm -qa 2>/dev/null set -e - echo echo "*** OS modules" command -v module && module --redirect list - echo echo "*** Emirge git modules"