n1r44
n1r44

Reputation: 581

Consecutive MPI non-blocking calls

I have been wondering how MPI runtime would differentiate messages between multiple non-blocking calls (inside a same comm world)?

ex: Say we have multiple Iallgather operations.

...
auto res1 = MPI_Iallgather(... , MPI_COMM_WORLD, req[0]);
auto res2 = MPI_Iallgather(... , MPI_COMM_WORLD, req[1]);
MPI_Waitall(2, req, MPI_STATUSES_IGNORE);
...

In Isend/Irecv routines, there's a int tag parameter. But for other non-blocking calls, there's no tag param. When we create a MPI_Request object, would it create a unique tag?

Upvotes: 0

Views: 116

Answers (1)

Victor Eijkhout
Victor Eijkhout

Reputation: 5794

Since, as you observe, there is no tag, there may be a problem if two processes issue the Iallgathers in different orders. Therefore all processes need to issue the non-blocking collectives in the same order. The request object offers no help here, because the first request corresponds to whatever you do first, on whatver process, so you can have mismatches there.

Upvotes: 1

Related Questions