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

Update print_variable functions and test_output files to comply with printf output. #34

Merged

Conversation

robgpita
Copy link
Contributor

@robgpita robgpita commented Feb 23, 2021

Proposed changes

This PR closes #32. The print_state() function is outputting non-standard scientific notation, and incompatible with standards used by other languages (C, C++, Julia) and other printf based I/O.

Fortran is the outlier in how scientific notation is expressed. The current output makes it very difficult for others to use baselines for testing.

The write statements in the print_3d_variable & print_2d_variable functions have been changed, and all of the files within the ref/test/test_output directory have been altered to reflect the new scientific notation necessary to comply with future testing of the kernel.

Types of changes

What types of changes does your code introduce?

  • Bugfix (Change which fixes an issue)
  • New feature (Change which adds functionality)
  • Enhancement to existing functionality (non-breaking change which improves existing code or documentation)
  • Breaking change (fix or feature that changes results and requires updates to test baselines)
  • Documentation Update

Checklist

  • I have read the CONTRIBUTING document
  • I have ensured all my changes contribute to a common purpose
  • I have verified my change does not add debug code
  • I have verified my change does not add code that is commented out
  • I have verified unit tests pass locally with my changes
  • I have verified my changes adhere to style guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@middlecoff middlecoff marked this pull request as ready for review February 24, 2021 00:12
middlecoff
middlecoff previously approved these changes Feb 24, 2021
Copy link
Contributor

@middlecoff middlecoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Contributor

@LyndStringer LyndStringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a minimum, we need to talk about the 11 to 12 digits change. We have already throttled back the fused multiply-adds to keep 11 digits. Again, 12 digits will be troublesome.

ref/test/test_output/c_sw_12x24.test Show resolved Hide resolved
@robgpita robgpita closed this Feb 24, 2021
@robgpita robgpita reopened this Feb 24, 2021
…y, and update baselines in /test_output to reflect this change
Copy link
Contributor

@LyndStringer LyndStringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@christopherwharrop-noaa christopherwharrop-noaa merged commit 0653127 into NOAA-GSL:develop Feb 24, 2021
@robgpita robgpita deleted the feature/print_state branch February 24, 2021 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid scientific notation output by print_state()
4 participants