-
Notifications
You must be signed in to change notification settings - Fork 372
Chemistry stub modules for MUSICA MICM #1360
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
base: develop
Are you sure you want to change the base?
Conversation
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.
I have no problems with this, but I do have the same question as matt
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.
I've left just a few initial comments, and I'll take a closer look and probably offer a second round of comments.
On Derecho with the
Which modules / compilers are you testing with on Derecho, @dwfncar @K20shores @mattldawson ? |
I setup my environment with the following commands: module --force purge Looks like same gcc and musica versions. |
I replicated the compile error on derecho. Prior to the commit I did successfully build and run with that call in place on my Ubuntu desktop ... |
The simple Ubuntu build environment was just setup via the conda package manager:
and building both MUSICA and MPAS with that compiler set (gcc v15). |
Looking back at the hackathon version of mpas_musica.F, The MUSICA GitHub actions do test builds with gcc/gfortran v12 - v13 and the unit tests exercise all Fortran interface functions. I think I need to do a MUSICA build and check the unit tests on derecho. |
MUSICA MICM unit tests with our derecho build environment are all OK.
Running tests... 100% tests passed, 0 tests failed out of 9 |
Compiler issue on derecho persists with custom MUSICA build. |
ccmake for MUSICA on derecho:
also will want Usually from the MUSICA root dir I do:
Also need Also in general a good idea to |
@dwfncar With the following at the beginning of the
and modifying the
, the ICE disappears for me. It's not ideal, but perhaps we can use a work-around like this so that we can build CheMPAS-A on Derecho with the GNU 12.4.0 compilers? In the commit message, and even with a code comment if we'd like, we can explain why we're importing |
I'll go ahead and make that update with a comment and commit the changes ... |
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.
This looks good to me -- nice work!
Since we don't use "squash and merge" in this repository, it might be nice to rework the commit history so that it contains a small number of commits (or even a single commit) with detailed commit messages before we merge this PR.
…/musica, with Makefiles. Modified core_atmosphere/Makefile to build chemistry source. Added MUSICA MICM stub modules chemistry/mpas_atm_chemistry.F and chemistry/musica/mpas_musica.F. Hardcode MICM config filepath in init_chemistry. Call init_chemistry at the end of atm_core_init in mpas_atm_core.F. Added #ifdef MPAS_USE_MUSICA cpp checks. Added call to finalize_chemistry. Call chemistry_step in mpas_atm_core atm_do_timestep. Modified Makefile to only build an link to musica if MPAS_USE_MUSICA is defined. In musica_init, call get_micm_version and write to log file. Changed arguments in chemistry_init to mpas pools configs and dimensions. Call musica_init with nVertLevels from dimensions pool. Write MICM version to logfile. Write MICM number of grid cells to log file. Embedded all chemistry use and calls inside #ifdef DO_CHEMISTRY. Added CHEMISTRY flags to FC line.
eed4798
to
dcd6849
Compare
The module chemistry/mpas_atm_chemistry.F has non-implemented stub subroutines for
init_chemistry
(will callmusica_init
from mpas_musica)step_chemistry
(will callmusica_step
from mpas_musica)finalize_chemistry
(will callmusica_finalize
from mpas_musica)chemistry/musica/mpas_musica.F will define the mpas_musica module with the
musica_init
,musica_step
, andmusica_finalize
subroutines, also to be implemented.It uses and directly links to the MUSIC MICM modules
Also included is an error checking function
has_error_occurred
.Note that the call to
music_init
will take as an argument the chemistry species defined as a new mpas_var_array to be implemented in a new framework module, for instance mpas_runtime_vars. The calling arguments will be further specified in subsequent PRs.