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

Fixes an integer-kind mismatch in MOM_random, seed_from_time() #1113

Merged
merged 1 commit into from
May 19, 2020
Merged

Fixes an integer-kind mismatch in MOM_random, seed_from_time() #1113

merged 1 commit into from
May 19, 2020

Commits on May 19, 2020

  1. Fixes an integer-kind mismatch in MOM_random, seed_from_time()

    - gcc/8.3.0 issued `Error: Integer too big for its kind` reported in
      feedback on PR #1111. The intent was to assume kind=4 in these
      calculations but apparently our compilers were promoting
      `mod(dy + 32*(mo + 13*yr), 2147483648)` to kind=8. There were two
      mistakes in the expression:
      - the use of `2147483648` in the `mod` is not representable with kind=4;
      - the `mod` produces negative values and should have been a `modulo`.
    - This commit reduces the range of the results by one number on the
      positive side and removes all the negatives.
    adcroft committed May 19, 2020
    Configuration menu
    Copy the full SHA
    fab21a7 View commit details
    Browse the repository at this point in the history