Return if the current proc has no sends/recvs
If the number of steps is 0 the current process has no
sends/recvs to/from other processes. Returning immediately
in that case.
@@ -206,6 +206,9 @@ int pio_swapm(void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype *sendty
swapids[steps++] = p;
}
+ if (steps == 0)
+ return PIO_NOERR;
+
if (steps == 1)
{
maxreq = 1;
