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

Bypass MAPL_LoadBalance when not running load balancing, add maxpasses as resource #27

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Dec 4, 2023

This PR changes the load balancing code in the Solar GridComp to avoid calls to MAPL_LoadBalance if not running with load balancing on.

As found by @wmputman, if you set SOLAR_LOAD_BALANCE: 0 you technically still call the MAPL_LoadBalance code which involves MPI_Allgather, MPI_Send and MPI_Recv calls. Trivial though they are, at high-res they can be expensive.

So, what we do here is make some changes to avoid this. Testing shows this change is zero-diff if you run with load balancing on.

Also added is code from @wmputman to pass in the max number of passes to the loadbalancer if running it. The default is 100 which is the baked default in MAPL_LoadBalance.F90

Working with @dr0cloud, we have fixed the issue with the odd checkpoints. It is now fully zero-diff.

Working with @atrayano, we have fixed issues with the timers not being happy with no-solar processes going into RRTMG and not triggering the timeron/off.

@mathomp4 mathomp4 added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Dec 4, 2023
@mathomp4 mathomp4 self-assigned this Dec 4, 2023
@wmputman
Copy link

wmputman commented Dec 4, 2023

Thanks @mathomp4 : your findings on the internal checkpoints is interesting. Those are the no aerosol exports from solar, which is also a burden since it basically calls soradcore twice even when we don't want the clear-sky exports.

@dr0cloud
Copy link
Collaborator

dr0cloud commented Dec 4, 2023 via email

@mathomp4 mathomp4 changed the title Bypass MAPL_LoadBalance when not running load balancing Bypass MAPL_LoadBalance when not running load balancing, add maxpasses as resource Dec 4, 2023
@mathomp4 mathomp4 marked this pull request as ready for review December 11, 2023 16:49
@mathomp4 mathomp4 requested a review from a team as a code owner December 11, 2023 16:49
Copy link
Collaborator

@dr0cloud dr0cloud left a comment

Choose a reason for hiding this comment

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

Looks good Matt.

@mathomp4 mathomp4 merged commit ac1f7b9 into develop Dec 14, 2023
9 checks passed
@mathomp4 mathomp4 deleted the feature/mathomp4/bypass-loadbalance branch December 14, 2023 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants