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

Removal of unnecessary, expensive array initializations in the MPAS_ATM model_mod.f90 #407

Merged
merged 1 commit into from Oct 10, 2022

Conversation

mjs2369
Copy link
Contributor

@mjs2369 mjs2369 commented Oct 6, 2022

Description:

Removed unnecessary array initializations from get_close_state() and get_close_obs() subroutines in the MPAS_ATM model_mod.f90

close_ind = -99
if (present(dist)) dist = 1.0e9_r8 !something big and positive (far away) in radians

Their removal causes a significant reduction to the runtime (can be more than 20%) when running MPAS_ATM cases with large model_size.

See issue for more info.

Fixes issue

Fixes issue #405

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Tested to be bitwise identical with both Intel and GNU Fortran.
MPAS_ATM was also built and run with all debugging flags, which did not produce any relevant errors or warnings.

For an execution of a high-memory case on Casper (96 ensemble members, 459,985 observations, model_size = 327,759,048), the runtime was reduced from 145 min. to 112 min. or about %23

For an execution of separate mpas_atm case that uses RTTOV observations (10 ensemble members, 77,042 observations, model_size = 109,118,772), the runtime is reduced from 1 min. 9 sec. to 55 sec. or about %20

These test cases are included under Testing Datasets.

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

Test cases can be found in the following directories on Cheyenne, but any execution of filter with MPAS_ATM will work.

/glade/scratch/masmith/DART/models/mpas_atm/test_run_96ensmembers (will take over an hour to run)
/glade/scratch/masmith/DART/models/mpas_atm/test_run_5ensmembers (recommend using this smaller version)
These test cases must be run on the mega-mpas branch.

/glade/scratch/masmith/DART/models/mpas_atm/mpas_rttov_test
This test case can be run on main, but will need to use a specific build template and &preprocess_nml for the RTTOV obs. These can be found at /glade/scratch/masmith/DART/models/mpas_atm/work/rttov_input.nml and /glade/scratch/masmith/DART/build_templates/mkmf.template.rttov.intel

Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff Marlee.

There's a good chance we can remove these initialization from all over the code (as you know), but mpas is a great start.

Let's bundle this in with the next release (probably #403)

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

Successfully merging this pull request may close these issues.

None yet

2 participants