[Mpi-forum] Missing array size information in MPI_WAITSOME and MPI_TESTSOME

Jeff Hammond jhammond at alcf.anl.gov
Sun Feb 26 14:47:03 CST 2012


I agree that it isn't very clear, but I would use the following as my
guide for what the length of array_of_statuses needs to be:

"The error-free execution of MPI_WAITALL(count, array_of_requests,
array_of_statuses) has the same effect as the execution of
MPI_WAIT(&array_of_request[i], &array_of_statuses[i]), for i=0 ,...,
count-1, in some arbitrary order. MPI_WAITALL with an array of length
one is equivalent to MPI_WAIT." [top of page 60 in mpi22-report.pdf]

Furthermore:

"When one or more of the communications completed by MPI_WAITSOME
fails, then it is desirable to return specific information on each
communication. The arguments outcount, array_of_indices and
array_of_statuses will be adjusted to indicate completion of all
communications that have succeeded or failed." [bottom of page 61 in
mpi22-report.pdf]

One has to assume that all communications could succeed or fail prior
to a call to MPI_WAITSOME, therefore, one has to provide an array of
length incount.

It does bother me that "The arguments outcount, array_of_indices and
array_of_statuses will be adjusted to indicate completion of all
communications that have succeeded or failed," does not scope how the
implementation may adjust these arguments.  Is it permitted to call
realloc and shrink array_of_indices and array_of_statuses?  If the
arguments are OUT, does one even have to allocate memory for them, or
will the implementation test for nullity and allocate the memory
internally?

So yeah, I think you've identified a problem, but I only read the text
twice.  Some parts of the standard have to be read at least ten times
in a variety of mental states before they can be understood.  I found
that heavy use of peyote was necessary to understand the RMA chapter
:-)

Best,

Jeff



On Sun, Feb 26, 2012 at 12:53 PM, Jeremiah Willcock <jewillco at osl.iu.edu> wrote:
> The documentation in the MPI 2.2 standard and the latest public 3.0 draft do
> not say how long the output arrays array_of_indices and array_of_statuses
> should be, and the example there does not show the declarations of the
> arrays that it passes in.  A reader can probably infer that they need to be
> at least incount elements long, but that is not obvious from the text.
>
> -- Jeremiah Willcock
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum



-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/old/index.php/User:Jhammond
https://wiki-old.alcf.anl.gov/index.php/User:Jhammond




More information about the mpi-forum mailing list