Hi Open MPI developers,
I found some bugs in Open MPI and attach a patch to fix them.
The bugs are:
(1) MPI_SOURCE of MPI_Status for a null request must be MPI_ANY_SOURCE.
3.7.3 Communication Completion in MPI-3.0 (and also MPI-2.2)
says an MPI_Status object returned by MPI_{Wait|Test}{|any|all}
must be an empty status for a null request (MPI_REQUEST_NULL).
And the MPI_SOURCE field of the empty status must be
MPI_ANY_SOURCE.
But MPI_Wait, MPI_Waitall, and MPI_Testall set MPI_PROC_NULL
to the MPI_SOURCE field of such status object.
This bug is caused by a use of an incorrect variable in
ompi/mpi/c/wait.c (for MPI_Wait) and by an incorrect
initialization of ompi_request_null in ompi/request/request.c
(for MPI_Waitall and MPI_Testall).
(2) MPI_Status for an inactive request must be an empty status.
3.7.3 Communication Completion in MPI-3.0 (and also MPI-2.2)
says an MPI_Status object returned by MPI_{Wait|Test}{|any|all}
must be an empty status for an inactive persistent request.
But MPI_Wait, MPI_Waitall, and MPI_Testall return an old
status (that was returned when the request was active) for
an inactive persistent request.
This bug is caused by not updating a req_status field of an
inactive persistent request object in ompi/request/req_wait.c
and ompi/request/req_test.c.
(3) Possible BUS errors on sparc64 processors.
r23554 fixed possible BUS errors on sparc64 processors.
But the fix seems to be insufficient.
We should use OMPI_STATUS_SET macro for all user-supplied
MPI_Status objects.
The attached patch is for Open MPI trunk and it also fixes some
typos in comments. A program to reproduce bugs (1) and (2) is
also attached.
Regards,
Takahiro Kawashima,
MPI development team,
Fujitsu
|