Closed rljacob closed 4 years ago
The first call to MPI_GATHER in mph.F90 is indeed erroneous, though I'm (pleasantly?) surprised that anyone actually catches this and throws an explicit error.
The send and receive buffers cannot overlap on the root (or recipient) process. If you want to do an in-place gather, you have to use MPI_IN_PLACE as the send buffer on the root process.
Error message: Fatal error in PMPI_Gather: Invalid buffer pointer, error stack: PMPI_Gather(863): MPI_Gather(sbuf=0x804940, scount=1, dtype=USER, rbuf=0x804940, rcount=1, dtype=USER, root=0, comm=0x84000
007) failed
PMPI_Gather(806): Buffers must not be aliased
Works ok with openmpi.
When I first saw this a few weeks ago something pointed me to mph.F90 but can't currently locate that error message.