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

algorithm invoke argument transformation should use MetadataToArgumentsRules #2188

Open
rupertford opened this issue Jun 22, 2023 · 3 comments
Assignees
Labels
in progress LFRic Issue relates to the LFRic domain

Comments

@rupertford
Copy link
Collaborator

The lfric_alg_invoke_2_psy_call_trans get_arguments method currently manually iterates over the metadata and should probably use a subclass of MetadataToArgumentsRules. I think there are two subclasses required, one to check the metadata and kernel arguments are consistent (at first just check that the number of arguments match) and the other to pull out the required arguments.

@rupertford rupertford added the LFRic Issue relates to the LFRic domain label Jun 22, 2023
@rupertford rupertford changed the title algorithm invoke argument transformation should use MetadataToArgumentsRule algorithm invoke argument transformation should use MetadataToArgumentsRules Jun 22, 2023
@rupertford rupertford self-assigned this Jun 23, 2023
@rupertford
Copy link
Collaborator Author

I'll look at checking that the kernel arguments match the metadata description first.

@rupertford
Copy link
Collaborator Author

Created branch 2188_check_kernel_args

@rupertford
Copy link
Collaborator Author

To check that kernel arguments match I need to count the number of arguments expected by the metadata. I started updating the base class MetadataToArgumentsRules to count these. However, this means I need to have logic understanding the arguments and how many there are for each method which is already going to be captured when generating the arguments when calling a kernel from the PSy layer or when generating stub arguments. Due to this complexity I think it is better to use these to count the number of expected arguments even though it will be less efficient. Therefore I'm going to stop working on this branch until PR #2079 is on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress LFRic Issue relates to the LFRic domain
Projects
None yet
Development

No branches or pull requests

1 participant