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

Remaining issues in the ACI code #2858

Open
singhbalwinder opened this issue Jun 3, 2024 · 0 comments
Open

Remaining issues in the ACI code #2858

singhbalwinder opened this issue Jun 3, 2024 · 0 comments
Labels
EAGLES Work related to the EAGLES aerosol project

Comments

@singhbalwinder
Copy link
Contributor

Here is the list of issues that must be fixed in the ACI code after the PR #2794 is merged:

  1. Only eddy diffusivity of heat should be an additional added output from SHOC. We should remove w_variance and cldfrac_liq_prev from the SHOC interface.
  2. Combine kernels (if possible) and create lambda functions for the inner parallel_for loops.
    @bartgol's comment:
I see you have plenty of functions that have 2 versions, one to dispatch the outer loop, and one to be called
from inside the loop. If the inner one is only used in the outer one, you could consider just using a lambda in
the outer one, to keep the code smaller.

OTOH, dispatching lots of kernels is not great. If in all outer loops you just do

  const int icol = team.league_rank();
  inner_function_name(...);
you could consider merging all these kernels together, and doing all these calculations at once,
if possible (it may not be, if they must happen at different times during the ACI step).
  1. Change the assignment of qqcw (and other arrays) so that memory access is coalesced
    @bartgol's comment:
These for loops will deteriorate performance on GPU, due to non-coalesced access. You should try to rework the code, 
with multiple TeamVectorRange loops (that's fine, especially if there are no deps among them, so no barriers needed). 
E.g., this for loop could be a TVR over nlevs*num_aero_mods, where inside you do modulo arithmetic to recover 
ilev/imode (in a way that still ensures coalesced access)
  1. Currently top_lev is a namelist variable. We should add code to compute it based on pressure levels.
@singhbalwinder singhbalwinder added the EAGLES Work related to the EAGLES aerosol project label Jun 3, 2024
overfelt added a commit to eagles-project/scream that referenced this issue Jun 18, 2024
There were two issues to be addressed:
Use lambdas instead of functions in some Kokkos::parallel_for loops over team members.
Fuse some Kokkos::parallel_for loops to improve efficiency.
E3SM-Autotester added a commit that referenced this issue Jun 25, 2024
…_2858

Automatically Merged using E3SM Pull Request AutoTester
PR Title: Addresses some suggestions in issue #2858.
PR Author: overfelt
PR LABELS: BFB, AT: AUTOMERGE, code cleanup, EAGLES, MAM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EAGLES Work related to the EAGLES aerosol project
Projects
None yet
Development

No branches or pull requests

1 participant