25 int rank = comm->rank();
31 MPI_Iprobe(!rank, tag, comm->comm, &available, &status);
38 MPI_Get_count(&status, MPI_BYTE, &size);
39 if (size == (
int)b.
length()) {
42 MPI_Recv(b.
get(), size, MPI_BYTE, !rank, tag, comm->comm, &status);
47 readBuffer =
new char[size];
48 MPI_Recv(readBuffer, size, MPI_BYTE, !rank, tag, comm->comm, &status);
57 if (take>(
int)b.
length()) {
60 memcpy(b.
get(),readBuffer+readAt,take);
78 int rank = comm->rank();
81 MPI_Isend(b.
get(), size, MPI_BYTE, !rank , 0, comm->comm, &request );
89 MPI_Test(&request, &flag, &status);