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

nstreams used before being initialized (compiling with -init=huge) #43

Closed
phil-blain opened this issue Aug 10, 2022 · 3 comments
Closed

Comments

@phil-blain
Copy link
Owner

nstreams is initialized in ice_history::init_hist, but is used in ice_calendar::calendar, called from ice_calendar::init_calendar. The calling sequence in CICE_InitMod::cice_init is:

132           call init_calendar        ! initialize some calendar stuff
133           call init_hist (dt)       ! initialize output history file

So it's used before being initialized. This was found by compiling with -init=huge which initializes integers to their maximum value; nstreams was 2147483647 in the core dump and the model aborted because histfreq was accessed at index 6 while it has size 5 (thanks to -check).

Might be worth it to run the full suite with that flag, see what we uncover!

@phil-blain
Copy link
Owner Author

So it seems -init=huge,arrays still initializes reals to NaN, so it's hard to see if we uncover new bugs just due to huge. I'll try with just huge.

@phil-blain
Copy link
Owner Author

No new failures with just -init=huge. I've fixed the above in 584f370 and I'll open a PR for that.

@phil-blain
Copy link
Owner Author

PR merged: CICE-Consortium#752

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

No branches or pull requests

1 participant