-
Notifications
You must be signed in to change notification settings - Fork 30
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
(Closes #2499) scalarization transformation implementation #2563
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2563 +/- ##
=======================================
Coverage 99.89% 99.89%
=======================================
Files 359 360 +1
Lines 50997 51089 +92
=======================================
+ Hits 50942 51034 +92
Misses 55 55 ☔ View full report in Codecov by Sentry. |
@hiker Quick question on how the ordering of statements goes with the dependency system - if you have an assignment such as |
@sergisiso this is ready for a first look. I'm waiting for hiker to clarify my question before I remove the code at lines 123 in the transformation, but I expect to remove those lines as I think they're unreachable. |
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.
Good initial implementation @LonelyCat124, I am just asking if the code can be slightly refactored to be more readable and I am wondering if some logic should leave inside the next_access methods, I am happy to discuss this one.
@sergisiso I've addressed most of the comments here - I think the next_access one is a bigger issue than just here (and we need to decide if the variable access tooling should handle this or if we just do it in next_access, but I think we can do an implementation for this in the mean time anyway). I need to still expand the tests for the apply routine and add documentation before another review though I think. |
@LonelyCat124 I don't mind the order of these (if you put the associated TODOs), but wouldn't want to go very far with some logic that then will need to be deleted. |
I brought this up to master now and made the tests pass, but I'll start reworking the logic here now. |
Ok - integration tests find a couple of issues. NEMO 5 fails due to an error I'm not sure inside the dependency code, where something isn't created correctly. I'll need to check the processed file to fix that. NEMO 4 fails due to a failure to resolve a MAXVAL signature, which I need to test myself. I'm a bit confused why we get a signature for MAXVAL but I'll investigate. |
…d to handle a case where an array access had a RoutineSymbol (i.e. a function call) as an index
…yclone into 2499_scalarization_trans
Will run the integration tests again - only NEMO4 though for now. |
Another failure on the integration tests for NEMO4. I've drafted a fix but I'll need to check the original subroutine to check it's fixed, and then create a test to cover it |
Remaining issues seem to be a bug in DefinitionUseChains. I'm going to try to work this out - once I find it am I ok to fix it here or shall i create an issue and separate pull request @sergisiso ? |
Probable bug: What happens if we find an element of a structure that we think can be scalarised (e.g. |
…ith obs_ at the start to compile
NEMO passthrough gives the wrong result - I need to investigate. |
NEMO4 now works, NEMO5 gets the wrong answer, I'll try to investigate next week |
First implementation is here. I have unit tests for the private routines, I need to test it with code examples doing the full transformation properly but in theory its implemented here for now.