Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] possible bugs and unexpected values in returned errors classes
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-02-19 13:18:54


On Feb 19, 2009, at 12:01 PM, George Bosilca wrote:

> I don't see how you reach this conclusion. Based on my reading of
> the standard, MPI_ERRHANDLER_NULL is a valid error handler defined
> as "no" errorhandler. Kind of similar with MPI_REQUEST_NULL ...

It is not valid; MPI specifically defines both of these as invalid
handles.

MPI-2.1 2.5.1 p13:6-11:

Opaque objects are allocated and deallocated by calls that are
specific to each object
type. These are listed in the sections where the objects are
described. The calls accept a
handle argument of matching type. In an allocate call this is an OUT
argument that returns
a valid reference to the object. In a call to deallocate this is an
INOUT argument which
returns with an “invalid handle” value. MPI provides an “invalid
handle” constant for each
object type. Comparisons to this constant are used to test for
validity of the handle.

And MPI-2.1 8.3.4 p270:26-28 says that MPI_ERRHANDLER_FREE sets the
INOUT argument to MPI_ERRHANDLER_NULL.

Hence, my read is that MPI_ERRHANDLER_NULL is an invalid handle and
should therefore invoke an MPI exception if you pass it to
MPI_*_SET_ERRHANDLER.

Am I missing text somewhere that says that MPI_ERRHANDLER_NULL is a
valid handle and should effectively be treated the same as
MPI_ERRORS_RETURN?

> Moreover, I don't agree with some of the other changes, more
> specifically with the one related to the MPI_Request_get_status.
> Here is a paragraph from the MPI 2.1 standard about MPI_Waitall page
> 59 line 24: "The list may contain null or inactive handles. The call
> sets to empty the status of each such entry." This basically tells
> me that the status of the MPI_REQUEST_NULL should be the empty
> status (defined in the MPI standard) and not any kind of errors (i.e
> MPI_ERR_ARG).

I agree for MPI_TEST* and MPI_WAIT*. MPI_REQUEST_NULL is an invalid
handle, which is why the specific exception is noted for MPI_TEST* and
MPI_WAIT* (at least, that was my understanding).

But why would you call MPI_REQUEST_GET_STATUS with MPI_REQUEST_NULL?
Is there language somewhere that says it is valid to call
MPI_REQUEST_GET_STATUS with MPI_REQUEST_NULL? If not, then I think it
falls in the same category as passing MPI_ERRHANDLER_NULL to
MPI_*_SET_ERRHANDLER above -- it's an invalid handle, and therefore
should generate an MPI exception.

-- 
Jeff Squyres
Cisco Systems