[mpich-discuss] alllocation/deallocation of MPI_Request's with MPI_Waitany

Rajeev Thakur thakur at mcs.anl.gov
Fri Jan 6 00:25:27 CST 2012


pg 82 of the MPI 2.2 standard says:

"The execution of MPI_WAITANY(count, array_of_requests, index, status) has the same effect as the execution of MPI_WAIT(&array_of_requests[i], status), where i is the value returned by index."

So you should assume that only that one request has completed.

Rajeev



On Jan 6, 2012, at 12:08 AM, Gideon Simpson wrote:

> Suppose I have an array of MPI_Request structures associated with one process that has issued MPI_Irecv to a series of other processes and I use a Waitany to complete the communication:
> 
> MPI_Request reqs[7];
> 
> for(i = 1; i < 8; i++)
> 	MPI_Irecv(&msg, 1, MPI_INT, i, MPI_ANY_TAG, MPI_COMM_WORLD, &reqs[i-1]); 
> 
> MPI_Waitany(7, reqs, &index, MPI_STATUSES_IGNORE);
> 
> What becomes of the requests not corresponding to the one associated with index?  Are they still allocated?  Can they be reused, or must they be MPI_Cancel'ed or MPI_Free_request'ed before proceeding?
> 
> -gideon
> 
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list