[mpich-devel] datatype accessors with uncommited datatypes

Jeff Hammond jhammond at alcf.anl.gov
Thu Dec 27 12:36:19 CST 2012


This is what the MPI standard says:

4.1.9 Commit and Free
A datatype object has to be committed before it can be used in a
communication. As an argument in datatype constructors, uncommitted
and also committed datatypes can be used. There is no need to commit
basic datatypes. They are “pre-committed.”

There is some ambiguity since the functions to which you refer lie
outside of the union of "communication" and "datatype constructors".
However, since MPI_TYPE_SIZE(_X) determine "the total size of the data
in a message that would be created with this datatype", I wonder if
there is an implementation wherein the "compilation" that can
potentially occur during MPI_TYPE_COMMIT is required in order to
satisfy MPI_TYPE_SIZE(_X).

Is it necessary for mpi4py to have the behavior of the older version
of MPICH to function properly or can you work around this for now?

Best,

Jeff

On Thu, Dec 27, 2012 at 10:50 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> My understanding of the MPI standard is that datatype committing is
> only required for communication, but not for calls like
> MPI_Type_size_x(). I'm testing mpi4py with mpich-3.0.1, and getting
> the following errors (IIRC, 3.0rc1 did not have this issue)
>
> mpi4py.MPI.Exception: Invalid datatype, error stack:
> PMPI_Type_size_x(125):  MPI_Type_size_x(datatype=dtype=USER<vector>,
> size=0x7fffeb4ef658)
> PMPI_Type_size_x(98).: Datatype has not been committed
>
>
> mpi4py.MPI.Exception: Invalid datatype, error stack:
> PMPI_Type_get_extent_x(128):
> MPI_Type_get_extent_x(datatype=dtype=USER<struct>, lb=0x7fff97046bb0,
> extent=0x7fff97046bb8)
> PMPI_Type_get_extent_x(102): Datatype has not been committed
>
> Looking more closely to type_size_x.c and type_size.c in
> src/mpi/datatype/, I see MPID_Datatype_committed_ptr() in the former,
> but not in the later. IMHO, these checks should be removed from
> type_size_x.c, type_get_extent_x.c, and type_get_true_extent_x.c
> (please not I'm not listing get_elements_x.c, this is a different
> beast)
>
> Thanks,
>
> --
> Lisandro Dalcin
> ---------------
> CIMEC (INTEC/CONICET-UNL)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1011)
> Tel/Fax: +54-342-4511169



-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond


More information about the devel mailing list