Skip to content

Commit 0f345c0

Browse files
authored
Merge pull request #4888 from edgargabriel/topic/romio_size0_contiguous_flag
io/romio314: mark datatypes of size 0 as contiguous
2 parents 70c59f7 + c83b47c commit 0f345c0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ompi/mca/io/romio314/src/io_romio314_module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag)
137137
* In addition, if the data is contiguous but true_lb differes
138138
* from zero, ROMIO will ignore the displacement. Thus, lie!
139139
*/
140+
141+
size_t size;
142+
opal_datatype_type_size (&datatype->super, &size);
143+
if ( 0 == size ) {
144+
*flag = 1;
145+
return;
146+
}
147+
140148
*flag = ompi_datatype_is_contiguous_memory_layout(datatype, 2);
141149
if (*flag) {
142150
MPI_Aint true_extent, true_lb;

0 commit comments

Comments
 (0)