ompi/datatype: Fix args of DARRAY
According to MPI-3.1 P.122, `ni` for `MPI_COMBINER_DARRAY` should be `4*ndims+4`, not `4*size+4`. This bug may cause SEGV if `size` is smaller than `ndims` when the darray is used for one-sided communication (pt2pt OSC). This bug was introduced in open-mpi/ompi@79b13f36 (when darray became a first class citizen and the `a_i` index of darray was shifted by 2). The corresponding `MPI_Type_create_darray()` function sets a right value so we don't need to update the function.
Этот коммит содержится в:
родитель
b7e937fea5
Коммит
dff6accec6
@ -764,7 +764,7 @@ static ompi_datatype_t* __ompi_datatype_create_from_args( int32_t* i, MPI_Aint*
|
||||
{
|
||||
const int* a_i[8] = {&i[0], &i[1], &i[2], &i[3 + 0 * i[0]], &i[3 + 1 * i[0]], &i[3 + 2 * i[0]],
|
||||
&i[3 + 3 * i[0]], &i[3 + 4 * i[0]]};
|
||||
ompi_datatype_set_args( datatype, 4 * i[0] + 4,a_i, 0, NULL, 1, d, MPI_COMBINER_DARRAY);
|
||||
ompi_datatype_set_args( datatype, 4 * i[2] + 4, a_i, 0, NULL, 1, d, MPI_COMBINER_DARRAY);
|
||||
}
|
||||
break;
|
||||
/******************************************************************/
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user