Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Error message when using MPI_Datatype_struct()
From: Thomas Ropars (tropars_at_[hidden])
Date: 2008-03-10 05:54:47


I'm currently implementing a mechanism to piggyback information on
messages. On message sending, I dynamically create a new datatype
composed of the original buffer and of the data to piggyback.

For instance, if I want to piggyback an integer on each message, I use
the following code:

int send(void *buf,
         size_t count,
         struct ompi_datatype_t* datatype,
         int dst,
         int tag,
         mca_pml_base_send_mode_t sendmode,
         ompi_communicator_t* comm )
    MPI_Datatype type[2];
    int blocklen[2];
    MPI_Aint disp[2];
    MPI_Datatype datatype_out;
    int piggy=0;



    MPI_Type_struct(2, blocklen, disp, type, datatype_out);


    /* then I call the original send function and send my new datatype */
    original_send(MPI_BOTTOM, 1, datatype_out, dst, tag, sendmode,


This code works well. But if the data I want to piggyback is dynamically
allocated. I get this kind of error message:

        Pointer 0x823fab0 size 4 is outside [0xbfef8920,0x823fab4] for
        base ptr (nil) count 1 and data
Datatype 0x8240b90[] size 8 align 4 id 0 length 3 used 2
true_lb -1074820832 true_ub 136575668 (true_extent 1211396500) lb
-1074820832 ub 136575668 (extent 1211396500)
nbElems 2 loops 0 flags 102 (commited )-c-----GD--[---][---

Despite this message, the function works well too ...

Can someone explain me what this message means ? It seems that in the
first part of the error message, the lower bound and the upper bound of
the datatype are switched, but I don't know why.


Thomas Ropars