Skip to content

Commit b6e501b

Browse files
authored
Merge pull request #6913 from jsquyres/pr/v3.0.x/datatype-fix
v3.0.x: Fix a corner case for the datatype extent computation.
2 parents a9b5c5c + f1d0fd7 commit b6e501b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

opal/datatype/opal_datatype_add.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
44
* University Research and Technology
55
* Corporation. All rights reserved.
6-
* Copyright (c) 2004-2017 The University of Tennessee and The University
6+
* Copyright (c) 2004-2019 The University of Tennessee and The University
77
* of Tennessee Research Foundation. All rights
88
* reserved.
99
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@@ -300,7 +300,8 @@ int32_t opal_datatype_add( opal_datatype_t* pdtBase, const opal_datatype_t* pdtA
300300
if( pdtAdd->ptypes[i] != 0 ) pdtBase->ptypes[i] += (count * pdtAdd->ptypes[i]);
301301
}
302302
if( (1 == pdtAdd->desc.used) && (extent == (pdtAdd->ub - pdtAdd->lb)) &&
303-
(extent == pdtAdd->desc.desc[0].elem.extent) ){
303+
(extent == pdtAdd->desc.desc[0].elem.extent) &&
304+
(extent == (pdtAdd->true_ub - pdtAdd->true_lb)) ) {
304305
pLast->elem = pdtAdd->desc.desc[0].elem;
305306
pLast->elem.count *= count;
306307
pLast->elem.disp += disp;

0 commit comments

Comments
 (0)