Skip to content

mosrs ticket 1048 - adding openmp directives to chunking of ukca full domain passing #172

Open
RobWatersMet wants to merge 4 commits intoMetOffice:mainfrom
RobWatersMet:ngarch_ukca_openmp_chunking_ticket_1048
Open

mosrs ticket 1048 - adding openmp directives to chunking of ukca full domain passing #172
RobWatersMet wants to merge 4 commits intoMetOffice:mainfrom
RobWatersMet:ngarch_ukca_openmp_chunking_ticket_1048

Conversation

@RobWatersMet
Copy link

@RobWatersMet RobWatersMet commented Jan 21, 2026

moved changes over from mosrs ticket 1048, these were related to adding openmp directive around chunking of full domain passing

PR Summary

Sci/Tech Reviewer:
Code Reviewer:

See https://code.metoffice.gov.uk/trac/lfric_apps/ticket/1048 for full details.

Aim of the ticket is to add optional openmp directives around the domain chunking in the full domain passing interface - ukca file: src/science/core/chemistry/ukca_chemistry_ctl_full_mod.F90

This will involve adding to the following psyclone scripts inside lfric_apps:

  • applications/lfric_atm/optimisation/azngarch-sandbox/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py
  • applications/lfric_atm/optimisation/meto-ex1a/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py

Current status is have omp directives off by default but they can be turned on with the following logic:

    use_omp = get_bool_env("UKCA_FULL_CHUNK_OMP", True)
    if desired_chunk_size is None and use_omp:
        logging.WARNING(
            "Turning off omp as chunk size is set to full domain size")
        use_omp = False

The use of the UKCA_FULL_CHUNK_OMP env variable is short term solution - a follow-up ticket/PR will be to add this as a namelist option but to keep things short and simple we have opted to keep the short-term solution in for this ticket (original plan prior to github migration).

Follow-up MOSRS ticket: https://code.metoffice.gov.uk/trac/lfric_apps/ticket/1082

This will become an GH issue / PR.

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 Core rose-stem suite
  • If required (e.g. API changes) I have also run the LFRic Apps test suite using this branch
  • 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 - ngarch_ukca_openmp_chunking_ticket_1048/run1

Suite Information

Item Value
Suite Name ngarch_ukca_openmp_chunking_ticket_1048/run1
Suite User alan.j.hewitt
Workflow Start 2026-01-20T15:48:03
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2025.12.1 True
jules MetOffice/jules@2025.12.1 True
lfric_apps RobWatersMet/lfric_apps@ngarch_ukca_openmp_chunking_ticket_1048 False
lfric_core MetOffice/lfric_core@aa32824 True
moci MetOffice/moci@2025.12.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@2025.12.1 True
socrates MetOffice/socrates@2025.12.1 True
socrates-spectral MetOffice/socrates-spectral@2025.12.1 True
ukca MetOffice/ukca@2025.12.1 True

Task Information

❌ failed tasks - 1
Task State
run_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit failed
✅ succeeded tasks - 1102
⌛ waiting tasks - 1
Task State
housekeep_azspice waiting

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 TCD 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

…ng openmp directive around chunking of full domain passing
@github-actions github-actions bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Jan 21, 2026
@RobWatersMet
Copy link
Author

Failed test: run_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit

@alanjhewitt - this always fails right and is a broken test, i.e. not an issue with this PR

@github-actions github-actions bot removed the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Jan 21, 2026
@RobWatersMet
Copy link
Author

TCD email bouncing (??) - does anyone have the correct address?

@alanjhewitt
Copy link
Contributor

Failed test: run_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit

@alanjhewitt - this always fails right and is a broken test, i.e. not an issue with this PR

It does work, but this task times out almost every time it gets run. Hopefully it will get updated to either be a shorter test or request extra resourses.

@james-bruten-mo
Copy link
Collaborator

TCD email bouncing (??) - does anyone have the correct address?

Sorry, looks like it's missing an "l" in tools in the template. It should be toolscollabdevteam@metoffice.gov.uk
I'll get that fixed

@github-actions github-actions bot added the cla-signed The CLA has been signed as part of this PR - added by GA label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed as part of this PR - added by GA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants