Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] MPI_Mprobe
From: Eugene Loh (eugene.loh_at_[hidden])
Date: 2012-07-31 02:58:12


I have some questions originally motivated by some mpif-h/MPI_Mprobe
failures we've seen in SPARC MTT runs at 64-bit in both v1.7 and v1.9,
but my poking around spread out from there.

The main issue is this. If I go to ompi/mpi/fortran/mpif-h, I see six
files (*recv_f and *probe_f) that take status arguments. Normally, we
do some conversion between Fortran and C status arguments. These files
test if OMPI_SIZEOF_FORTRAN_INTEGER==SIZEOF_INT, however, and bypass the
conversion if the two types of integers are the same size. The problem
with this is that while the structures may be the same size, the C
status has a size_t in it. So, while the Fortran INTEGER array can
start on any 4-byte alignment, the C status can end up with a 64-bit
pointer on a 4-byte alignment. That's not pleasant in general and can
incur some serious hand-slapping on SPARC. Specifically, SPARC/-m64
errors out on *probe and *recv with MPI_PROC_NULL sources. Would it be
all right if I removed these "shorts cuts"?

Here are two more smaller issues. I'm pretty sure about them and can
make the appropriate changes, but if someone wants to give feedback...

1) If I look at, say, the v1.7 MPI_Mprobe man page, it says:

      A matching probe with MPI_PROC_NULL as source returns
      message = MPI_MESSAGE_NULL...

In contrast, if I look at ibm/pt2pt/mprobe_mpifh.f90, it's checking the
message to be MPI_MESSAGE_NO_PROC. Further, if I look at the source
code, mprobe.c seems to set the message to "no proc". So, I take it the
man page is wrong? It should say "message = MPI_MESSAGE_NO_PROC"?

2) Next, looking further at mprobe.c, it looks like this:

int MPI_Mprobe(int source, int tag, MPI_Comm comm,
                MPI_Message *message, MPI_Status *status)
{
     if (MPI_PROC_NULL == source) {
         if (MPI_STATUS_IGNORE != status) {
             *status = ompi_request_empty.req_status;
             *message = &ompi_message_no_proc.message;
         }
         return MPI_SUCCESS;
     }
     ......
}

This means that if source==MPI_PROC_NULL and status==MPI_STATUS_IGNORE,
the message does not get set. The assignment to *message should be
moved outside the status check, right?