Skip to content

Further PSyclone pass of BL scripts - #828

Open
Benjamin Went (MetBenjaminWent) wants to merge 11 commits into
MetOffice:mainfrom
MetBenjaminWent:bdylyr_psyclone_further_1
Open

Benjamin Went (MetBenjaminWent) wants to merge 11 commits into
MetOffice:mainfrom
MetBenjaminWent:bdylyr_psyclone_further_1

Conversation

@MetBenjaminWent

@MetBenjaminWent Benjamin Went (MetBenjaminWent) commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

There have been improvments to PSyclone which allow us to more easily 'Transmute' physics source.

The maximal parallel transformation created by STFC has already been added to the local script for the boundary layer, however some of the larger or complex files are relying their origonal OMP in source.
This PR updates those.

This changeset extends the PSyclone CPU coverage, with 3x exceptions still:

Despite some changes in how the OMP is placed in the files by the Transformations (The number of parallel sections in bl_expl2 has gone up for example), the perfomance impact at both the alg and higher is negligable, meaning these scripts are sufficient automatic coverage of the source.

After/Before Caliper Min Mean Max
bl__after_3n_1T_run1.txt: bl.implicit 5.06404 6.82949 7.96217
bl__after_3n_2T_run1.txt: bl.implicit 5.76733 7.41323 8.42424
bl__after_3n_4T_run1.txt: bl.implicit 7.1357 7.96703 8.90106
bl__before_3n_1T_run1.txt: bl.implicit 4.97996 6.82163 8.03526
bl__before_3n_2T_run1.txt: bl.implicit 5.6279 7.40948 8.56902
bl__before_3n_4T_run1.txt: bl.implicit 6.94537 7.91051 8.66165
After/Before Caliper Min Mean Max
bl__after_3n_1T_run1.txt: bl.implicit 5.06404 6.82949 7.96217
bl__after_3n_2T_run1.txt: bl.implicit 5.76733 7.41323 8.42424
bl__after_3n_4T_run1.txt: bl.implicit 7.1357 7.96703 8.90106
bl__before_3n_1T_run1.txt: bl.implicit 4.97996 6.82163 8.03526
bl__before_3n_2T_run1.txt: bl.implicit 5.6279 7.40948 8.56902
bl__before_3n_4T_run1.txt: bl.implicit 6.94537 7.91051 8.66165
After/Before Caliper Min Mean Max
bl__after_3n_1T_run1.txt: fast_physics 20.333 24.93297 27.5066
bl__after_3n_2T_run1.txt: fast_physics 23.9748 27.31122 29.1418
bl__after_3n_4T_run1.txt: fast_physics 27.4751 30.02124 31.5186
bl__before_3n_1T_run1.txt: fast_physics 20.1735 24.87263 27.4821
bl__before_3n_2T_run1.txt: fast_physics 23.9464 27.2097 29.0277
bl__before_3n_4T_run1.txt: fast_physics 26.9461 29.99026 31.5474
After/Before Caliper Min Mean Max
bl__after_3n_1T_run1.txt: slow_physics 55.217 57.60193 58.8954
bl__after_3n_2T_run1.txt: slow_physics 55.6022 56.40347 56.6336
bl__after_3n_4T_run1.txt: slow_physics 56.8093 56.95894 57.0687
bl__before_3n_1T_run1.txt: slow_physics 54.919 56.27117 57.0295
bl__before_3n_2T_run1.txt: slow_physics 55.4524 55.927 56.1519
bl__before_3n_4T_run1.txt: slow_physics 56.8792 57.03376 57.1574

PR Summary

Sci/Tech Reviewer: Hacka Fett (@christophermaynard)
Code Reviewer:

Issue: #833
Umbrella Issue: #758
Top Umbrella: #106

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • I have tested this change locally, using the LFRic Apps rose-stem suite
  • If any tests fail (rose-stem or CI) the reason is understood and acceptable (e.g. kgo changes)
  • I have added tests to cover new functionality as appropriate (e.g. system tests, unit tests, etc.)
  • Any new tests have been assigned an appropriate amount of compute resource and have been allocated to an appropriate testing group (i.e. the developer tests are for jobs which use a small amount of compute resource and complete in a matter of minutes)

trac.log

Test Suite Results - lfric_apps - bdylyr_psyclone_further_1/run12

Suite Information

Test Suite Results - lfric_apps - bdylyr_psyclone_further_1/run13

Suite Information

Item Value
Suite Name bdylyr_psyclone_further_1/run13
Suite User benjamin.went
Workflow Start 2026-09-30T09:33:08
Groups Run all
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@c22aeea True
lfric_apps MetBenjaminWent/lfric_apps@bdylyr_psyclone_further_1 False
lfric_core MetOffice/lfric_core@220a00c True
moci MetOffice/moci@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@77a5166 True
socrates MetOffice/socrates@2026.07.1 True
socrates-spectral MetOffice/socrates-spectral@2026.07.1 True
ukca MetOffice/ukca@c372b36 True

Task Information

❌ failed tasks - 2
Task State
run_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit failed
run_shallow_water_williamson5_vi-C24_azspice_gnu_fast-debug-64bit failed
✅ succeeded tasks - 1605
Item Value
Suite Name bdylyr_psyclone_further_1/run12
Suite User benjamin.went
Workflow Start 2026-09-30T09:31:48
Groups Run ex1a_omp_developer
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@c22aeea True
lfric_apps MetBenjaminWent/lfric_apps@bdylyr_psyclone_further_1 False
lfric_core MetOffice/lfric_core@220a00c True
moci MetOffice/moci@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@77a5166 True
socrates MetOffice/socrates@2026.07.1 True
socrates-spectral MetOffice/socrates-spectral@2026.07.1 True
ukca MetOffice/ukca@c372b36 True

Task Information

✅ succeeded tasks - 51

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • Performance of the code has been considered and, if applicable, suitable performance measurements have been conducted

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Documentation

  • Where appropriate I have updated documentation related to this change and confirmed that it builds correctly

PSyclone Approval

  • If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the HPC Optimisation Team

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

@github-actions github-actions Bot added the cla-modified The CLA has been modified as part of this PR - added by GA label Sep 29, 2026
@github-actions github-actions Bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Sep 29, 2026
@MetBenjaminWent

Benjamin Went (MetBenjaminWent) commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

ex_coef :

kmkhz_9c:
Timing of kmkhz_9c as it takes a while running it in the VDI. PSyclone is now parallel in the build, so most of this should be hidden, however this may be disrptive on the build time.

touch time_kmkhz_9c_psy.sh
#!/bin/bash
printf 'Starting psyclone run\n'
/usr/bin/time -v psyclone -l all -s ../../../../applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py -o gen_kmkhz_9c.F90 kmkhz_9c.F90 > output.txt
printf '\nFinished psyclone run\n'

User time (seconds): 261.30
System time (seconds): 0.69
Percent of CPU this job got: 97%
Elapsed (wall clock) time (h:mm:ss or m:ss): 4:27.95

@MetBenjaminWent

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code owner (build system) review: Change just adds to an existing list in the fashion already established.

This branch has not been deployed

No deployments
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.

3 participants