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

Report negative zero min/max as positive #1009

Merged
merged 1 commit into from
Oct 1, 2019

Conversation

marshallward
Copy link
Collaborator

This patch addresses the inconsistency of signed zero in the minimum and
maximum values used in checksum report.

The behavior of the Fortran intrinsic min() and our MPI library's
implementation of MPI_Reduce with MPI_MIN can give different results for
different values of signed zero, e.g. min(0,-0) vs min(-0,0).
Additionally, the MPI_Reduce result appears to not consistenty follow
these rules in more complex MPI calculations.

This can give different results depending on model layout.

Due to these issues, we add the result to positive zero to ensure that
any negative zero results are reported as positive.

This PR also enables diagnostic checksum testing, which now passes for all tests.

This patch addresses the inconsistency of signed zero in the minimum and
maximum values used in checksum report.

The behavior of the Fortran intrinsic min() and our MPI library's
implementation of MPI_Reduce with MPI_MIN can give different results for
different values of signed zero, e.g. min(0,-0) vs min(-0,0).
Additionally, the MPI_Reduce result appears to not consistenty follow
these rules in more complex MPI calculations.

Due to these issues, we add the result to positive zero to ensure that
any negative zero results are reported as positive.
@marshallward
Copy link
Collaborator Author

Gaea regression testing: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/9050

@marshallward
Copy link
Collaborator Author

Regression tests have passed.

Copy link
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

@adcroft adcroft merged commit 3418c1d into mom-ocean:dev/gfdl Oct 1, 2019
@marshallward marshallward deleted the negzero_minmax_log branch February 14, 2020 18:33
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.

2 participants