You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A range of MPI operations allow to reuse send buffers as receive buffers by setting the send buffer to a special constant MPI_IN_PLACE. With Fortran applications this can lead to data corruption if executed with mpiP.
The corruption can be demonstrated with this simple code:
Note, that the second column (which used MPI_IN_PLACE) is "0" while it should be "3".
I guess that the underlying problem is missing or incorrect treatment of constants such as MPI_IN_PLACE in the transition from Fortran to C PMPI interfaces. A similar problem has been observed in other projects / tools using PMPI such as here. In fact, the code above is taken from that issue.
I have observed this behavior for mpiP v3.4.1 and v3.5 using GCC v10.2 with either OpenMPI v4.1.4 or HPE's MPI implementation MPT 2.26.
Also note, that the code runs correctly when replacing use mpi with use mpi_f08, at least for OpenMPI (but not for MPT).
The text was updated successfully, but these errors were encountered:
Please ignore my last sentence above. use mpi_f08 with OpenMPI does not invoke mpiP at all ... and thus no data corruption. I will investigate this as well, maybe just a dumb mistake in the hurry.
A range of MPI operations allow to reuse send buffers as receive buffers by setting the send buffer to a special constant
MPI_IN_PLACE
. With Fortran applications this can lead to data corruption if executed with mpiP.The corruption can be demonstrated with this simple code:
Executing without mpiP instrumentation leads to the expected output
while executing with mpiP corrupts the data as
Note, that the second column (which used
MPI_IN_PLACE
) is "0" while it should be "3".I guess that the underlying problem is missing or incorrect treatment of constants such as
MPI_IN_PLACE
in the transition from Fortran to C PMPI interfaces. A similar problem has been observed in other projects / tools using PMPI such as here. In fact, the code above is taken from that issue.I have observed this behavior for mpiP v3.4.1 and v3.5 using GCC v10.2 with either OpenMPI v4.1.4 or HPE's MPI implementation MPT 2.26.
Also note, that the code runs correctly when replacing
use mpi
withuse mpi_f08
, at least for OpenMPI (but not for MPT).The text was updated successfully, but these errors were encountered: