1
1

This is the real fix for ticket 317 and ticket 1065 and ticket 278.

This commit was SVN r16084.
Этот коммит содержится в:
George Bosilca 2007-09-10 22:27:59 +00:00
родитель 8622beda54
Коммит 8659a864e9

Просмотреть файл

@ -87,8 +87,7 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
*/ */
if( extent == -1 ) extent = (pdtAdd->ub - pdtAdd->lb); if( extent == -1 ) extent = (pdtAdd->ub - pdtAdd->lb);
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) { /* add a basic datatype */ /* handle special cases for DT_LB and DT_UB and their duplicate */
/* handle special cases for DT_LB and DT_UB */
if( DT_LB == pdtAdd->id ) { if( DT_LB == pdtAdd->id ) {
pdtBase->bdt_used |= (((uint64_t)1) << DT_LB); pdtBase->bdt_used |= (((uint64_t)1) << DT_LB);
if( pdtBase->flags & DT_FLAG_USER_LB ) { if( pdtBase->flags & DT_FLAG_USER_LB ) {
@ -114,6 +113,7 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
} }
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) { /* add a basic datatype */
place_needed = (extent == (ptrdiff_t)pdtAdd->size ? 1 : 3); place_needed = (extent == (ptrdiff_t)pdtAdd->size ? 1 : 3);
} else { } else {
place_needed = pdtAdd->desc.used; place_needed = pdtAdd->desc.used;