Localize OpenMP thread use and count to the GCs theaded with mini-GS approach#4876
Localize OpenMP thread use and count to the GCs theaded with mini-GS approach#4876aoloso wants to merge 5 commits into
Conversation
…t the Grid Comp level when the mini gridcomp threading approach is used
|
@aoloso I changed the base to be to |
|
@copilot : What do you think about this PR? |
…all set_num_threads Agent-Logs-Url: https://github.com/GEOS-ESM/MAPL/sessions/73519c55-cf07-416e-be59-296d5124a54e Co-authored-by: aoloso <8182398+aoloso@users.noreply.github.com>
Here's my assessment of this PR: Overall approach: ✅ Correct and clean The core fix is sound: instead of calling the global CI Failure: not related to this PR Issues I noticed and fixed:
A couple of things to be aware of:
The changes in the MAPL repo are minimal and well-scoped. The bulk of the fix (calling |
|
The CI error is interesting here. The issue is that the other branches for this by @aoloso are based on GEOSgcm v12. But in MAPL, our CI is currently still based on GEOSgcm v11 (since that is what GEOSgcm So this is failing since it's checking out the "wrong" GEOSgcm_GridComp, say, from GEOS-ESM/GEOSgcm_GridComp#1412 |
|
Okay. I was wrong. This does change an interface in a way: So we might need to coordinate with @sdrabenh |
|
@mathomp4 You do it as 3 PRs. PR1 in MAPL adds the interface. PR2 changes the client code to use PR1. PR3 eliminates old interface. Changes are small so you can probably use superpowers to merge before waiting on all CI. |
Types of change(s)
Checklist
make tests)Description
For GWD and GOCART2G threaded with the mini-gridcomp approach, the ability to selectively turn OpenMP off for those components where OpenMP is required for other components is not working as inteneded. The runtime option
use_threads: .FALSE.to achieve that is being ignored. A branch called bugfix/aoloso/gridComp_level_numthrds has been created fro MAPL, GEOSgcm_GridComp, and GOCART to resolve this bug.The affected files are
MAPL.F90, MAPL_Generic.F90, MaplGenericComponent.F90, OpenMP_Support.F90, GOCART2G_GridCompMod.F90, CA2G_GridCompMod.F90, DU2G_GridCompMod.F90, NI2G_GridCompMod.F90, SU2G_GridCompMod.F90 GEOS_GwdGridComp.F90.Related Issue
1411