Skip to content

Commit 9ba6ab8

Browse files
committed
mca/fs: Check the existence of communicator in file query
The communicator might be not existent yet when mca_fs_gpfs_component_file_query() is called. Therefore, we need to check it first before calling brodcast function. Signed-off-by: raafatfeki <[email protected]>
1 parent 207b267 commit 9ba6ab8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ompi/mca/fs/gpfs/fs_gpfs.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ mca_fs_gpfs_component_file_query (ompio_file_t *fh, int *priority)
9292
if (OMPIO_ROOT == fh->f_rank) {
9393
fh->f_fstype = mca_fs_base_get_fstype ( (char *) fh->f_filename );
9494
}
95-
fh->f_comm->c_coll->coll_bcast (&(fh->f_fstype),
96-
1,
97-
MPI_INT,
98-
OMPIO_ROOT,
99-
fh->f_comm,
100-
fh->f_comm->c_coll->coll_bcast_module);
95+
if (MPI_COMM_NULL != fh->f_comm) {
96+
fh->f_comm->c_coll->coll_bcast (&(fh->f_fstype),
97+
1,
98+
MPI_INT,
99+
OMPIO_ROOT,
100+
fh->f_comm,
101+
fh->f_comm->c_coll->coll_bcast_module);
102+
}
101103
}
102104
else {
103105
if (!strncmp(fh->f_filename, "gpfs:", 5) ||

0 commit comments

Comments
 (0)