stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
107 stars 29 forks source link

Handle inconsistent OpenACC loop clauses #2763

Closed jwallwork23 closed 2 weeks ago

jwallwork23 commented 3 weeks ago

Partially addresses #2717.

In PSyACC, we disallow sequential clauses to be used in conjuction with gang and/or vector clauses because the combination doesn't make sense. This PR handles such clause combinations in a similar way.

I also noticed that the private ACCLoopDirective._gang (etc.) members are often accessed rather than the public properties ACCLoopDirective.gang, so addressed this. The new ACCLoopDirective._check_clauses_consistent method is used in a few places that seem sensible.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.86%. Comparing base (65e3232) to head (6fdb08b). Report is 7 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2763 +/- ## ======================================= Coverage 99.86% 99.86% ======================================= Files 354 354 Lines 49021 49031 +10 ======================================= + Hits 48957 48967 +10 Misses 64 64 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jwallwork23 commented 2 weeks ago

Thanks very much for this @jwallwork23. All looks fine apart from the fact that you've consistently misspelt "conjunction" as "conjuction" :-) Once that's fixed this will be good to go providing the integration tests are OK (I've set them running).

Thanks for the review, @arporter. Ah, well at least I was consistent! Fixed in de3ba19c07736418ffb6d4a5359917b15360ded1.