Skip to content

Commit 8e17827

Browse files
committed
common/ompio: fix the lazy_open flag
fixes an erroneous error code being returned when activating the mca_io_ompio_sharedfp_lazy_open flag with MPI_MODE_APPEND. fixes issue #3904 Signed-off-by: Edgar Gabriel <[email protected]>
1 parent b0692c6 commit 8e17827

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm,
200200
!mca_io_ompio_sharedfp_lazy_open ) {
201201
shared_fp_base_module = ompio_fh->f_sharedfp;
202202
ret = shared_fp_base_module->sharedfp_seek(ompio_fh,current_size, MPI_SEEK_SET);
203-
}
204-
else {
205-
opal_output(1, "mca_common_ompio_file_open: Could not adjust position of "
206-
"shared file pointer with MPI_MODE_APPEND\n");
207-
ret = MPI_ERR_OTHER;
208-
goto fn_fail;
203+
if ( MPI_SUCCESS != ret ) {
204+
opal_output(1, "mca_common_ompio_file_open: Could not adjust position of "
205+
"shared file pointer with MPI_MODE_APPEND\n");
206+
ret = MPI_ERR_OTHER;
207+
goto fn_fail;
208+
}
209209
}
210210
}
211211

0 commit comments

Comments
 (0)