-
Notifications
You must be signed in to change notification settings - Fork 446
EAMxx: Removes all fortran from C++ SHOC #6779
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
Conversation
…_f90_shoc * origin/master: (326 commits) EAMxx: Add aerosols and gases outputs to ensure the microscopy baseline test is sensitive to changes in the interface. fix standard names for low/med/hgh cloud area fraction types Add standard name metadata to most EAMxx output variables EAMxx: Update mam4xx submodule to fix CUDA test. EAMxx: Modify microphysics interface to include sethet (washout rates) computations. Bump DavidAnson/markdownlint-cli2-action from 17 to 18 EAMxx: Moves fences into the interface and remove extra comments EAMxx: Adds missing namelist entries for multi process test EAMxx: Remove all diffs from microphysics cpp file ff mam4xx to current main Revert "EAMxx: Clang format" EAMxx:Inits constituent fluxes to zero fix cuda compile warnings EAMxx: Moves online emiss and constituent init to a new function hpp file EAMxx: Fixed some comments paths and other minor cleanup EAMxx: Clang format EAMxx: Fixes a gpu bug requiring a particular format for dstflx update mam4xx submodule to fix gpu compilation error EAMxx:Removes accidently added file EAMxx: Some codes re-arranged after rebase ...
|
| using Array1 = typename KT::template lview<Scalar*>; | ||
| using Array2 = typename KT::template lview<Scalar**>; | ||
| using Array3 = typename KT::template lview<Scalar***>; | ||
| using Array1 = typename FortranData::Array1; |
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.
What's the meaning of "FortranData" here? Should this be maybe called something like "BaselineData" or is there still some Fortran reminescence?
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.
@bartgol , I made note of those in the follow-on work. These will be renamed but i don't think it's worth doing another CI run on this PR.
Following the pattern of a recent P3 PR, this PR changes the bfb unit tests to be based on baseline files instead of fortran calls. Unlike in that PR, we are actually able to completely remove all dependence on fortran code here because SHOC doesn't need any f90 init routines. Change list: 1) Main change: For all the BFB SHOC unit tests, use baseline files instead of calling fortran! 2) Remove all of the CXX->f90 bridge code 3) Cleanup of shoc_init situation. SHOC has no global data, so you only need to call it if you need to compute npbl 4) Reorg by moving some less-interesting testing stuff into shoc/tests/infra. Now, the files presented in the public interface (just shoc directory) is a lot cleaner. 5) All shoc tests (bfb and run_and_cmp) accept the same set of arguments (-c for compare, -g for generate, -b for baseline dir, and -n for no baselines). 6) Some of the tests that just confirm that DIFFs are caught do need to do thread count spreads. 7) Remove the ability of shoc.F90 to call CXX impls.. 8) gen-boiler can now generate _host functions for function that have array data. 9) No longer need to worry about transposing array data, we never cross language boundary anymore. There were a lot of f90 functions that had a property test but were never actually used in the CXX. I removed all of these: * shoc_impli_sfc_fluxes_tests.cpp * shoc_impli_srf_stress_tests.cpp * shoc_impli_srf_tke_tests.cpp * shoc_energy_total_fixer_tests.cpp * shoc_energy_dse_fixer_tests.cpp * shoc_energy_threshold_fixer_tests.cpp * shoc_fterm_input_third_moms_tests.cpp * shoc_fterm_diag_third_moms_tests.cpp * shoc_omega_diag_third_moms_tests.cpp * shoc_xy_diag_third_moms_tests.cpp * shoc_aa_diag_third_moms_tests.cpp * shoc_w3_diag_third_moms_tests.cpp [BFB] Moved over from: E3SM-Project/scream#3121 P3 DIFFs are expected because I caught a few places that were transposing views that didn't need to do that anymore. SHOC fails are expected because the baselines haven't been generated for the containers yet. Follow on work: Port P3 init code from fortran; this is the last of the fortran being used by either p3 or shoc Remove all references to "fortran" or "Fortran". These names are all obsolete.
|
This should have been tested overnight on next before merging to mater since it touched code outside of eamxx. |
You're right that it touches one file outside of eamxx, but I think this is somewhat of a special case. All the code removed from |
|
Ah, crap, I only ran |
|
yea - and there's a list of reasons why pulling PAM into the repo makes sense. I hope to do that in the next year or so, but it depends on what we do with YAKL, among other things. |
|
That said, I think the code that Jim purged from shoc.F90 is ONLY needed for eamxx's ability to call f90 implementation as part of the CXX-vs-F90 bfb testing. If PAM uses scream cxx impl, it should still be able to build with this PR merged. |
|
@bartgol yea, it's an easy fix for PAM to remove the include statements, I created a PR yesterday. |
|
@bartgol your request for an exception in the future is denied. |
I think this is a problem for how MMF (especially PAM) logic is constructed. I would be hesitant to make this into an EAMxx responsibility. I think PAM should be reworked to rely on EAMxx code more cleanly and abstractly. It's not designed well imo |
|
This keeps happening ... |
|
The outside code in this PR is really eamxx code. The issue is that PAM calls stuff way in the weeds, so we end up breaking it with every little touch. This is a PAM problem For example, MMF is pulling stuff that it really doesn't need to pull and it is unclear if it ever needed it... 👀 |
Tbc, I wasn't requesting exceptions. I was just pointing out that the collateral damage in this case should be minimal. |
Following the pattern of a recent P3 PR, this PR changes the bfb unit tests to be based on baseline files instead of fortran calls. Unlike in that PR, we are actually able to completely remove all dependence on fortran code here because SHOC doesn't need any f90 init routines.
Change list:
[BFB]
Moved over from: E3SM-Project/scream#3121
P3 DIFFs are expected because I caught a few places that were transposing views that didn't need to do that anymore. SHOC fails are expected because the baselines haven't been generated for the containers yet.
Follow on work: