File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,9 @@ if (C_COMPILER_NAME MATCHES "^[mM][pP][iI]")
282282 set (MPI_C_COMPILER "${CMAKE_C_COMPILER} " )
283283endif ()
284284
285- if (WIN32 ) # Only support building with GCC & GFortran using Intel MPI (OneAPI)
285+ find_package (MPI)
286+
287+ if (WIN32 AND NOT MPI_FOUND) # Only support building with GCC & GFortran using Intel MPI (OneAPI)
286288 # Here we assume Intel ONEAPI and the environment is loaded
287289 set ( MPI_ASSUME_NO_BUILTIN_MPI TRUE )
288290 set ( MPI_CXX_SKIP_MPICXX TRUE )
@@ -319,7 +321,6 @@ if(WIN32) # Only support building with GCC & GFortran using Intel MPI (OneAPI)
319321 set (MPI_Fortran_HAVE_F08_MODULE FALSE )
320322
321323endif ()
322- find_package ( MPI )
323324
324325if ( (NOT MPI_C_FOUND) OR (NOT MPI_Fortran_FOUND) OR (NOT MPIEXEC_EXECUTABLE))
325326 # Get default install location of MPICH from install.sh
@@ -339,7 +340,7 @@ MPIEXEC_EXECUTABLE = ${MPIEXEC_EXECUTABLE}
339340 HINTS "${FTN_COMPILER_DIR} " "${C_COMPILER_DIR} "
340341 PATH_SUFFIXES bin)
341342 set ( MPI_HOME "${MPI_HOME} " "${MY_MPI_EXEC} " "${MY_MPI_EXEC} /.." )
342- find_package ( MPI REQUIRED )
343+ # find_package( MPI REQUIRED )
343344endif ()
344345list (REMOVE_DUPLICATES MPI_Fortran_INCLUDE_DIRS)
345346
You can’t perform that action at this time.
0 commit comments