Reputation: 1085
For example, I use mpirun -n 4
to start 4 processes. Process 0 receives messages come from process1, process2 and process3. Process 1 sends messages in the order of message0, message1, message2
. When process 0 receives these messages come from process1, can it guarantee that process receives these messages in the oder of message0, message1, message2
? I don't care about the total order of all messages come from all different processes, I only need to know whether it can guarantee the order of messages come from the same process . By the way, when I use MPI_Send()
to send message, the size of message is limited, right? What about MPI_Bcast()
?
Upvotes: 2
Views: 550
Reputation: 74395
As long as message0
, message1
, and message2
have the same tag
and are sent within the same communicator comm
, the MPI standard guarantees that MPI_Recv(..., source, tag, comm, ...)
will receive the messages in exactly the same order.
The size of the message is limited by the implementation, but most modern ones support messages of more than 2 GiB of size. You have to use user defined datatypes though as MPI_Send
cannot send more than 231-1 elements at a time.
Upvotes: 5