Skip to content

Conversation

@sergisiso
Copy link
Collaborator

@sergisiso sergisiso commented Nov 10, 2025

This fixes two problems:

  • The escapes_scope did not consider that if an array is written to a single element after the loop, the rest of the indices are still potentially escaping the scope.
  • The privatisation validation did not consider that a different iteration of the loop may read a value of the array set by another thread, so it should not allow to privatise arrays that may read any position in the array of interest first (as this may not have the right value even if it is firstprivate).

I also made the NEMOv5 gcc tests check full numerical reproducibility, which needed 5 files excluded.

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (273a46a) to head (2f41b6f).
⚠️ Report is 13 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3214   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files         376      376           
  Lines       53194    53225   +31     
=======================================
+ Hits        53142    53173   +31     
  Misses         52       52           

☔ 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.

@sergisiso sergisiso requested a review from arporter November 10, 2025 16:43
@sergisiso
Copy link
Collaborator Author

@arporter This is ready for review.

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for tracking down and fixing these fairly subtle issues. Just some minor tidying required. Your update to the message about adding symbols to "explicitly_private_symbols" made me wonder whether we have this documented anywhere but we don't seem to. Really, it would go in a "how to" section or a tutorial but I don't think we currently have anything like that?

@sergisiso
Copy link
Collaborator Author

@arporter This is ready for another look.

"explicitly_private_symbols" made me wonder whether we have this documented anywhere

Although the current implementation of "explictly_private_symbols" is useful in NEMO, people requested it for LFRic_atm components but was not applicable because they use region directives, not loop directives. So I will attempt to refactor/rethink it before documenting it. But I mentioned this point in #3216

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Thanks Sergi, all looks good now.
I see the integration tests were fine.
Will proceed to merge.

@arporter arporter merged commit 27f1881 into master Nov 12, 2025
15 checks passed
@arporter arporter deleted the 3188_tighten_privatisation_validation branch November 12, 2025 13:25
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.

3 participants