What exactly happens when we use the mpi_send / receive functions?

when we use functions mpi_send/receive, what happens? I mean, this message is executed by the value or address of the variable that we want to send and receive (for example, process 0 wants to send the variable "a" for processing 1. Process 0 is what exactly sends the value of the variable "a" or address "a"). And what happens when we use derived data types for communication?

+5
source share
3 answers

A little magic happens behind the scenes.


-, . MPI_Send , MPI_Recv, MPI , . . , . MPI_Recv, , , , . , , MPI_Recv ​​ . MPI_Probe.

, . , , . , InfiniBand.


, . MPI , . MPI- node . : , . . MPI , KNEM, . . ​​ . HPC, Catamount, .


/, . . MPI , .


MPI . , . MPI MPI_Pack , , .

+15

, , , . MPI , 0 1 - 1 0, 0. , MPI-2, .

, MPI , , . , MPI , , , . , .

+6

mpi_sendrequires you to specify the address in the memory in which the data to be sent is stored. It will return only when you save it for reuse of this memory (this can be avoided using non-blocking communications).

Similarly, it mpi_recvrequires that you provide an address of sufficient memory where it can copy the data that should be received. It will be returned only when data has been received in this buffer.

How MPI does this is another matter, and you don’t have to worry about it to write a working MPI program (but perhaps to write efficiently).

+1
source

All Articles