Skip to content

Commit e598bb5

Browse files
authored
Merge pull request #9187 from edgargabriel/pr/file_close_incomplete_handle_fix_v4.1
Pr/file close incomplete handle fix v4.1
2 parents 5ba7ef0 + df16a9a commit e598bb5

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)