Use MPI_Irsend only if handshake is enabled
Making sure that we use MPI_Irsend only if handshake is enabled
(and the user wants to use isends with flow control).
@@ -294,7 +294,7 @@ int pio_swapm(void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype *sendty
* used to choose between mpi_irsends and mpi_isends - the default
* is still mpi_irsend
*/
- if (isend)
+ if (handshake && isend)
{
#ifdef USE_MPI_ISEND_FOR_FC
if ((mpierr = MPI_Isend(ptr, sendcounts[p], sendtypes[p], p, tag, comm,
@@ -306,6 +306,12 @@ int pio_swapm(void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype *sendty
return check_mpi(NULL, mpierr, __FILE__, __LINE__);
#endif
}
+ else if (isend)
+ {
+ if ((mpierr = MPI_Isend(ptr, sendcounts[p], sendtypes[p], p, tag, comm,
+ sndids + istep)))
+ return check_mpi(NULL, mpierr, __FILE__, __LINE__);
+ }
else
{
if ((mpierr = MPI_Send(ptr, sendcounts[p], sendtypes[p], p, tag, comm)))
