1
1

Correctly set the upper and lower bound for the subarray and darray.

Этот коммит содержится в:
George Bosilca 2015-01-19 02:26:14 -05:00
родитель 39608176db
Коммит ded4cbf20f
2 изменённых файлов: 3 добавлений и 2 удалений

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

@ -271,7 +271,7 @@ int32_t ompi_datatype_create_darray(int size,
rc = ompi_datatype_create_struct(3, blength, displs, types, newtype);
} else {
ompi_datatype_create_resized(lastType, displs[0], displs[2], newtype);
ompi_datatype_create_resized(lastType, displs[1], displs[2], newtype);
}
ompi_datatype_destroy(&lastType);
/* need to destroy the old type even in error condition, so

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

@ -84,6 +84,7 @@ int32_t ompi_datatype_create_subarray(int ndims,
ompi_datatype_create_hvector( subsize_array[i], 1, size * extent,
last_type, newtype );
ompi_datatype_destroy( &last_type );
displ += size * start_array[i];
size *= size_array[i];
last_type = *newtype;
@ -105,7 +106,7 @@ int32_t ompi_datatype_create_subarray(int ndims,
types[0] = MPI_LB; types[1] = last_type; types[2] = MPI_UB;
ompi_datatype_create_struct( 3, blength, displs, types, newtype );
} else {
ompi_datatype_create_resized(last_type, 0, size * extent, newtype);
ompi_datatype_create_resized(last_type, displ * extent, size * extent, newtype);
}
ompi_datatype_destroy( &last_type );