Open
Description
In MOSART - the calls using
shr_mpi_sum, shr_mpi_max, shr_mpi_min, mpi_barrier, mpi_bcast
could be replaced by calls to
ESMF_VMAllReduce and ESMF_VMBroadcast.
The following must be taken into account, however:
- ESMF_VMAllReduce only accepts one-dimensional arrays. tmp_in and tmp_glob are 2d-arrays. So copies will need to be made and 6 calls will need to be done and then copies need to be made.
- Using ESMF_VMBroadcast -only accepts 1d arrays. That means that an array of length 1 needs to be created and then a copy of finidat needs to be made to that and then broadcast and then copied back. I think this will make the code more complicated and harder to read.
ESMF currently only has interfaces to a small subset of MPI communications and only supports arrays in those interfaces. So this needs to be taken into consideration in the decision to replace the MPI calls with ESMF calls.