Correctly set the upper and lower bound for the subarray and darray.
Этот коммит содержится в:
родитель
39608176db
Коммит
ded4cbf20f
@ -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 );
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user