(Towards #2384) directive codeblocks#3014
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3014 +/- ##
========================================
Coverage 99.92% 99.92%
========================================
Files 366 366
Lines 51566 51677 +111
========================================
+ Hits 51526 51637 +111
Misses 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I now have support and tests for using this with GOCean and LFRic. This required modifying a few places in the code to copy over comments that otherwise didn't, and also enabling parse_fp2 to take an Those changes still need unit testing. |
…clarations from Program
|
@sergisiso @arporter This is ready for a first look now. At the moment I didn't change any of the behaviour for non-directive comments at the end of a code region. We in theory have functionality to turn those into If you think its reasonable, I think a The other step would be to start converting the directives from codeblocks into actual directives to mix with PSyclone generated ones, but that is very much a "next step" that is a lot more difficult - at least for those directives that expect a schedule etc. |
|
@JulienRemy @schreiberx This PR converts comments to CodeBlocks using the "keep_directive" option that you added to psyclone's frontend. I assume you did this for Poseidon, could you check if this change will cause any issues for you? Are all the directives that you look for in the variable declarations or are they also inside the execution part of the code? |
…ppens for the final comment in a scope if its kept
|
@arporter @sergisiso I'm satisfied with the change for the directives being aware (with limits) of the symbols they contain now - so its ready for review again now. There can be false positives, however we can't do much about that (e.g. if there's a varaible named |
arporter
left a comment
There was a problem hiding this comment.
Very nearly there now - just a bit of refactoring so that the new utility method can be used in one other location to remove duplication. Please also bring up-to-date with master (which brings back the Python 3.9 testing).
|
I missed updating the integration tests too - though I'm not sure how to do this. The LFRic build system is out of PSyclone's control right? Or do you mean the examples? @arporter |
Oh yes, I forgot that we now just checkout LFRic in its entirety. It will have to just be the LFRic examples. NEMO is slightly easier in that the source is kept on the CI machine. However, if we add these new flags now then we'll break everyone else's PRs so I suggest we do that later as a separate PR. So, to summarise, if you could just update (some of) the LFRic and NEMO examples to use these new flags that would be great. |
|
Added now. Assuming testing is ok will send back to you. |
|
Unfortunately we got a signal 11 when building NEMOv5 with OMP offload: Is this a known issue @sergisiso ? |
|
yes, it happens intermittently, sometimes rerunning the action is enough |
|
Re-triggering the CI run 'fixed' it so I'll work on merging this PR now. |
arporter
left a comment
There was a problem hiding this comment.
All good now.
Will proceed to merge.
Could be closes, but I'd like to do better than codeblocks if possible (though it'd be a lot more work).
First commits worked for a tiny test case for me with keeping directives, but at this stage I've not added it to the psyclone command yet.