Skip to content

Commit d02752f

Browse files
author
Damian Rouson
committed
Move MPICH path output later in the setup scripts
Because MPI is important of using OpenCoarrays, but CMake is only important for building OpenCoarrays, we want to ensure the MPI path precedes the CMake path in the PATH variable in the setup scripts that the installer writes. This lessens the likelihood of using a different MPI that happens to be in the location of CMake (e.g., /usr/bin).
1 parent 6d4430e commit d02752f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

prerequisites/install-functions/report_results.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ report_results()
6363
echo "set LD_LIBRARY_PATH = (\"${compiler_lib_paths%/}\"/bin \"\$LD_LIBRARY_PATH\") " >> setup.csh
6464
fi
6565
echo " " >> setup.sh
66-
if [[ -x "$mpi_install_root/bin/mpif90" ]]; then
67-
echo "if [[ -z \"\$PATH\" ]]; then " >> setup.sh
68-
echo " export PATH=\"${mpi_install_root%/}/bin\" " >> setup.sh
69-
echo "else " >> setup.sh
70-
echo " export PATH=\"${mpi_install_root%/}/bin\":\$PATH " >> setup.sh
71-
echo "fi " >> setup.sh
72-
echo "set path = (\"${mpi_install_root%/}\"/bin \"\$path\") " >> setup.csh
73-
fi
7466
if [[ -x "$cmake_install_path/cmake" ]]; then
7567
echo "if [[ -z \"\$PATH\" ]]; then " >> setup.sh
7668
echo " export PATH=\"${cmake_install_path%/}/\" " >> setup.sh
@@ -113,6 +105,14 @@ report_results()
113105
echo "fi " >> setup.sh
114106
echo "set path = (\"$m4_install_path\"/bin \"\$path\") " >> setup.csh
115107
fi
108+
if [[ -x "$mpi_install_root/bin/mpif90" ]]; then
109+
echo "if [[ -z \"\$PATH\" ]]; then " >> setup.sh
110+
echo " export PATH=\"${mpi_install_root%/}/bin\" " >> setup.sh
111+
echo "else " >> setup.sh
112+
echo " export PATH=\"${mpi_install_root%/}/bin\":\$PATH " >> setup.sh
113+
echo "fi " >> setup.sh
114+
echo "set path = (\"${mpi_install_root%/}\"/bin \"\$path\") " >> setup.csh
115+
fi
116116
opencoarrays_install_path="${install_path}"
117117
if [[ -x "$opencoarrays_install_path/bin/caf" ]]; then
118118
echo "if [[ -z \"\$PATH\" ]]; then " >> setup.sh

0 commit comments

Comments
 (0)