Skip to content

Commit

Permalink
added use_ext_ncid to the parameters sent when a file is created in a…
Browse files Browse the repository at this point in the history
…sync mode
  • Loading branch information
edhartnett committed Aug 23, 2019
1 parent f5ee162 commit d077e48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ int create_file_handler(iosystem_desc_t *ios)
int len;
int iotype;
int mode;
int use_ext_ncid;
int mpierr;

PLOG((1, "create_file_handler comproot = %d", ios->comproot));
Expand All @@ -191,8 +192,10 @@ int create_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__);
PLOG((1, "create_file_handler got parameters len = %d filename = %s iotype = %d mode = %d",
len, filename, iotype, mode));
if ((mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
PLOG((1, "create_file_handler len %d filename %s iotype %d mode %d "
"use_ext_ncid %d", len, filename, iotype, mode, use_ext_ncid));

/* Call the create file function. */
PIOc_createfile(ios->iosysid, &ncid, &iotype, filename, mode);
Expand Down
6 changes: 4 additions & 2 deletions src/clib/pioc_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,8 +2014,10 @@ PIOc_createfile_int(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);
PLOG((2, "len = %d filename = %s iotype = %d mode = %d", len, filename,
file->iotype, mode));
if (!mpierr)
mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, ios->compmaster, ios->intercomm);
PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d",
len, filename, file->iotype, mode, use_ext_ncid));
}

/* Handle MPI errors. */
Expand Down

0 comments on commit d077e48

Please sign in to comment.