Skip to content

Commit 2a60a9b

Browse files
committed
If AMODE not set in MPI_File_open, not all of ompio_fh is set, fixes #9083.
Signed-off-by: Rainer Keller <rainer.keller@hs-esslingen.de>
1 parent 928289e commit 2a60a9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ int mca_common_ompio_file_close (ompio_file_t *ompio_fh)
235235
int delete_flag = 0;
236236
char name[256];
237237

238+
/* Call coll_barrier only if collectives are set (same reasoning as below for f_fs) */
239+
if (NULL == ompio_fh->f_comm || NULL == ompio_fh->f_comm->c_coll)
240+
return OMPI_SUCCESS;
241+
238242
ret = ompio_fh->f_comm->c_coll->coll_barrier ( ompio_fh->f_comm, ompio_fh->f_comm->c_coll->coll_barrier_module);
239243
if ( OMPI_SUCCESS != ret ) {
240244
/* Not sure what to do */

0 commit comments

Comments
 (0)