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

Gideon Simpson gideon.simpson at gmail.com
Fri Jan 6 00:08:29 CST 2012


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



More information about the mpich-discuss mailing list