Skip to content

Commit

Permalink
added contents of ncidp when ncidp_present to the parameters sent whe…
Browse files Browse the repository at this point in the history
…n a file is created in async mode
  • Loading branch information
edhartnett committed Aug 23, 2019
1 parent ba2bb47 commit 9f91675
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int set_fill_handler(iosystem_desc_t *ios)
*/
int create_file_handler(iosystem_desc_t *ios)
{
int ncid;
int ncid = 0;
int len;
int iotype;
int mode;
Expand Down Expand Up @@ -197,14 +197,16 @@ int create_file_handler(iosystem_desc_t *ios)
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
if ((mpierr = MPI_Bcast(&ncidp_present, 1, MPI_CHAR, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
if (ncidp_present)
if ((mpierr = MPI_Bcast(&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 ncidp_present", len, filename, iotype, mode,
use_ext_ncid, ncidp_present));
"use_ext_ncid %d ncidp_present %d ncid %d", len, filename, iotype, mode,
use_ext_ncid, ncidp_present, ncid));

/* Call the create file function. */
PIOc_createfile(ios->iosysid, &ncid, &iotype, filename, mode);


PLOG((1, "create_file_handler succeeded!"));
return PIO_NOERR;
}
Expand Down
3 changes: 3 additions & 0 deletions src/clib/pioc_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,9 @@ PIOc_createfile_int(int iosysid, int *ncidp, int *iotype, const char *filename,
mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, ios->compmaster, ios->intercomm);
if (!mpierr)
mpierr = MPI_Bcast(&ncidp_present, 1, MPI_CHAR, ios->compmaster, ios->intercomm);
if (ncidp_present)
if (!mpierr)
mpierr = MPI_Bcast(ncidp, 1, MPI_INT, ios->compmaster, ios->intercomm);
PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d "
"ncidp_present %d", len, filename, file->iotype, mode,
use_ext_ncid, ncidp_present));
Expand Down

0 comments on commit 9f91675

Please sign in to comment.