Skip to content

Commit

Permalink
Merge pull request #1013 from NCAR/pnetcdf_allow_no_buffer_error
Browse files Browse the repository at this point in the history
allow error NC_ENULLABUF from netcddf when checking buffer status
  • Loading branch information
edhartnett authored Apr 29, 2017
2 parents 06d18e2 + b6e6c19 commit 562c88d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/clib/pio_darray_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,9 @@ int flush_output_buffer(file_desc_t *file, bool force, PIO_Offset addsize)

/* Find out the buffer usage. */
if ((ierr = ncmpi_inq_buffer_usage(file->fh, &usage)))
return pio_err(NULL, file, PIO_EBADID, __FILE__, __LINE__);
/* allow the buffer to be undefined */
if (ierr != NC_ENULLABUF)
return pio_err(NULL, file, PIO_EBADID, __FILE__, __LINE__);

/* If we are not forcing a flush, spread the usage to all IO
* tasks. */
Expand Down

0 comments on commit 562c88d

Please sign in to comment.