You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Explore transmute further with aerosol_ukca_kernel_mod conv_comorph_kernel_mod #657
Recommendation from Aidan: I think also its worth compiling the file with PSyclone with no (or an empty) optimisation script, just to sanity check that the cause is indeed OpenMP or optimisation related and not related to if/elseif vs case. If we absolutely had to I think there is a reasonable way for us to regenerate case statements as an option somewhere (though our preference is to avoid doing it wherever possible)
Branch exploring using PSyclone to move the default case logging Call outside into a new loop, but still flip a boolean inside the else default case to then use the new if block as needed. main...MetBenjaminWent:lfric_apps:aero_ukca_conv_como_explore
So with aerosol_ukca_kernel_mod -hipa0 -hmsgs with reduced OMP sections with a script, it builds but fails KGO.
I'll try a pass build and see what happens - KGO change isn't entirely out of the question, we have reduced optimisation in 2x files in some way.
However likely the missing tracer step has gone a bit weird (even if it shouldn't affect KGO)
Note similar sounding issues with the following in the UM: # cce 8.7.x-16.0.0: Decrease optimisation and disable OpenMP to dramatically improve build times. build-atmos.prop{fc.flags}[um/src/atmosphere/convection/comorph/interface/um/comorph_interface_um.F90] = $fcflags_common -O0 -Ovector0 -hfp0 -hflex_mp=strict -G1 -hipa0 -h noomp $fcflags_drhook $fcflags_overrides
For privates failing in the second section means we fail KGOs - bug to flag with PSyclone again....
PSyclone/src/psyclone/psyir/transformations/parallel_region_trans.py
It seems for some reason the symbol table checks are not working wierdly, it is right there.....
But the build works, where we have a spanned parallel section instead of loads.
This means less works, so we can use this and add them where able currently, store the rest and move on.
HoT build time is roughly:
Elapsed Time: 0:36:12 (2172 seconds, 60% of total)
No change really with aerosol_ukca_kernel_mod:
Elapsed Time: 0:34:25 (2065 seconds, 57% of total)
conv_comorph_kernel_mod still fails with a few parallel and lots of dos.
Trying with PSyclone transmute regardless, possibly it's the if blocks still then for this file
Works without any OMP.
Adding in specific parallel sections, with multiple loops, either over the tracers or the rest of the file causes the build issues.
Adding 1 parallel section at the beginning causes build issues with Transmute.
Adding 1 parallel section manually causes build issues, compiler bug
(Loops tested against, both manfully or with Transmute, ref original source with hand OMP)
As this seems to be a compiler bug with CCE 15, exploring raising this as a bug for CCE compiler.
Activity
MetBenjaminWent commentedon Jul 23, 2026
Recommendation from Aidan:
I think also its worth compiling the file with PSyclone with no (or an empty) optimisation script, just to sanity check that the cause is indeed OpenMP or optimisation related and not related to if/elseif vs case. If we absolutely had to I think there is a reasonable way for us to regenerate case statements as an option somewhere (though our preference is to avoid doing it wherever possible)
MetBenjaminWent commentedon Jul 23, 2026
GCC with changes: 0:22:23
https://cylchub/services/cylc-review/view/benjamin.went?&suite=add_omp_more_kernels%2Frun2&no_fuzzy_time=0&path=log/job/1/build_lfric_atm_ex1a_gnu_fast-debug-32bit/01/job.out
GCC without changes 0:20:56
https://cylchub/services/cylc-review/view/benjamin.went?&suite=add_omp_more_kernels%2Frun8&no_fuzzy_time=0&path=log/job/1/build_lfric_atm_ex1a_gnu_fast-debug-32bit/01/job.out
Likely just noise, but at worse an additional minute for GCC
Current feeling, not an issue
MetBenjaminWent commentedon Jul 27, 2026
Branch exploring using PSyclone to move the default case logging Call outside into a new loop, but still flip a boolean inside the else default case to then use the new if block as needed.
main...MetBenjaminWent:lfric_apps:aero_ukca_conv_como_explore
MetBenjaminWent commentedon Jul 28, 2026
-hipa0forconv_comorph_kernel_modwith the local script (so lots of parallel sections), has not worked.Adding
-hmsgstoaerosol_ukca_kernel_modas well as-hipa0, and also trying override script which adds fewer parallel sectionsMetBenjaminWent commentedon Jul 28, 2026
https://cylchub/services/cylc-review/taskjobs?user=benjamin.went&suite=aero_ukca_conv_como_explore%2Frun6&no_fuzzy_time=0&cycles=&tasks=&task_status=waiting&task_status=expired&task_status=preparing&task_status=submit-failed&task_status=submitted&task_status=running&task_status=failed&job_status=&order=time_desc&per_page=300
So with aerosol_ukca_kernel_mod -hipa0 -hmsgs with reduced OMP sections with a script, it builds but fails KGO.
I'll try a pass build and see what happens - KGO change isn't entirely out of the question, we have reduced optimisation in 2x files in some way.
However likely the missing tracer step has gone a bit weird (even if it shouldn't affect KGO)
MetBenjaminWent commentedon Jul 28, 2026
Note similar sounding issues with the following in the UM:
# cce 8.7.x-16.0.0: Decrease optimisation and disable OpenMP to dramatically improve build times.build-atmos.prop{fc.flags}[um/src/atmosphere/convection/comorph/interface/um/comorph_interface_um.F90] = $fcflags_common -O0 -Ovector0 -hfp0 -hflex_mp=strict -G1 -hipa0 -h noomp $fcflags_drhook $fcflags_overridesMetBenjaminWent commentedon Jul 28, 2026
Just the first loop, with a force private of
case_default_used, and only overiorjloops, it passes KGO.https://cylchub/services/cylc-review/taskjobs?user=benjamin.went&suite=aero_ukca_conv_como_explore%2Frun7&no_fuzzy_time=0&cycles=&tasks=&task_status=waiting&task_status=expired&task_status=preparing&task_status=submit-failed&task_status=submitted&task_status=running&task_status=failed&task_status=succeeded&job_status=&order=time_desc&per_page=300
Force private only works on the first m loop wierdly......
Now re-extending the first 2x m loops, one with and one without, same functionality.
We could also avoid all of the m tracer case/if loops and just do the other copies?
MetBenjaminWent commentedon Aug 3, 2026
So:
https://cylchub/services/cylc-review/taskjobs?user=benjamin.went&suite=aero_ukca_conv_como_explore%2Frun9&no_fuzzy_time=0&cycles=&tasks=&task_status=waiting&task_status=expired&task_status=preparing&task_status=submit-failed&task_status=submitted&task_status=running&task_status=failed&job_status=&order=time_desc&per_page=300
For privates failing in the second section means we fail KGOs - bug to flag with PSyclone again....
PSyclone/src/psyclone/psyir/transformations/parallel_region_trans.py
It seems for some reason the symbol table checks are not working wierdly, it is right there.....
But the build works, where we have a spanned parallel section instead of loads.
This means less works, so we can use this and add them where able currently, store the rest and move on.
MetBenjaminWent commentedon Aug 4, 2026
So
aerosol_ukca_kernel_modworks,conv_comorph_kernel_moddoes not and fails the build.....Current stats:
aerosol_ukca_kernel_mod:conv_comorph_kernel_mod:Rewrite:
MetBenjaminWent commentedon Aug 4, 2026
HoT build time is roughly:
Elapsed Time: 0:36:12 (2172 seconds, 60% of total)
No change really with
aerosol_ukca_kernel_mod:Elapsed Time: 0:34:25 (2065 seconds, 57% of total)
MetBenjaminWent commentedon Aug 4, 2026
conv_comorph_kernel_modstill fails with a few parallel and lots of dos.Trying with PSyclone transmute regardless, possibly it's the if blocks still then for this file
Works without any OMP.
Adding in specific parallel sections, with multiple loops, either over the tracers or the rest of the file causes the build issues.

Adding 1 parallel section at the beginning causes build issues with Transmute.
Adding 1 parallel section manually causes build issues, compiler bug
(Loops tested against, both manfully or with Transmute, ref original source with hand OMP)
As this seems to be a compiler bug with CCE 15, exploring raising this as a bug for CCE compiler.
MetBenjaminWent commentedon Aug 5, 2026
Created a branch to hold the Transmute script:
https://github.com/MetBenjaminWent/lfric_apps/tree/conv_comorph_kernel_mod_store