-
Notifications
You must be signed in to change notification settings - Fork 383
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
Make RRTMGP thread-safe #2990
Make RRTMGP thread-safe #2990
Conversation
Thanks @worleyph for finding these fixes! |
@brhillman and @mt5555 , was the decision then NOT to eliminate the initialization declaration for
Even though it works fine this way, there was some concern that it shouldn't :-), or was dangerous if only because it might lead to duplicating the style in a situation that would not be innocuous? |
Oh sorry, I can change that. These don't affect the model simulation, which is why they won't appear to change anything. |
sorry to be a pest, but do you now need to add
at the beginning of the routine? Or was the initialization not actually needed? |
It shouldn't be needed, but I can add it for safety. Only reason I can see to add it is that these get populated to make outfld calls, but only up to nday/ncol, so there could be garbage in the columns > ncol but < pcols. I'll add an initialization. |
Look better? Running tests now as a sanity check, but it shouldn't change anything...(said that before) |
What does the call to pbuf_get_field do? By the name, would have guessed that it reads data from the physics buffer into the local array. You put the initialization to zero after the call to pbuf_get_field? |
Careful...we are initializing But, to answer your question, |
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes that I can see (the ones not in the external repository) look good. Based on earlier discussions, I trust that the appropriate changes were made in mo_gas_optics_rrtmgp.F90 .
Glad that I could help. Wish that I had remembered the issue with fortran initializations in declarations - this has come up before and I had just spaced it - I would have been more confident about proposing the solution. |
Pinging @singhbalwinder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder. The changes look good to me.
Thanks @singhbalwinder ! |
re-assigning to @wlin7 to balance the integrator work load. |
Make RRTMGP radiation code thread-safe. This fixes a long-standing bug in RRTMGP that prevented us from running the code in threaded configurations. The fix involves a very small change in the RRTMGP interface (in radiation.F90), and similarly small changes in the external RRTMGP repo. In order to pull in the external changes, .gitmodules is updated to point to the "develop" branch of the external RRTMGP repo, and the submodule is updated to point to the latest commit. Changes are BFB for RRTMGP configurations (and should be for non-RRTMGP configurations as well since no code is touched outside of the RRTMGP except .gitmodules). [BFB]
Merged to next. |
Make RRTMGP radiation code thread-safe This fixes a long-standing bug in RRTMGP that prevented us from running the code in threaded configurations. The fix involves a very small change in the RRTMGP interface (in radiation.F90), and similarly small changes in the external RRTMGP repo. In order to pull in the external changes, .gitmodules is updated to point to the "develop" branch of the external RRTMGP repo, and the submodule is updated to point to the latest commit. Changes are BFB for RRTMGP configurations (and should be for non-RRTMGP configurations as well since no code is touched outside of the RRTMGP except .gitmodules). [BFB]
Merged to master. |
Thanks @wlin7! |
Modifications to allow for E3SM developer tests for the SE SCM This PR includes modifications to allow for E3SM developer tests for the Spectral Element (SE) version of the Single Column Model (SCM), which will be the default version of the SCM for E3SMv2. This PR 1) adds the SE SCM test in config/e3sm/tests.py , 2) removes the restriction that the SCM be compiled with mpi-serial mode (will not compile with the SE SCM and no longer a requirement for the Eulerian SCM), and 3) add a single_column logical check in src/drivers/mct/main/seq_io_mod.F90. In the E3SM SE SCM since the full dynamics grid is initialized but only one physics column is initialized, a shr_sys_abort is called when coupler diagnostics would otherwise be successfully written to history file. Added a logical check to avoid this abort call when SCM is used. Note that required modifications to run the SE SCM test have also be made in a companion E3SM PR. Test suite: scripts/test/scripts_regression_tests.py Along with modifications in the E3SM PR, my e3sm_developer tests for both SE SCM and Eulerian SCM pass (in addition to the full testing suite). SCM runs using the official E3SM SCM scripts also pass for both dynamical cores. Test baseline: Test namelist changes: Test status: bit for bit Fixes [CIME Github issue #] User interface changes?: Update gh-pages html (Y/N)?: Code review:
Modifications to allow for E3SM developer tests for the SE SCM This PR includes modifications to allow for E3SM developer tests for the Spectral Element (SE) version of the Single Column Model (SCM), which will be the default version of the SCM for E3SMv2. This PR 1) adds the SE SCM test in config/e3sm/tests.py , 2) removes the restriction that the SCM be compiled with mpi-serial mode (will not compile with the SE SCM and no longer a requirement for the Eulerian SCM), and 3) add a single_column logical check in src/drivers/mct/main/seq_io_mod.F90. In the E3SM SE SCM since the full dynamics grid is initialized but only one physics column is initialized, a shr_sys_abort is called when coupler diagnostics would otherwise be successfully written to history file. Added a logical check to avoid this abort call when SCM is used. Note that required modifications to run the SE SCM test have also be made in a companion E3SM PR. Test suite: scripts/test/scripts_regression_tests.py Along with modifications in the E3SM PR, my e3sm_developer tests for both SE SCM and Eulerian SCM pass (in addition to the full testing suite). SCM runs using the official E3SM SCM scripts also pass for both dynamical cores. Test baseline: Test namelist changes: Test status: bit for bit Fixes [CIME Github issue #] User interface changes?: Update gh-pages html (Y/N)?: Code review:
Addresses issue #2990 which notes that the list of options for output frequency in CIME covers more cases than are currently allowed in EAMxx. This commit expands the list of acceptable strings to include those with full words spelled out, with and without plural.
Addresses issue E3SM-Project#2990 which notes that the list of options for output frequency in CIME covers more cases than are currently allowed in EAMxx. This commit expands the list of acceptable strings to include those with full words spelled out, with and without plural.
Make RRTMGP radiation code thread-safe. This fixes a long-standing bug in RRTMGP that prevented us from running the code in threaded configurations. The fix involves a very small change in the RRTMGP interface (in
radiation.F90
), and similarly small changes in the external RRTMGP repo. In order to pull in the external changes, .gitmodules is updated to point to the "develop" branch of the external RRTMGP repo, and the submodule is updated to point to the latest commit. Changes are BFB for RRTMGP configurations (and should be for non-RRTMGP configurations as well since no code is touched outside of the RRTMGP except .gitmodules).