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

Bug/568 get halo behaviour if no data on process #631

Merged

Conversation

lucaspataro
Copy link
Contributor

Description

Issue/s resolved: #568

Empty ranks at the end of the communicator are now ignored.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Due Diligence

  • All split configurations tested
  • Documentation updated (if needed)

Does this change modify the behaviour of other functions? If so, which?

no

@codecov
Copy link

codecov bot commented Jul 13, 2020

Codecov Report

Merging #631 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #631   +/-   ##
=======================================
  Coverage   97.38%   97.39%           
=======================================
  Files          87       87           
  Lines       16758    16802   +44     
=======================================
+ Hits        16320    16364   +44     
  Misses        438      438           
Impacted Files Coverage Δ
heat/core/dndarray.py 96.58% <100.00%> (+0.04%) ⬆️
heat/core/tests/test_dndarray.py 100.00% <100.00%> (ø)
heat/core/tests/test_statistics.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cee8f0...5f063ad. Read the comment docs.

@ClaudiaComito ClaudiaComito self-assigned this Jul 14, 2020
@ClaudiaComito ClaudiaComito added this to In progress in Current sprint via automation Jul 14, 2020
prev_rank = rank - 1
last_rank = size - 1

# if local shape is zero and its the last process or the next one is also zero we can exit here
Copy link
Contributor

Choose a reason for hiding this comment

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

You want to be checking if a DNDarray is balanced here. Otherwise you could hypothetically have 2 empty processes and then some data on one of the next ones.
On the other hand, if a DNDarray is balanced and lshape[split] on rank is 0, you don't need to check the next rank.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ClaudiaComito What is the desired behavior if there are empty ranks in the middle? Preventing the halo all together, or skipping the empty ranks and using the next/prev non-empty rank?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @lucaspataro, that's an interesting question. I think so far we're assuming that operations are performed on balanced DNDarrays, in that case the empty ranks will always be at the end. I would say that for now an empty rank "in the middle" is an edge case we don't really need to worry about. What do you think, @krajsek ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @ClaudiaComito, i added a RuntimeError if tensor is not balanced and removed the check for empty next rank like you suggested.

Current sprint automation moved this from In progress to Review in progress Jul 16, 2020
Copy link
Contributor

@ClaudiaComito ClaudiaComito left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks for fixing this. I have updated test_percentile to include a test with no data on process.

I have one change request.

@coquelin77
Copy link
Member

bump, requested changes and conflict resolution

@mtar
Copy link
Collaborator

mtar commented Sep 7, 2020

GPU cluster tests are currently disabled on this Pull Request.

Copy link
Contributor

@ClaudiaComito ClaudiaComito left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot!

Current sprint automation moved this from Review in progress to Reviewer approved Sep 22, 2020
@ClaudiaComito ClaudiaComito merged commit 6c490d7 into master Sep 22, 2020
Current sprint automation moved this from Reviewer approved to Done Sep 22, 2020
@ClaudiaComito ClaudiaComito deleted the bug/568-get_halo-behaviour-if-no-data-on-process branch September 22, 2020 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

get_halo behaviour if no data on process
4 participants