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: Lisandro Dalcin (dalcinl_at_[hidden])
Date: 2009-02-19 09:34:21

On Thu, Feb 19, 2009 at 10:54 AM, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> On Feb 16, 2009, at 9:14 AM, Lisandro Dalcin wrote:
>> After running my testsuite again and next looking at
>> "ompi/mpi/c/comm_set_errhandler.c", I noticed that
>> MPI_Comm_set_errhandler() do return MPI_ERR_COMM when invalid
>> communicators are passed. IMHO, for the sake of consistency, you
>> should fix MPI_Comm_get_errhandler() to behave the same as the setter.
>> Would this rationale be enough?
> Looks like we're a bit all over the map:
> - comm_set_errhandler: mpi_err_comm
> - comm_get_errhandler: mpi_err_arg
> - file_set_errhandler: mpi_err_file
> - file_get_errhandler: mpi_err_file
> - win_set_errhandler: mpi_err_arg
> - win_get_errhandler: mpi_err_arg
> I agree that it would be good to have these all be consistent. Just to be
> sure: are you saying you'd prefer MPI_ERR_COMM|FILE|WIN for each of these
> (respectively), vs. all of them returning MPI_ERR_ARG?

Yes, I prefer the MPI_ERR_COMM|FILE|WIN if you pass the null handle to
the MPI_XXX_{get|set}_errhandler. Of course, remember that for
MPI_File, the rules are a bit different: MPI_FILE_NULL have to be
special-cased as it is a valid handle for this call...

OTOH, if you have a valid Com/File/Win handle, but you try to set
MPI_ERRHANDLER_NULL, then in all cases we should get MPI_ERR_ARG (as
MPI does not provide a dedicated error class for signaling invalid
Errhandler handles).

> --
> Jeff Squyres
> Cisco Systems
> _______________________________________________
> devel mailing list
> devel_at_[hidden]

Lisandro Dalcín
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594