1
1

ddt: correctly align next datatype description

This bug can be evidenced by the test/datatype/ddt_pack
test case on sparc architecture.
Этот коммит содержится в:
Gilles Gouaillardet 2015-04-30 15:02:00 +09:00
родитель 06ee9f9ddf
Коммит 697a866b6e

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

@ -13,6 +13,8 @@
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -466,12 +468,13 @@ static inline int __ompi_datatype_pack_description( ompi_datatype_t* datatype,
position = (int*)next_packed;
next_packed += sizeof(int) * args->cd;
/* description of next datatype should be 64 bits aligned */
OMPI_DATATYPE_ALIGN_PTR(next_packed, char*);
/* copy the aray of counts (32 bits aligned) */
memcpy( next_packed, args->i, sizeof(int) * args->ci );
next_packed += args->ci * sizeof(int);
/* description of next datatype should be 64 bits aligned */
OMPI_DATATYPE_ALIGN_PTR(next_packed, char*);
/* copy the rest of the data */
for( i = 0; i < args->cd; i++ ) {
ompi_datatype_t* temp_data = args->d[i];