Skip to content

Commit f760c1d

Browse files
authored
Merge pull request #9084 from hpcraink/master
If AMODE not set in MPI_File_open, not all of ompio_fh is set, fixes …
2 parents 928289e + 2e813da commit f760c1d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ 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+
}
242+
238243
ret = ompio_fh->f_comm->c_coll->coll_barrier ( ompio_fh->f_comm, ompio_fh->f_comm->c_coll->coll_barrier_module);
239244
if ( OMPI_SUCCESS != ret ) {
240245
/* Not sure what to do */

0 commit comments

Comments
 (0)