Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalisation #330

Merged
merged 265 commits into from
Aug 9, 2024
Merged

Generalisation #330

merged 265 commits into from
Aug 9, 2024

Conversation

hiker
Copy link
Collaborator

@hiker hiker commented Jul 29, 2024

This adds support for .f/.F files (we needed this for another project), and supports to change the PSyclone API (including not using an API, which is the new PSyclone mode for transforming existing files - formerly called NEMO API).

hiker and others added 30 commits March 12, 2024 20:25
@hiker hiker requested a review from MatthewHambley July 29, 2024 14:01
@hiker
Copy link
Collaborator Author

hiker commented Jul 29, 2024

I am not entirely sure why it shows that many commits - I guess I might not have updated it properly at some stage, or maybe a side-effect of the move of the git repo (this one, and then ours since we couldn't figure out how to 'rebase' our repo). But the changes themselves (see Files Changed) are actually quite small. Hope that's ok

@MatthewHambley MatthewHambley requested review from allynt and removed request for MatthewHambley July 30, 2024 07:49
@@ -247,6 +247,7 @@ def file_filtering(config):
kernel_roots=[state.build_output / 'lfric' / 'kernel'],
transformation_script=get_transformation_script,
cli_args=[],
api="dynamo0.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

New to this repo, so don't know what the style guidelines are. But this new argument is repeated in multiple calls to psyclone. Is it better to add it as a constant somewhere to keep things DRY?

DEFAULT_PSYCLONE_API = "dynamo0.3"

?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, I was told that the "dynamo0.3" API name is deprecated as of PSyclone 2.5. It is replaced 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.

Thanks for jumping in here. I might have to explain a few things in my comments.

We are actually doing the development of the final LFRic build scripts (in a different repo on our HPC site, so I can't easily share this, but am happy to send out a tar ball at some stage.). This development will actually create two new base classes: one generic base class (for now named BafBase ... BAF= Build Architecture with Fab :) ), and one LFRicFab base class (not sure about the name, but you get the idea :) ). All these scripts that have currently a name hard-coded, will then rely on this base class to provide the proper API name. So once we are done with this, we will redo ALL scripts in run_configs, at which stage this problem will sort itself out.

We are also experimenting using Fab with other, non LFRic code bases, so we are still tweaking the actual design of BafBase and LFRicBase, so we only do the minimal changes to the current configs (I don't even like the name of the directory, maybe examples??? Or templates??) to make sure they work, and later will have a proper PR that updates all of them.

Re dynamo0.3: partially right :) PSyclone 2.5 only supports dynamo0.3. ATM (I am a PSyclone dev, so always on current master) we support lfric and dynamo0.3. We are not yet certain if we will enforce the new API name with the next release (imho we should :) ). I hope that our Fab work can progress fast enough to get this all sorted out (i.e. only one place with the API name) before the next version is released.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Anyway, that was a small change, so I've added an API to lfric_common.py.

mp_payload = MpCommonArgs(
analysed_x90=analysed_x90,
all_kernel_hashes=all_kernel_hashes,
cli_args=[],
config=None, # type: ignore[arg-type]
kernel_roots=[],
transformation_script=mock_transformation_script,
api="dynamo0.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

@hiker
Copy link
Collaborator Author

hiker commented Aug 7, 2024

Dang, looks like I forgot to tick 're-request review' :)

@hiker hiker requested a review from allynt August 7, 2024 13:28
Copy link
Collaborator

@allynt allynt left a comment

Choose a reason for hiding this comment

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

I don't pretend to understand everything that's happening. But all of my previous concerns have been addressed. So I'm willing to approve.

@allynt allynt merged commit 546ee9e into MetOffice:master Aug 9, 2024
5 checks passed
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.

4 participants