Skip to content

Conversation

@LonelyCat124
Copy link

No description provided.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.19%. Comparing base (eee1f4f) to head (37db93d).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #486   +/-   ##
=======================================
  Coverage   92.19%   92.19%           
=======================================
  Files          86       86           
  Lines       13802    13802           
=======================================
  Hits        12725    12725           
  Misses       1077     1077           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LonelyCat124
Copy link
Author

@sergisiso This is ready for a look - small change to support generic directives as discussed yesterday.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LonelyCat124 see inline mostly questions and request for test regarding this.

@sergisiso sergisiso added reviewed with actions PR has been reviewed and is back with developer and removed ready for review labels Oct 14, 2025
@LonelyCat124
Copy link
Author

@sergisiso Back to you, should be fixed up.

@LonelyCat124 LonelyCat124 added ready for review and removed reviewed with actions PR has been reviewed and is back with developer labels Oct 14, 2025
@LonelyCat124
Copy link
Author

We still get a bit weird locality here:

Block_Nonlabel_Do_Construct(Comment(''), Directive('!$acc comment3'), Comment('!comment3'), Nonlabel_Do_Stmt('DO', Loop_Control(None, (Name('i'), [Int_Literal_Constant('1', None), Name('n'), Int_Literal_Constant('1', None)]), None, None))

comes from

!$acc comment 3
!comment3
do i =1, n, 1

This makes life a little tricky in PSyclone. Also the first one after the declarations is hard to find.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LonelyCat124 This is better but I still have some comments about the tests.

We still get a bit weird locality here

I think that's alright for now. I think we should focus first in that "keep_comments" and "keep_directives" work, and we can improve the specifics latter.

@sergisiso sergisiso added reviewed with actions PR has been reviewed and is back with developer and removed under review labels Oct 31, 2025
@LonelyCat124 LonelyCat124 added ready for review and removed reviewed with actions PR has been reviewed and is back with developer labels Oct 31, 2025
@LonelyCat124
Copy link
Author

@sergisiso I think I've tidied up the tests now. The remaining question is whether we do any further work on multi-line directives, but I think that might be difficult for me to do without really diving deep into fparser (and maybe require some significant rewriting of how we handle these now, making comment/directives very different). Maybe its best to just add notes into the documentation for now?

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LonelyCat124 I am still confused about the behaviour, it would be good to complete stfc/PSyclone#3196 so we can see the whole thing.

@sergisiso sergisiso added reviewed with actions PR has been reviewed and is back with developer and removed under review labels Oct 31, 2025
@LonelyCat124
Copy link
Author

@sergisiso I added the additional tests here. I didn't add a fixed-form acc test though I can add it if you think its worth testing separately.
I think the stfc/PSyclone#3196 PR probably tests the functionality changes that come from this with fparser. In fact the only remaining issue I remember with this is what to do with directives that appear within the declaration list in the Fortran source, which I have no good solution for (since the current behaviour leaves them as comments, and then PSyclone adds a space into ! dir$, but CodeBlocks can't go into the corresponding part of the tree. I'll try to find the xisting tests that test the ignore_directives=True behaviour from previous work and confirm that directives don't appear as comments with this branch added, but I'm fairly sure those already would have been in fparser2 frontend + comment tests.

@LonelyCat124 LonelyCat124 added ready for review and removed reviewed with actions PR has been reviewed and is back with developer labels Oct 31, 2025
Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LonelyCat124 Ok, I am satisfied with the fparser part of directives, the remaining part is for psyclone to fix. This is approved for merging.

@sergisiso sergisiso merged commit 669e2b1 into master Oct 31, 2025
6 checks passed
@sergisiso sergisiso deleted the 483_generic_directives branch October 31, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants