1
1
openmpi/ompi/datatype
Mark Allen aeb2c02d2f Type_create_darray with mix of BLOCK/CYCLIC
Example (using MPI_ORDER_C so the below has 6 rows of 4 ints to parcel out)
    size = 4;
    rank = 0;
    ndims=2;
    gsizes[0] = 6;
    gsizes[1] = 4;
    distribs[0] = MPI_DISTRIBUTE_CYCLIC;
    distribs[1] = MPI_DISTRIBUTE_BLOCK;
    dargs[0] = 2;
    dargs[1] = 2;
    psizes[0] = 2;
    psizes[1] = 2;
    MPI_Type_create_darray(size, rank, ndims,
        gsizes, distribs, dargs, psizes,
        MPI_ORDER_C, MPI_INT, &mydt);

Expectation for the layout:
   inner dimension (1) is
       4 items (ints) distributed block over 2 ranks with 2 items each
       eg for rank 0: [ x x . . ]
   outer dimension (0) is:
       6 items (the above [ x x . .]) cyclic over 2 ranks with 2 items each
       eg for rank 0:
           [ x x . . ]    :  offset=0 bytes=8
           [ x x . . ]    :  ofset=16 bytes=8
           [ . . . . ]
           [ . . . . ]
           [ x x . . ]    :  offset=64 bytes=8
           [ x x . . ]    :  offset=80 bytes=8

Or more specifically a stream of ints 0,1,2,3,4,5,6,7 sent into that
type should be
    [ 0 1 . . ]
    [ 2 3 . . ]
    [ . . . . ]
    [ . . . . ]
    [ 4 5 . . ]
    [ 6 7 . . ]
The data was laying out though as
    [ 0 1 2 3 ]
    [ . . . . ]
    [ . . . . ]
    [ . . . . ]
    [ 4 5 6 7 ]
    [ . . . . ]
because the recursive construction inside the block() function (which
creates the smaller row datatype [ x x . . ]) wasn't setting the extent
of that type.

Signed-off-by: Mark Allen <markalle@us.ibm.com>
2017-06-07 16:53:03 -04:00
..
Makefile.am Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype_args.c use ptrdiff_t instead of OPAL_PTRDIFF_TYPE 2017-04-19 13:41:56 +09:00
ompi_datatype_create_contiguous.c Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype_create_darray.c Type_create_darray with mix of BLOCK/CYCLIC 2017-06-07 16:53:03 -04:00
ompi_datatype_create_indexed.c use ptrdiff_t instead of OPAL_PTRDIFF_TYPE 2017-04-19 13:41:56 +09:00
ompi_datatype_create_struct.c use ptrdiff_t instead of OPAL_PTRDIFF_TYPE 2017-04-19 13:41:56 +09:00
ompi_datatype_create_subarray.c Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype_create_vector.c use ptrdiff_t instead of OPAL_PTRDIFF_TYPE 2017-04-19 13:41:56 +09:00
ompi_datatype_create.c Improve the opal_pointer_array & more (#3369) 2017-04-18 21:41:26 -04:00
ompi_datatype_external32.c Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype_external.c Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype_get_elements.c Topic/datatype (#3441) 2017-05-09 09:31:40 -04:00
ompi_datatype_internal.h Topic/datatype (#3441) 2017-05-09 09:31:40 -04:00
ompi_datatype_match_size.c Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype_module.c Topic/datatype (#3441) 2017-05-09 09:31:40 -04:00
ompi_datatype_sndrcv.c Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_datatype.h predefined MPI object padding: set to fixed number of bytes (#3634) 2017-06-01 15:28:23 -04:00