Skip to content

Commit 843e50c

Browse files
authored
Merge pull request #5023 from edgargabriel/pr/v3.1.x-sequential-mode-fix
io/ompio: don't reset amode if MODE_SEQUENTIAL is set
2 parents f1d26a9 + e2a095b commit 843e50c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,13 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm,
112112

113113
/* This fix is needed for data seiving to work with
114114
two-phase collective I/O */
115-
if ((amode & MPI_MODE_WRONLY)){
116-
amode -= MPI_MODE_WRONLY;
117-
amode += MPI_MODE_RDWR;
118-
}
115+
if ( !(amode & MPI_MODE_SEQUENTIAL) ) {
116+
if ((amode & MPI_MODE_WRONLY)){
117+
amode -= MPI_MODE_WRONLY;
118+
amode += MPI_MODE_RDWR;
119+
}
120+
}
121+
119122
/*--------------------------------------------------*/
120123

121124

0 commit comments

Comments
 (0)