[FIX] Workflow MPI try

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

@ -369,24 +369,27 @@ if(MPI_FOUND)
file(MAKE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY})
set(_mpi_mod_found FALSE)
foreach(_mod_name mpi.mod MPI.mod)
foreach(_inc ${_mpi_fortran_inc})
if(EXISTS "${_inc}/${_mod_name}")
file(COPY "${_inc}/${_mod_name}" DESTINATION "${CMAKE_Fortran_MODULE_DIRECTORY}")
message(STATUS "Copied ${_mod_name} from ${_inc}")
set(_mpi_mod_found TRUE)
if(_mpi_fortran_inc)
foreach(_mod_name mpi.mod MPI.mod)
foreach(_inc ${_mpi_fortran_inc})
if(EXISTS "${_inc}/${_mod_name}")
file(COPY "${_inc}/${_mod_name}" DESTINATION "${CMAKE_Fortran_MODULE_DIRECTORY}")
message(STATUS "Copied ${_mod_name} from ${_inc}")
set(_mpi_mod_found TRUE)
break()
endif()
endforeach()
if(_mpi_mod_found)
break()
endif()
endforeach()
if(_mpi_mod_found)
break()
endif()
endforeach()
endif()
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()
# ------------------------------------------------------------
# Enable MPI Fortran module support
# ------------------------------------------------------------

Loading…
Cancel
Save