From aa4e9da26d138673ab0da87cafeb659099c21884 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Sat, 13 Dec 2008 01:57:27 +0000 Subject: [PATCH] Correct the disp array when creating a data based on the MPI_COMBINER_INDEXED_BLOCK combiner. This commit was SVN r20123. --- ompi/datatype/convertor.h | 10 ++++++---- ompi/datatype/dt_args.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ompi/datatype/convertor.h b/ompi/datatype/convertor.h index dc5f46abde..7c3a78119b 100644 --- a/ompi/datatype/convertor.h +++ b/ompi/datatype/convertor.h @@ -159,10 +159,12 @@ static inline int ompi_convertor_cleanup( ompi_convertor_t* convertor ) } /* - * Return: 0 if data is nor required to be packed for sending - * 1 if data does need to be packed (src and destination are - * heterogenous from a data perspective, or data is not - * contigous. + * Return: 0 if no packing is required for sending (the upper layer + * can use directly the pointer to the contiguous user + * buffer). + * 1 if data does need to be packed, i.e. heterogeneous peers + * (source arch != dest arch) or non contiguous memory + * layout. */ static inline int32_t ompi_convertor_need_buffers( const ompi_convertor_t* pConvertor ) diff --git a/ompi/datatype/dt_args.c b/ompi/datatype/dt_args.c index 293c696ad4..243b95b5c6 100644 --- a/ompi/datatype/dt_args.c +++ b/ompi/datatype/dt_args.c @@ -657,7 +657,7 @@ __ompi_ddt_create_from_args( int32_t* i, MPI_Aint* a, break; /******************************************************************/ case MPI_COMBINER_INDEXED_BLOCK: - ompi_ddt_create_indexed_block( i[0], i[1], &(i[1+i[0]]), d[0], &datatype ); + ompi_ddt_create_indexed_block( i[0], i[1], &(i[2]), d[0], &datatype ); break; /******************************************************************/ case MPI_COMBINER_STRUCT_INTEGER: