Skip to content

Commit

Permalink
now use PIOc_createfile_int() instead of PIOc_createfile() in pio_msg…
Browse files Browse the repository at this point in the history
….c for async
  • Loading branch information
edhartnett committed Aug 23, 2019
1 parent 9f91675 commit ae93759
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
13 changes: 3 additions & 10 deletions src/clib/pio_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae93759

Please sign in to comment.