From ba2bb47db632aa9ebc0d64666e748fe7bb98c6d8 Mon Sep 17 00:00:00 2001 From: edwardhartnett Date: Fri, 23 Aug 2019 13:34:43 -0600 Subject: [PATCH] added ncidp_present to the parameters sent when a file is created in async mode --- src/clib/pio_msg.c | 6 +++++- src/clib/pioc_support.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/clib/pio_msg.c b/src/clib/pio_msg.c index b8fc7f31882..091ae927799 100644 --- a/src/clib/pio_msg.c +++ b/src/clib/pio_msg.c @@ -173,6 +173,7 @@ int create_file_handler(iosystem_desc_t *ios) int iotype; int mode; int use_ext_ncid; + char ncidp_present; int mpierr; PLOG((1, "create_file_handler comproot = %d", ios->comproot)); @@ -194,8 +195,11 @@ int create_file_handler(iosystem_desc_t *ios) 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__); + if ((mpierr = MPI_Bcast(&ncidp_present, 1, MPI_CHAR, 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)); + "use_ext_ncid %d ncidp_present", len, filename, iotype, mode, + use_ext_ncid, ncidp_present)); /* Call the create file function. */ PIOc_createfile(ios->iosysid, &ncid, &iotype, filename, mode); diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index b9102233f37..f863e1fb3d6 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -1998,6 +1998,7 @@ PIOc_createfile_int(int iosysid, int *ncidp, int *iotype, const char *filename, if (!ios->ioproc) { int msg = PIO_MSG_CREATE_FILE; + char ncidp_present = ncidp ? 1 : 0; size_t len = strlen(filename); /* Send the message to the message handler. */ @@ -2016,8 +2017,11 @@ PIOc_createfile_int(int iosysid, int *ncidp, int *iotype, const char *filename, 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); - PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d", - len, filename, file->iotype, mode, use_ext_ncid)); + if (!mpierr) + mpierr = MPI_Bcast(&ncidp_present, 1, MPI_CHAR, 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)); } /* Handle MPI errors. */