-
Notifications
You must be signed in to change notification settings - Fork 32
(closes #3178) Fixes to handle Directives from fparser #3196
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
Conversation
Sorry for the slow review on that one, but you could already update the submodule to point to the HEAD of your fparser branch here, so the tests would pass. In fact, I wanted to suggest this while looking at the fparser PR, as I was unsure what the best options would be there without looking at what they meant for psyclone. |
|
Ok, I fixed this to use the submodule now. |
|
For some reason this hasn't worked. Getting this branch and doing a "git submodule update" still gives me origin/master |
Thats strange, it looks like the pytest on github has correctly used that branch. Maybe what I changed only affects that. |
|
Maybe cloning does what the submodules file asks, but for git pulls I think you need to commit the new submodule hash. If I do it manually and do a git diff I get: I think you need to commit this change. |
|
Should be done now. |
|
Just to keep track of some tests I was doing when reviewig the associated fparser PR: Statements directives are all preserved, but declaration's are converted to comments. Without the keep-directives: This are not technically directives anymore (there is a space) but maybe we should remove them. |
|
Yeah, I think this was essentially the failing behaviour also from #3196 - I'll need to adapt the regex code from fparser as well to remove the directive comments since at the moment PSyclone is just checking for |
|
I believe I've fixed that issue now. I will make the directives in/around declarations as an xfailing test. |
|
@LonelyCat124 We also need examples with "!$omp end .." specially for the cases that it is at the end of the subroutine and when it is followed by another "!$omp parallel do" loop. |
|
@sergisiso With the fparser updates, this branch is now working as expected - ready for another look. I've added tests for the directives you asked for (at least as I understood) as well. |
|
Hmm, somehow test suite isn't running with latest fparser master, I'll check again. |
sergisiso
left a comment
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.
@LonelyCat124 Thanks for fixing the issue involving both repositories, this now manages properly most cases of directives inside execution statements.
|
Just to me sure, I submitted the CI once more, as I am not sure if integration test were using the external fparser before, but they should not impact this PR as they have comments and directives disables anyway. |
Blocked by stfc/fparser#486
Will need to update PSyclone to use a specific commit of fparser once that is merged. Tests will fail in the mean time.
Main issue right now is this test fails, and I don't know if/how it should be solved:
These directives inside the declaration block have to become comments attached to the declarations, so they get bonus
added into them, which may not be correct behaviour, but is not straightforward to fix (other than modifying the backend options).