Skip to content

Commit

Permalink
now pass use_ext_ncid to open_file_handler() in pio_msg.c
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Sep 3, 2019
1 parent 5f46649 commit e1f1c88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1970,6 +1970,7 @@ int open_file_handler(iosystem_desc_t *ios)
int len;
int iotype;
int mode;
int use_ext_ncid;
int mpierr;

PLOG((1, "open_file_handler comproot = %d", ios->comproot));
Expand All @@ -1990,13 +1991,16 @@ int open_file_handler(iosystem_desc_t *ios)
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
if ((mpierr = MPI_Bcast(&mode, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
if ((mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);

PLOG((2, "open_file_handler got parameters len = %d filename = %s iotype = %d mode = %d",
len, filename, iotype, mode));
PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d",
len, filename, iotype, mode, use_ext_ncid));

/* Call the open file function. Errors are handled within
* function, so return code can be ignored. */
PIOc_openfile_retry(ios->iosysid, &ncid, &iotype, filename, mode, 0, 0);
PIOc_openfile_retry(ios->iosysid, &ncid, &iotype, filename, mode, 0,
use_ext_ncid);

return PIO_NOERR;
}
Expand Down
2 changes: 2 additions & 0 deletions src/clib/pioc_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -2573,6 +2573,8 @@ PIOc_openfile_retry(int iosysid, int *ncidp, int *iotype, const char *filename,
mpierr = MPI_Bcast(&file->iotype, 1, MPI_INT, ios->compmaster, ios->intercomm);
if (!mpierr)
mpierr = MPI_Bcast(&mode, 1, MPI_INT, ios->compmaster, ios->intercomm);
if (!mpierr)
mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, ios->compmaster, ios->intercomm);
}

/* Handle MPI errors. */
Expand Down

0 comments on commit e1f1c88

Please sign in to comment.