Skip to content

Conversation

@LonelyCat124
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.93%. Comparing base (0dfe127) to head (18efa4d).

❌ Your project check has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3280      +/-   ##
==========================================
- Coverage   99.95%   99.93%   -0.03%     
==========================================
  Files         376      377       +1     
  Lines       53545    53545              
==========================================
- Hits        53523    53511      -12     
- Misses         22       34      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LonelyCat124
Copy link
Collaborator Author

@sergisiso @arporter Mostly a small PR ready for a look, just moves the transformation and fixes the scripts I found. I'm going to set integration tests running now as well in case I missed anything.

@LonelyCat124
Copy link
Collaborator Author

integration passes so ready for review.

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Thanks Aidan.
Mostly good but I'm worried that we're no longer testing the 'transmutation' part of LFRic-atm - see inline. (I may be mistaken though.)

# Build the 'meto-ex1a' platform, that includes psyclone-transmutation
export BUILD_START="${SECONDS}"
./build/local_build.py -a lfric_atm -p meto-ex1a -j 16 -w workdir-lfric-atm-transmuted
./build/local_build.py -a lfric_atm -p psyclone-test -j 16 -w workdir-lfric-atm-transmuted
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean we're no longer testing the 'transmutation' if we're using our own "everything_everywhere..." script? That doesn't seem right?

Copy link
Member

Choose a reason for hiding this comment

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

Could we patch the transformation script(s) used by LFRic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm a bit clueless here I just did what @sergisiso suggested I thought - if I misunderstood I can fix that, let me know if so Sergi.
Its probably patchable but I'd need to find the script, its just removing OMPParallelTrans from the transformations import and swapping it to psyir.transformation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this mean we're no longer testing the 'transmutation' if we're using our own "everything_everywhere..." script?

Yes, but not because we use this file for psykal transformations, but because we created a new optimisation target "psyclone-test" without a transmute folder.

A quick solution would be to also copy the transmute files from meto-ex1a cp applications/lfric_atm/optimisation/meto-ex1a/transmute/ applications/lfric_atm/optimisation/psyclone-test/transmute/ however if any of those also gets OMPParallelTrans from TransInfo it will also fail.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh yeah I'd forgotten this change means OMPParallelTrans is no longer available from TransInfo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One place its defined in lfric that is a problem for lfric_atm is unfortunately in lfric_core/infrastructure/build/psyclone/psyclone_tools.py where they use:

from psyclone.transformations import (
    Dynamo0p3ColourTrans,
    Dynamo0p3OMPLoopTrans,
    Dynamo0p3RedundantComputationTrans,
    OMPParallelTrans,
)

This might be possible to fix but I'm not sure how, we'd need to patch it somehow - @arporter I think up to you if you want me to try.

Its also imported in applications/lfric_atm/optimisation/meto-ex1a/psykal/algorithm/casim_alg_mod.py, for lfric atm. It is used in a few other application scripts but I assume we don't hit those in our tests.

Copy link
Member

Choose a reason for hiding this comment

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

This might be possible to fix but I'm not sure how, we'd need to patch it somehow - @arporter I think up to you if you want me to try.

Yes please, I think it's important we keep this. We do already patch lfric for the nvidia compiler:

# We need to patch lfric_core to resolve issues with the nvfortran compiler

so hopefully it's doable for this too. Or have a little bash script that finds all .py files, checks for OMPParallelTrans and updates as necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It could get complicated with patches (I am also breaking lfric_atm scripts in #3275). But since I am updating to git in another PR and lfric_apps is public and on git what do you think if we create a fork of MO:lfric_apps with we do the scripts breaking changes there. Then with the release we can push the changes to the MO repository or at least point it to them in order to do the update.

Copy link
Member

Choose a reason for hiding this comment

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

That's a good idea Sergi - sounds like the most straightforward way to go.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sergisiso Should we do this for lfric_core too? There are some scripts in there that contain base functionality used by lfric_apps (e.g. lfric_core/infrastructure/build/psyclone/psyclone_tools.py)

# J. Dendy, Met Office
'''This module provides the OMPParallelTrans transformation.'''

from psyclone.psyir.transformations.parallel_region_trans import (
Copy link
Member

Choose a reason for hiding this comment

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

If possible (i.e. you don't get circular imports), pls put these import statements in alpha-order by module name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@LonelyCat124
Copy link
Collaborator Author

lfric core: 4eec06e08e19ac23a894fcfdad691132ffc68293
lfric atm: b0c43b04041d929ffc887f82f27263d9a0feaa2d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants