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

MPI: fix haloupdate inside factor conditional #2395

Closed
wants to merge 3 commits into from
Closed

Conversation

mloubout
Copy link
Contributor

@mloubout mloubout commented Jul 1, 2024

On top of #2394

@mloubout mloubout added MPI mpi-related compiler labels Jul 1, 2024
@mloubout mloubout requested a review from FabioLuporini July 1, 2024 15:16
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 40.62500% with 19 lines in your changes missing coverage. Please review.

Project coverage is 78.27%. Comparing base (4e86b12) to head (d86f1f5).

Files Patch % Lines
tests/test_mpi.py 15.38% 11 Missing ⚠️
tests/test_data.py 25.00% 6 Missing ⚠️
devito/mpi/distributed.py 33.33% 1 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (4e86b12) and HEAD (d86f1f5). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (4e86b12) HEAD (d86f1f5)
16 14
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2395      +/-   ##
==========================================
- Coverage   86.69%   78.27%   -8.42%     
==========================================
  Files         234      234              
  Lines       44383    44410      +27     
  Branches     8216     8221       +5     
==========================================
- Hits        38477    34764    -3713     
- Misses       5185     8869    +3684     
- Partials      721      777      +56     

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

@@ -182,7 +183,12 @@ def rule2(dep, hs, loc_indices):
# within the same Conditional, otherwise we would break the control
# flow semantics
if cond_mapper.get(hs0) != cond_mapper.get(hs1):
continue
cond = cond_mapper.get(hs1).symmetric_difference(cond_mapper.get(hs0))
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be neater to de-nest it by re-writing it as (pseudocode):

cond = cond_mapper.get(hs1).symmetric_difference(cond_mapper.get(hs0))
if len(cond) > 1:
    <explanation>
    continue
elif len(cond) == 1 and isinstance(cond.pop().condition, GuardFactorEq):
    <explanation>
    continue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure it'd be neater. Would need either a vague else or do the Guard first but make a copy so that the pop doesn't break the >1 I'll think about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cleaner to just filter when making the cond_mapper

@mloubout mloubout closed this Jul 1, 2024
@mloubout mloubout deleted the cond-halo branch July 22, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler MPI mpi-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants