File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,15 @@ endif()
156156find_package ( MPI )
157157
158158if ( (NOT MPI_C_FOUND) OR (NOT MPI_Fortran_FOUND) OR (NOT MPIEXEC))
159+ # Get default install location of MPICH from install.sh
160+ execute_process ( COMMAND "./install.sh" -P mpich
161+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR} "
162+ OUTPUT_VARIABLE DEFAULT_MPICH_INSTALL_LOC
163+ OUTPUT_QUIET
164+ OUTPUT_STRIP_TRAILING_WHITES_SPACE
165+ )
159166 find_program (MY_MPI_EXEC NAMES mpirun mpiexec lamexec srun
160- PATHS "${CMAKE_SOURCE_DIR} /prerequisites/installations/mpich/3.1.4" " ${CMAKE_SOURCE_DIR} /prerequisites/installations/mpich/* " ENV PATH
167+ PATHS "${DEFAULT_MPICH_INSTALL_LOC} " ENV PATH
161168 HINTS "${FTN_COMPILER_DIR} " "${C_COMPILER_DIR} "
162169 PATH_SUFFIXES bin)
163170 set ( MPI_HOME "${MPI_HOME} " "${MY_MPI_EXEC} " "${MY_MPI_EXEC} /.." )
You can’t perform that action at this time.
0 commit comments