-
Notifications
You must be signed in to change notification settings - Fork 3
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
Generalisation #330
Conversation
Improve artefact workflow
Make Fab more useable for other codes
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 |
run_configs/lfric/atm.py
Outdated
@@ -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", |
There was a problem hiding this comment.
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"
?
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
… it easier to update when the name changes with the next PSyclone release.
Dang, looks like I forgot to tick 're-request review' :) |
There was a problem hiding this 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.
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).