On Tue, Jan 20, 2015 at 10:01 PM, Gilles Gouaillardet <
gilles.gouaillar...@iferc.org> wrote:

> 2) the mpi_test_suite uses a weird type (e.g. artificially send 20k
> integers to the wire when sending one
>  would produce the very same result)
> i briefly checked the mpi_test_suite source code, and the weird type is
> send/recv with buffers whose size
> is one element.
> i can only guess the authors wanted to send a large message to the wire
> (e.g. create traffic) without pointless
> large memory allocation.
> at this stage, i am tempted to conclude the authors did what they intended.
>

Receiving with such a datatype is illegal in MPI (sending is allowed as the
buffer is supposed read only during the operation). In fact having any
datatype that span over the same memory region twice is illegal to be used
for any receive operations. The reason is simple, an MPI implementation can
move the data in any order it wants, and as MPI guaranteed only the FIFO
ordering of the matching such a datatype will break the determinism of the
application.

We should ping the authors of the test code to address this.

  George.



>
> Cheers,
>
> Gilles
>
> On 2015/01/21 3:00, Jeff Squyres (jsquyres) wrote:
> > George is right -- Gilles: was this the correct solution?
> >
> > Put differently: the extent of the 20K vector created below is 4 (bytes).
> >
> >
> >
> >> On Jan 19, 2015, at 2:39 AM, George Bosilca <bosi...@icl.utk.edu>
> wrote:
> >>
> >> Btw,
> >>
> >> MPI_Type_hvector(20000, 1, 0, MPI_INT, &type);
> >>
> >> Is just a weird datatype. Because the stride is 0, this datatype a
> memory layout that includes 20000 times the same int. I'm not sure this was
> indeed intended...
> >>
> >>   George.
> >>
> >>
> >> On Mon, Jan 19, 2015 at 12:17 AM, Gilles Gouaillardet <
> gilles.gouaillar...@iferc.org> wrote:
> >> Adrian,
> >>
> >> i just fixed this in the master
> >> (
> https://github.com/open-mpi/ompi/commit/d14daf40d041f7a0a8e9d85b3bfd5eb570495fd2
> )
> >>
> >> the root cause is a corner case was not handled correctly :
> >>
> >> MPI_Type_hvector(20000, 1, 0, MPI_INT, &type);
> >>
> >> type has extent = 4 *but* size = 80000
> >> ob1 used to test only the extent to determine whether the message should
> >> be sent inlined or not
> >> extent <= 256 means try to send the message inline
> >> that meant a fragment of size 80000 (which is greater than 65536 e.g.
> >> max default size for IB) was allocated,
> >> and that failed.
> >>
> >> now both extent and size are tested, so the message is not sent inline,
> >> and it just works.
> >>
> >> Cheers,
> >>
> >> Gilles
> >> _______________________________________________
> >> devel mailing list
> >> de...@open-mpi.org
> >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> >> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2015/01/16798.php
> >>
> >> _______________________________________________
> >> devel mailing list
> >> de...@open-mpi.org
> >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> >> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2015/01/16801.php
> >
>
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2015/01/16808.php
>

Reply via email to