Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Feature request: print PIO error return codes #1339

Open
matthewhoffman opened this issue May 23, 2017 · 2 comments
Open

Feature request: print PIO error return codes #1339

matthewhoffman opened this issue May 23, 2017 · 2 comments

Comments

@matthewhoffman
Copy link
Member

A commonly encountered MPAS error is ERROR: MPAS IO Error: Bad return value from PIO,
but this may indicate many possible i/o errors.

In mpas_io.F we are actually capturing an error code from PIO that represents one of dozens of possible errors, but we do not retain that information. The way MPAS I/O is constructed, the PIO error code would have to be passed into MPAS_io_err_mesg to be written as part of the above message. Conceptually this appears straightforward, but would require modifying over 40 routines.

Here are the possible return codes:
http://cucis.ece.northwestern.edu/projects/PnetCDF/doc/pnetcdf-c/Error-Codes.html

@matthewhoffman
Copy link
Member Author

An alternative approach might be to make pio_ierr a module level variable in mpas_io.F. Then MPAS_io_err_mesg would have access to the most recent pio error code to be used when writing the error message to the log. However, it looks like the offending error could easily be clobbered by a subsequent PIO call and lost. I guess a different implementation would have a PIO error module level variable that only gets set if an error occurs. It could contain only the most recent error, or the last n errors. And then get reset each time those error codes are written out.

@xylar
Copy link
Contributor

xylar commented Jun 6, 2017

@matthewhoffman, this is an issue that has long annoyed me and I'd be happy to be part of figuring out a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants