Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check module and glue code outputs for NaN's before writing to file #712

Open
andrew-platt opened this issue Apr 9, 2021 · 0 comments
Open
Assignees

Comments

@andrew-platt
Copy link
Collaborator

andrew-platt commented Apr 9, 2021

Is your feature request related to a problem? Please describe.
At present, no validation of output values is done prior to writing to file. If a simulation runs into numerical issues that produce NaN or Infiinity values, these are written to the output file without getting caught.

Describe the solution you'd like
Before writing to file, step through all output values and check that they are finite values. This can be done using the CheckRealVar subroutine in the library to check that the value is not NaN and is finite.

Describe alternatives you've considered
We've simply ignored any possible NaN values in output files. Catching these at file writing will lead to more robust code as programmers are forced to ensure valid outputs, and will help catch model issues early.

This can also help catch uninitialized variables if testing similar to the procedure in #711 is done.

Additional context
This idea was prompted by an issue in the regression testing not catching NaN values (#711).

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

No branches or pull requests

2 participants