PSyclone
PSyclone copied to clipboard
LFRic PSyIR Kernel Metadata support (closes #1806)
Raises generic PSyIR capturing an LFRic Kernel to LFRic-specific PSyIR with the metadata stored in a separate class for easy access, modification etc.
todo 1) stencils for fields and field vectors 2) mesh_arg for intergrid args
todo columnwise args may be assembly or matrix-matrix and these have different constraints on the type of arguments that are allowed. I'm not sure how to add this constraint at the moment. Should it be an additional argument to the initialisation or should it be a different argument type?
Codecov Report
Base: 99.52% // Head: 99.52% // Increases project coverage by +0.00%
:tada:
Coverage data is based on head (
655ac30
) compared to base (68c2149
). Patch coverage: 100.00% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #1807 +/- ##
========================================
Coverage 99.52% 99.52%
========================================
Files 273 284 +11
Lines 39943 40592 +649
========================================
+ Hits 39752 40401 +649
Misses 191 191
Impacted Files | Coverage Δ | |
---|---|---|
src/psyclone/configuration.py | 100.00% <100.00%> (ø) |
|
...psyclone/domain/common/transformations/__init__.py | 100.00% <100.00%> (ø) |
|
...syclone/domain/common/transformations/alg_trans.py | 100.00% <100.00%> (ø) |
|
.../common/transformations/raise_psyir_2_alg_trans.py | 100.00% <100.00%> (ø) |
|
src/psyclone/domain/gocean/kernel/psyir.py | 100.00% <100.00%> (ø) |
|
...transformations/raise_psyir_2_gocean_kern_trans.py | 100.00% <100.00%> (ø) |
|
...one/domain/lfric/kernel/columnwise_operator_arg.py | 100.00% <100.00%> (ø) |
|
src/psyclone/domain/lfric/kernel/common_arg.py | 100.00% <100.00%> (ø) |
|
src/psyclone/domain/lfric/kernel/field_arg.py | 100.00% <100.00%> (ø) |
|
...c/psyclone/domain/lfric/kernel/field_vector_arg.py | 100.00% <100.00%> (ø) |
|
... and 11 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Ready for first review. Probably one for @arporter seeing as he reviewed the gocean kernel metadata PR. This PR does not add full support for the LFRic metadata so is only towards issue #1806. It still needs the remainder of the metadata to be parsed and for the type of kernel to be determined once the metadata is parsed. However, it is large enough as it is and has tackled the hardest problem - the parsing of meta_args
.
Added transformation to user guide.
Ready for next review from @arporter
When I asked for documentation I was hoping for something that explained what this functionality currently does and what it will ultimately do (perhaps in the developer guide). I don't understand why a lot of the code talks about PSyIR when it is in fact dealing in fparser2 parse trees?
I've added some words to the developer guide.
Ready for next review from @arporter I've had to comment out the building of LFRic example and tutorials as they were causing CI to fail even though they are OK locally. But there is plenty else to review.
Ready for next review from @arporter
On github actions the lfric eg12 example fails to load the PSyclone script with generator.py raising an exception. However, this works fine locally. I've not changed any code associated with this code so it is very strange. All filenames and values look fine. eg11 is run before eg12 and works OK. eg12 using the eg11 script works OK. It therefore looks like it is something to do with the name of the script or its content (unless something more strange is going on).
Replacing the extract_nodes.py script with a simple test.py script works.
Using extract_nodes.py which just writes out some text works OK. It therefore must be something in the script itself.
It looks like it is the import of LFRicExtractTrans in the script.
All of the offending imports have been from from psyclone.domain.lfric.transformations. I must have done something to stop the imports working from here in GHA.
At last. Ready for next review from @arporter.
Ready for next review from @arporter subject to GHA contentment.