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

Mosart provides invalid starts/counts to scorpio #3176

Closed
dqwu opened this issue Sep 9, 2019 · 0 comments · Fixed by #3178
Closed

Mosart provides invalid starts/counts to scorpio #3176

dqwu opened this issue Sep 9, 2019 · 0 comments · Fixed by #3178
Assignees
Labels
bug River SCORPIO The E3SM I/O library (derived from PIO)

Comments

@dqwu
Copy link
Contributor

dqwu commented Sep 9, 2019

When testing scorpio (PIO2) with latest E3SM on anlworkstation, 19 e3sm_developer tests failed:
https://my.cdash.org/viewTest.php?onlyfailed&buildid=1697655

Most of these tests did pass with scorpio_classic (PIO1) using latest E3SM, or with scorpio using a much older revision of E3SM.

One of the failed tests (ERS.ne11_oQU240.I20TRCLM45) shows the following error message:

Error termination. Backtrace:
At line 555 of file components/mosart/src/riverroute/RtmHistFile.F90
Fortran runtime error: Index '0' of dimension 1 of array 'rtmptr' below lower bound of 1

The affected line is:
field => rtmptr(hpindex)%ptr

By checking the restart file, we can find a lot of zero values for hpindex

int hpindex(max_nflds) ;
        hpindex:long_name = "History pointer index" ;
        hpindex:units = "unitless" ;
...
hpindex = 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0 ;

The expected non-zero values (from passed test with scorpio_classic) are:

hpindex = 12, 11, 3, 2, 1, 4, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 6, 5,
   8, 7, 14, 13, 10, 9 ;

We can confirm that the failure is caused by PR #3012 with git bisect. More specifically, a previous fix to components/mosart/src/riverroute/RtmIO.F90 (part of PR #2772 that fixes issue #2778) was accidentally reverted.

Without that fix, the starts/counts for puts where the vars (1d/2d/3d) had no time dimensions were wrong, i.e., always had an extra start/count corresponding to the time dimension.

When testing with scorpio these bugs showed up. Note, with scorpio_classic these bugs did not show up (inadvertently, since Fortran arrays always include the size).

We should reapply that reverted fix, and verify that it works for both scorpio_classic and scorpio.

@dqwu dqwu added bug River SCORPIO The E3SM I/O library (derived from PIO) labels Sep 9, 2019
@dqwu dqwu self-assigned this Sep 9, 2019
bishtgautam added a commit that referenced this issue Sep 11, 2019
This PR includes some fixes in Mosart required for scorpio (PIO2).

These fixes (reverted by PR #3012) are re-picked from PR #2772.
They are not specific to scorpio, but the bugs showed up during
testing with scorpio. They should be tested with scorpio_classic
as well.

Fixes #3176
[BFB]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug River SCORPIO The E3SM I/O library (derived from PIO)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant