Skip to content

Commit 5ef963c

Browse files
authored
Merge pull request open-mpi#5022 from edgargabriel/pr/v3.0.x-sequential-mode-fix
io/ompio: don't reset amode if MODE_SEQUENTIAL is set
2 parents fb403c9 + 1a27a8c commit 5ef963c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm,
111111

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

120122

0 commit comments

Comments
 (0)