Skip to content

Commit d5c4e86

Browse files
kawashima-fjbosilca
authored andcommitted
ompi/datatype: Fix args of HINDEXED_BLOCK
According to MPI-3.1 P.121, `ni` for `MPI_COMBINER_HINDEXED_BLOCK` should be `2`, not `2 + count`. This bug was introduced in 113b45b (when `MPI_Type_create_hindexed_block` support is added in Open MPI) and fixed partially in 7f5314e and 8de9398. This commit fixes the remaining part. Probably this bug has no user impact. It only consumes a bit more memory.
1 parent 7090a80 commit d5c4e86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/datatype/ompi_datatype_args.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static ompi_datatype_t* __ompi_datatype_create_from_args( int32_t* i, MPI_Aint*
788788
ompi_datatype_create_hindexed_block( i[0], i[1], a, d[0], &datatype );
789789
{
790790
const int* a_i[2] = {&i[0], &i[1]};
791-
ompi_datatype_set_args( datatype, 2 + i[0], a_i, i[0], a, 1, d, MPI_COMBINER_HINDEXED_BLOCK );
791+
ompi_datatype_set_args( datatype, 2, a_i, i[0], a, 1, d, MPI_COMBINER_HINDEXED_BLOCK );
792792
}
793793
break;
794794
/******************************************************************/

0 commit comments

Comments
 (0)