do istep=0,k-1 j = istep*b2size/k call mpi_irecv (tbuf2(j), b2size, MPI_PACKED, MPI_ANY_SOURCE, tag, comm, reqobj, ierr) end do do istep=0,k-1 gindex = p*istep + myrank PACK DATA INTO tbuf1, FIND pos dest = gindex/k call mpi_send (tbuf1, pos, MPI_PACKED, dest, tag, comm, ierr) end do do istep=0,k-1 call mpi_waitany (k, reqobj, indx, status, ierr) pos = (indx-1)*b2size/k UNPACK DATA FROM tbuf2 end do