File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
prerequisites/install-functions Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,16 @@ build_opencoarrays()
2222 FC=" ${MPIFC_show[0]} "
2323 # Set CC to the MPI implementation's gcc command...
2424 CC=" ${MPICC_show[0]} "
25+ # try to find mpiexec
26+ MPIEXEC_CANDIDATES=($( find " ${MPICC%/* } " -name ' mpiexec' -o -name ' mpirun' ) )
27+ if ! (( ${# MPIEXEC_CANDIDATES[@]} >= 1 )) ; then
28+ emergency " Could not find a suitable \` mpiexec\` in directory containing mpi wrappers (${MPICC%/* } )"
29+ else
30+ MPIEXEC=" ${MPIEXEC_CANDIDATES[0]} "
31+ fi
2532 info " Configuring OpenCoarrays in ${PWD} with the command:"
26- info " CC=\" ${CC} \" FC=\" ${FC} \" $CMAKE \" ${opencoarrays_src_dir} \" -DCMAKE_INSTALL_PREFIX=\" ${install_path} \" -DMPI_C_COMPILER=\" ${MPICC} \" -DMPI_Fortran_COMPILER=\" ${MPIFC} \" "
27- CC=" ${CC} " FC=" ${FC} " $CMAKE " ${opencoarrays_src_dir} " -DCMAKE_INSTALL_PREFIX=" ${install_path} " -DMPI_C_COMPILER=" ${MPICC} " -DMPI_Fortran_COMPILER=" ${MPIFC} "
33+ info " CC=\" ${CC} \" FC=\" ${FC} \" $CMAKE \" ${opencoarrays_src_dir} \" -DCMAKE_INSTALL_PREFIX=\" ${install_path} \" -DMPIEXEC= \" ${MPIEXEC} \" - DMPI_C_COMPILER=\" ${MPICC} \" -DMPI_Fortran_COMPILER=\" ${MPIFC} \" "
34+ CC=" ${CC} " FC=" ${FC} " $CMAKE " ${opencoarrays_src_dir} " -DCMAKE_INSTALL_PREFIX=" ${install_path} " -DMPIEXEC= " ${MPIEXEC} " - DMPI_C_COMPILER=" ${MPICC} " -DMPI_Fortran_COMPILER=" ${MPIFC} "
2835 info " Building OpenCoarrays in ${PWD} with the command make -j${num_threads} "
2936 make " -j${num_threads} "
3037 if [[ ! -z ${SUDO:- } ]]; then
@@ -33,4 +40,3 @@ build_opencoarrays()
3340 info " Installing OpenCoarrays in ${install_path} with the command ${SUDO:- } make install"
3441 ${SUDO:- } make install
3542}
36-
You can’t perform that action at this time.
0 commit comments