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

Adjust retrieving _max_workers from Executor #8228

Merged
merged 4 commits into from Oct 8, 2021

Conversation

jakirkham
Copy link
Member

The mpi4py implementation will return None if it can't give a specific number. So this adjusts how _max_workers is retrieved to set it to None if it can't be figured out. Then if it is None, it will fallback to dask.config.

xref: mpi4py/mpi4py#94
xref: mpi4py/mpi4py#117

  • Closes #xxxx
  • Tests added / passed
  • Passes black dask / flake8 dask / isort dask

@jakirkham
Copy link
Member Author

Planning on merging end of day tomorrow if no comments.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @jakirkham! Since this is a subtle point, could you add a test or comment explaining why this is needed? Otherwise this might get unintentionally reverted in the future

The `mpi4py` implementation will return `None` if it can't give a
specific number. So this adjusts how `_max_workers` is retrieved to set
it to `None` if it can't be figured out. Then if it is `None`, it will
fallback to `dask.config`.
@jakirkham
Copy link
Member Author

Sure have done both

Since this is content within the partial, added an assert in the code just to confirm we are getting what we expect there. The test added triggers this assert without the code change made in the first commit

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @jakirkham!

@jrbourbeau jrbourbeau merged commit 6e734cd into dask:main Oct 8, 2021
@jakirkham jakirkham deleted the use_mpi4py_max_workers branch October 8, 2021 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants