parallel processing - Will MPI_Send block if matching MPI_IRecv takes less data elements? -


assume following mpi code.

mpi_comm_rank(mpi_comm_world, &rank);  if (rank == 0){    mpi_send(a, count, mpi_char, 1, 0, mpi_comm_world);    mpi_send(b, count, mpi_char, 1, 0, mpi_comm_world); } else if (rank == 1){    mpi_irecv(a, 1, mpi_char, 0, 0, mpi_comm_world, &req);    mpi_recv(b, count, mpi_char, 0, 0, mpi_comm_world);    mpi_wait(&req, &status); } 

is correct the first mpi_send(a, count, ...) not block though matching mpi_irecv(a, 1, ...) reading 1 element buffer?

also, since no reads/writes done buffer a, correct process 1 not block though mpi_wait not called directly after mpi_irecv?

thanks.

mpi_send block...it blocking call. "blocking" call return when send/recv buffer can safely read/modified calling application. no guarantees made matching mpi_[i]recv call.

the mpi library not know read/write status of buffers in application. mpi standard calls guarantees made application stability of message buffers.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -