[Mpi-comments] Possible ambiguity on size of `array_of_indices` and `array_of_statuses`?

Gaspar, Andrew James agaspar at lanl.gov
Thu Mar 8 12:32:56 CST 2018


Hello,

These comments are on the MPI 3.1 spec[0], Section 3.7.5, pages 61 and 62 on MPI_Waitsome and MPI_Testsome.

The spec makes two comments on what elements in `array_of_indices` and `array_of_statuses` are accessed:

“Returns in the first outcount locations of the array array_of_indices the indices of these operations (index within the array array_of_requests; the array is indexed from zero in C and from one in Fortran)”

“Returns in the first outcount locations of the array array_of_status the status for these completed operations.”

As far as I can tell, the spec provides no other indication of the size of these two arrays. So, as a user, I would think that `array_of_indices` is only required to be as large as the largest possible value of `outcount`.

The max value of outcount is not necessarily the same as the size of `array_of_requests`: If an array_of_requests has 10 elements, but the user knows that only 8 of the requests are active, they know that outcount must be less than or equal to 8.

The reason I ask is that OpenMPI takes the liberty of treating `array_of_indices` as being the same size as `array_of_requests`[1]. It uses array_of_indices[i] as scratch space to store the completion of array_of_requests[i].

Is the spec ambiguous here, or is OpenMPI in violation of the spec? Or am I missing an explicit definition of the required size of these arrays?

Thank you very much!

[0] http://mpi-forum.org/docs/mpi-3.1/mpi31-report.pdf
[1] https://github.com/open-mpi/ompi/blob/master/ompi/request/req_wait.c#L422

Andrew Gaspar
CCS-7 – Applied Computer Science
505-664-0676 / agaspar at lanl.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-comments/attachments/20180308/c88e218e/attachment.html>


More information about the mpi-comments mailing list