Skip to content

Commit 321000c

Browse files
authored
Merge pull request #11608 from bosilca/fix/issue_11607
Correctly compute the length of contiguous blocks during optimization
2 parents f881440 + 3c7f93f commit 321000c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ompi/datatype/ompi_datatype_create_struct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ int32_t ompi_datatype_create_struct( int count, const int* pBlockLength, const p
3333
{
3434
ptrdiff_t disp = 0, endto, lastExtent, lastDisp;
3535
ompi_datatype_t *pdt, *lastType;
36-
int lastBlock;
3736
int i, start_from;
37+
size_t lastBlock;
3838

3939
/* Find first non-zero length element */
4040
for( i = 0; (i < count) && (0 == pBlockLength[i]); i++ );

test/datatype/opal_ddt_lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,7 @@ static int32_t opal_datatype_create_struct(int count, const int *pBlockLength,
365365
opal_datatype_t **newType)
366366
{
367367
int i;
368-
ptrdiff_t disp = 0, endto, lastExtent, lastDisp;
369-
int lastBlock;
368+
ptrdiff_t disp = 0, endto, lastExtent, lastDisp, lastBlock;
370369
opal_datatype_t *pdt, *lastType;
371370

372371
if (0 == count) {

0 commit comments

Comments
 (0)