From ae93759001640069666df5d347f96b383d548da8 Mon Sep 17 00:00:00 2001 From: edwardhartnett Date: Fri, 23 Aug 2019 13:43:52 -0600 Subject: [PATCH] now use PIOc_createfile_int() instead of PIOc_createfile() in pio_msg.c for async --- src/clib/pio_file.c | 13 +++---------- src/clib/pio_msg.c | 3 ++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/clib/pio_file.c b/src/clib/pio_file.c index f4b91d1bf98..631d1fa0c85 100644 --- a/src/clib/pio_file.c +++ b/src/clib/pio_file.c @@ -159,16 +159,9 @@ PIOc_createfile(int iosysid, int *ncidp, int *iotype, const char *filename, if ((ret = PIOc_createfile_int(iosysid, ncidp, iotype, filename, mode, 0))) return pio_err(ios, NULL, ret, __FILE__, __LINE__); - /* Run this on all tasks if async is not in use, but only on - * non-IO tasks if async is in use. (Because otherwise, in async - * mode, set_fill would be called twice by each IO task, since - * PIOc_createfile() will already be called on each IO task.) */ - if (!ios->async || !ios->ioproc) - { - /* Set the fill mode to NOFILL. */ - if ((ret = PIOc_set_fill(*ncidp, NC_NOFILL, NULL))) - return ret; - } + /* Set the fill mode to NOFILL. */ + if ((ret = PIOc_set_fill(*ncidp, NC_NOFILL, NULL))) + return ret; return ret; } diff --git a/src/clib/pio_msg.c b/src/clib/pio_msg.c index 5d0116ce196..988f2b71447 100644 --- a/src/clib/pio_msg.c +++ b/src/clib/pio_msg.c @@ -205,7 +205,8 @@ int create_file_handler(iosystem_desc_t *ios) use_ext_ncid, ncidp_present, ncid)); /* Call the create file function. */ - PIOc_createfile(ios->iosysid, &ncid, &iotype, filename, mode); + PIOc_createfile_int(ios->iosysid, &ncid, &iotype, filename, mode, + use_ext_ncid); PLOG((1, "create_file_handler succeeded!")); return PIO_NOERR;