[FIX] Workflow MPI try

test_dev
Stack-1 8 months ago
parent 070f1cbe57
commit 10f0caa32c

@ -369,24 +369,27 @@ if(MPI_FOUND)
file(MAKE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}) file(MAKE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY})
set(_mpi_mod_found FALSE) set(_mpi_mod_found FALSE)
foreach(_mod_name mpi.mod MPI.mod) if(_mpi_fortran_inc)
foreach(_inc ${_mpi_fortran_inc}) foreach(_mod_name mpi.mod MPI.mod)
if(EXISTS "${_inc}/${_mod_name}") foreach(_inc ${_mpi_fortran_inc})
file(COPY "${_inc}/${_mod_name}" DESTINATION "${CMAKE_Fortran_MODULE_DIRECTORY}") if(EXISTS "${_inc}/${_mod_name}")
message(STATUS "Copied ${_mod_name} from ${_inc}") file(COPY "${_inc}/${_mod_name}" DESTINATION "${CMAKE_Fortran_MODULE_DIRECTORY}")
set(_mpi_mod_found TRUE) message(STATUS "Copied ${_mod_name} from ${_inc}")
set(_mpi_mod_found TRUE)
break()
endif()
endforeach()
if(_mpi_mod_found)
break() break()
endif() endif()
endforeach() endforeach()
if(_mpi_mod_found) endif()
break()
endif()
endforeach()
if(NOT _mpi_mod_found) if(NOT _mpi_mod_found)
message(WARNING "mpi.mod not found in MPI include paths; assuming mpifort provides it internally.") message(WARNING "mpi.mod not found in MPI include paths; assuming mpifort provides it internally. Skipping copy.")
endif() endif()
# ------------------------------------------------------------ # ------------------------------------------------------------
# Enable MPI Fortran module support # Enable MPI Fortran module support
# ------------------------------------------------------------ # ------------------------------------------------------------

Loading…
Cancel
Save