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

Inline: Fix rescoping of intrinsic procedure symbols in elementals #445

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

mlange05
Copy link
Collaborator

This caused problems by a race condition, where the elemental scope that was the original scope of intrisincs could be re-build, making the scope weakref invalid before the final catch-all rescoping.

To fix this, I'm explicitly foxing the function body to be rescoped, before it gets inserted. This was problematic, as intrisic procedure symbols were not updated correctly, so I enforce indiscriminant rescoping for intrisic procedure symbols to the given, closest scope in AttachScopesMapper.

@mlange05 mlange05 requested a review from reuterbal November 22, 2024 09:01
Copy link

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/445/index.html

This caused problems by a race condition, where the elemental scope
that was the original scope of intrisincs could be re-build, making
the scope weakref invalid before the final catch-all rescoping.

To fix this, I'm explicitly foxing the function body to be rescoped,
before it gets inserted. This was problematic, as intrisic procedure
symbols were not updated correctly, so I enforce indiscriminant
rescoping for intrisic procedure symbols to the given, closest scope
in `AttachScopesMapper`.
@mlange05 mlange05 force-pushed the naml_fix_inline_elemental_with_intrisics branch from af96233 to 49859f1 Compare November 22, 2024 09:40
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.32%. Comparing base (72d35fb) to head (49859f1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #445   +/-   ##
=======================================
  Coverage   93.32%   93.32%           
=======================================
  Files         212      212           
  Lines       40769    40793   +24     
=======================================
+ Hits        38047    38071   +24     
  Misses       2722     2722           
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 93.28% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Thanks, these are notoriously hard to find and test. Much appreciate the quick fix!

@reuterbal reuterbal added the ready for merge This PR has been approved and is ready to be merged label Nov 22, 2024
@reuterbal reuterbal merged commit 0218f51 into main Nov 22, 2024
13 checks passed
@reuterbal reuterbal deleted the naml_fix_inline_elemental_with_intrisics branch November 22, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge This PR has been approved and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants