Skip to content
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 #2854) exclude char assignments from ACC KERNELS regions #2857

Merged
merged 9 commits into from
Jan 24, 2025

Conversation

arporter
Copy link
Member

Small PR that picks up the functionality already in ArrayAssignment2LoopsTrans and copies it into ACCKernelsTrans.

@arporter arporter self-assigned this Jan 17, 2025
@arporter arporter added the NG-ARCH Issues relevant to the GPU parallelisation of LFRic and other models expected to be used in NG-ARCH label Jan 17, 2025
@arporter arporter marked this pull request as draft January 17, 2025 11:47
@arporter
Copy link
Member Author

I'm not entirely happy with the code duplication here but this PR is for OpenACC functionality and the existing check is in the conversion of array assignments to loops so there's not much common ground between them.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.89%. Comparing base (e2d88e9) to head (3c92b65).
Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2857   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files         359      359           
  Lines       50981    50995   +14     
=======================================
+ Hits        50926    50940   +14     
  Misses         55       55           

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

@arporter
Copy link
Member Author

I've solved the duplication by making the validation a separate classmethod in ArrayAssignment2LoopsTrans. Coverage is 100%. I'll set the integration tests running.

@arporter
Copy link
Member Author

Integration test for NEMOv4 failed but only because of a small bug where we failed to lower-case the name of a structure component when getting its datatype. I'll re-run that job.

@arporter
Copy link
Member Author

Integration tests now green. Ready for review from anyone :-)

@arporter
Copy link
Member Author

I changed my mind - it turns out my 'fix' revealed general case-sensitivity problems in our storage of components of a StructureType. I've fixed these now and extended the tests slightly.

@arporter arporter marked this pull request as ready for review January 20, 2025 13:27
@arporter
Copy link
Member Author

Ready for review now. Integration tests are finally happy :-)

Copy link
Collaborator

@LonelyCat124 LonelyCat124 left a comment

Choose a reason for hiding this comment

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

@arporter Couple of small changes in docs, and a couple of queries I'm just unsure about.

@arporter
Copy link
Member Author

arporter commented Jan 22, 2025

Imaran has found that this PR doesn't fix e.g. obs_surf_def.f90 because that has a character string as a member of a derived type and we haven't resolved the derived type so don't know that it's a character string. There are a few options:

  1. always attempt to resolve the type in such a case
  2. refuse to allow unresolved types inside ACC regions
  3. exclude the file from PSyclone processing

I think we want 2. to be the default and 1. to be an option. I thought @sergisiso had an Issue about this (being much more defensive about what we offload) but I can'f find it?

@arporter
Copy link
Member Author

Although this doesn't fix all our (OpenACC) problems, it is a step forward so I've opted to keep this PR small and self-contained and not attempt to fix anything else. Ready for another look now. I'll fire off the integration tests as master has moved on a lot since I last did that.

@LonelyCat124
Copy link
Collaborator

Integration tests work - am going to have one more local pass before marking this ready to merge.

@LonelyCat124 LonelyCat124 merged commit 10a3a6e into master Jan 24, 2025
13 checks passed
@LonelyCat124 LonelyCat124 deleted the 2854_acckernels_no_char branch January 24, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NG-ARCH Issues relevant to the GPU parallelisation of LFRic and other models expected to be used in NG-ARCH ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants