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

return slice(0,-1) for glb_slices if glb_numb empty on an mpi rank #2004

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

deckerla
Copy link
Contributor

No description provided.

@deckerla
Copy link
Contributor Author

Closes #2003

@deckerla
Copy link
Contributor Author

local_indices tests in MPI seem to be turned off at the moment, so I am not sure what the best way is to have unit tests for this PR

# TestSparseFunction().test_local_indices([(0.5, 0.5), (1.5, 2.5), (1.5, 1.5), (2.5, 1.5)], [[0.], [1.], [2.], [3.]]) # noqa

@mloubout
Copy link
Contributor

tests in MPI seem to be turned off a

No this is the "main" to debug, i.e so that you can run python test_mpi.py. Pytest ignores this it runs all tests functions named test_*. So you can just use an extra case to the test here:

@pytest.mark.parametrize('shape,expected', [

@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #2004 (e1e2bef) into master (6e1dcc5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2004   +/-   ##
=======================================
  Coverage   87.85%   87.85%           
=======================================
  Files         214      214           
  Lines       36710    36713    +3     
  Branches     5550     5550           
=======================================
+ Hits        32250    32253    +3     
  Misses       3942     3942           
  Partials      518      518           
Impacted Files Coverage Δ
devito/mpi/distributed.py 92.11% <100.00%> (ø)
tests/test_mpi.py 99.03% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@deckerla
Copy link
Contributor Author

@mloubout thanks for the advice! most recent push includes modified unit test covering the behavior

Copy link
Contributor

@mloubout mloubout 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.

One minor CI comment but should be goog to go

tests/test_mpi.py Outdated Show resolved Hide resolved
@mloubout mloubout merged commit b83fa84 into devitocodes:master Sep 22, 2022
@deckerla deckerla deleted the localindsfix branch September 22, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants