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

4.0.4 run.stat from master does not match 4.0.4 run.stat from 4.2 branch #133

Open
jdha opened this issue Nov 21, 2023 · 9 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@jdha
Copy link
Contributor

jdha commented Nov 21, 2023

4.0.4 run.stat from master does not match 4.0.4 run.stat from 4.2 branch

@jdha jdha added the bug Something isn't working label Nov 21, 2023
@jdha jdha self-assigned this Nov 21, 2023
@jdha
Copy link
Contributor Author

jdha commented Nov 22, 2023

Update:
run.stat reproducibility issues using master with gnu-mpich at -O2, -O1 and -O0; also with -finit-local-zero. Tried with both 68 and 19 node options.

Next step:
re-run tests with Cray

@jdha
Copy link
Contributor Author

jdha commented Nov 22, 2023

Same happens with the Cray compiler. A quick test with the GYRE test config looks to be fine.

@jdha
Copy link
Contributor Author

jdha commented Nov 28, 2023

I had another look at the reproducibility issue yesterday and figured out it was in the ice code. I had thought I’d initialised all variables to zero – but as I’d only done this test with GNU I thought I’d check with the Cray compiler. I recompiled and it was reproducible. So I guess I don’t know my compiler options very well or at least don’t know how to look them up!

For gfortran I used: -finit-local-zero … but maybe I’ve missed something. For the Cray I used -e0 and this seemed to solve my issue. Not sure it’s worth me going through the array of metO modifications to the ice code to see what’s going on as we’re going to move to 4.2.1 soon.

@atb299
Copy link

atb299 commented Nov 28, 2023

@jdha do you know if it is v4 or v4.2 that doesn't initialise to zero correctly? If the latter then it could be worth flagging. Also note that a bug has been discovered in the v4.2 ice-ocean drag that may be important (https://forge.nemo-ocean.eu/nemo/nemo/-/issues/333) . It is considered important enough to trigger a 4.2.2 release (very soon). In the meanwhile it's 2 lines in iceupdate.F90, and I've added it to the NPD repo.

@jdha
Copy link
Contributor Author

jdha commented Nov 28, 2023

@atb299 I'm naively assuming it's a GO8 thing as both 4.0.4 and 4.2.1 pass SETTE (but that doesn't mean all code is fully tested)

@jdha
Copy link
Contributor Author

jdha commented Nov 29, 2023

another quick look at this:

not found the source yet but if you set ln_pnd_alb in namelist_ice_cfg_template to false you should get reproducibility

I've also tested that if ln_pnd_alb is true and you set zafrac_pnd = 0._wp in place of zafrac_pnd = MIN( pafrac_pnd(ji,jj,jl), 1._wp - zafrac_snw ) on ln 132 of icealb.F90 you can also get reproducibility

@jdha
Copy link
Contributor Author

jdha commented Nov 30, 2023

there are two calls to ice_alb:

ice_update_flx and ice_sbc_flx

it appears that the reproducibility issue occurs in the latter - although from what I can see all inputs have been initialised

@jdha
Copy link
Contributor Author

jdha commented Dec 12, 2023

For info: repeating this test with the 4.2.1 code passes the run.stat test

@jdha
Copy link
Contributor Author

jdha commented Dec 20, 2023

run.stat for master (4.0.4) and 4.2 branch (using 4.0.4) are identical for a short run of 20 time step (with ln_pnd_alb=.false.,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants