-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Custom client/scheduler MPI rank placement #110
Conversation
for more information, see https://pre-commit.ci
NOTE: The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been sat for a long time, I think we should go ahead and merge it and then if there is any feedback we can iterate in follow up PRs.
Update - Ready for Review
I have added a
dask_mpi.execute()
function, though it looks a little different than the sketch in the "Previous Header" below. The idea is that theexecute()
function is that it should use MPI to launch the client code/function, the Dask Scheduler, and any needed Dask Workers, as specified. It is general purpose, and can run with or without client code function. It can also run with or without launching a Scheduler. This makes (or should make)execute()
completely general, and it can/should work for all use cases either through the CLI or in batch-mode.The
execute()
function works by taking a (synchronous) function as input (along with its args/kwargs) and runs the function on a single MPI rank in its own thread. A Dask Scheduler or Worker (or both) can be run on the same MPI rank, if desired. Thus, the entire Dask-MPI utility can launch a Dask cluster with a wide variety of customizable options:execute()
works like the old Dask-CLI does, creating a scheduler and workers.scheduler=False
is specified, then it assumes the user supplies ascheduler_address
and no actual Scheduler will be run, assuming a scheduler is running at thescheduler_address
. This allows you to "add" to a Dask cluster. You can also run a client function to run in batch mode (which also shuts down the cluster when finished).All of the options encoded into the CLI/interactive mode of using Dask-MPI are available with
execute()
, as are all of the options available to theinitialize()
batch mode of using Dask-MPI.NOTE: This PR only implements the
execute()
method. The old CLI has not been modified to use theexecute()
method, but it can easily be done. Additionally, it does not modify/deprecate/remove theinitialize()
method. So, all existing functionality will still work, but this new function will provide new functionality and (in a future PR) we can modify the CLI to useexecute()
and deprecate theinitialize()
method.Previous Header
This is a mock-up of a new way of using Dask-MPI that allows custom placement of the client code and the scheduler on the available MPI ranks. The approach is described in #29 (comment), the salient portion of which is quoted below:
This is a draft for the purposes of discussion.