Conversation
Change `use mpi` to `use mpi_f08` in drifters_comm_mod.
Migrate `metadata_transfer_mod` from `mpi` to `mpi_f08`.
Migrate MPP from the legacy mpi library to mpi_f08.
Deprecate mpp_commID(), which returns an integral communicator ID, in favor of mpp_comm(), which returns an mpi_f08 communicator handle. Analogously, all arguments of MPP procedures which take or return an integral communicator ID have been deprecated in favor of new arguments which take or return an mpi_f08 handle.
rem1776
left a comment
There was a problem hiding this comment.
Thanks for working on this! I think its great to be using a more modern mpi module.
I think one thing we could think about later on is abstracting/wrapping the new mpi types within mpp, then we can use that type for the serial build too and not have as many ifdefs when the two build options diverge. This looks good though just left a couple smaller comments.
| integer, optional, intent(in) :: flags !< Flags for debug output, can be MPP_VERBOSE or MPP_DEBUG | ||
| integer, optional, intent(in) :: localcomm !< Id of MPI communicator used to initialize | ||
| type(mpi_comm), optional, intent(in) :: comm !< Handle to the MPI communicator used to initialize | ||
| integer, optional, intent(in) :: localcomm !< ID of MPI communicator used to initialize (deprecated) |
There was a problem hiding this comment.
I think the comm argument name could bit confusing, maybe something like mpi_comm_type would be a bit more clear?
| @@ -0,0 +1,130 @@ | |||
| subroutine mpp_pset_create(npset,pset,stacksize,pelist,comm) | |||
There was a problem hiding this comment.
needs a license header, also could you move the comments above the routine for the docs?
| @@ -0,0 +1,120 @@ | |||
| subroutine mpp_pset_create(npset,pset,stacksize,pelist) | |||
| integer, parameter :: MPP_COMM_NULL = MPI_COMM_NULL | ||
| #else | ||
| integer, parameter :: MPP_COMM_NULL = 67108864 | ||
| #endif |
There was a problem hiding this comment.
Maybe instead of deleting these we could keep them but change them to the mpi_comm type? This should allow you to take out some of the ifdefs later on.
I think external code bases might be using these values instead of accessing the mpi module directly, not 100% sure though.
rem1776
left a comment
There was a problem hiding this comment.
Thanks for working on this! I think its great to be using a more modern mpi module.
I think one thing we could think about later on is abstracting/wrapping the new mpi types within mpp, then we can use that type for the serial build too and not have as many ifdefs when the two build options diverge. This looks good though just left a couple smaller comments.
Description
Update to the
mpi_f08version of MPI's Fortran API.How Has This Been Tested?
Builds on C5 with ifx. Land model builds, runs, and reproduces answers with ifort. non-MPI version of the land model builds and runs on GFDL workstation with ifort.
Checklist:
make distcheckpasses