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

Document how to use book multiple cores for a single task #231

Open
guillaumeeb opened this issue Feb 4, 2019 · 3 comments
Open

Document how to use book multiple cores for a single task #231

guillaumeeb opened this issue Feb 4, 2019 · 3 comments
Labels
documentation Documentation-related sprint A good issue to tackle during a sprint
Milestone

Comments

@guillaumeeb
Copy link
Member

This is to clarify one of the outcome of #181.

Several people have asked how they can use dask-jobqueue to submit multi-threaded tasks. There are two answers currently:

  • we can use resource_spec or specific scheduler equivalent kwarg to book more cores than nprocs*nthreads started with dask-worker.
  • or we can use resources functionnality, which allows to submit both multi-threaded or single threaded tasks on the same cluster.

This needs to be documented.

@lesteve made up some examples: see #181 (comment).

@djhoese
Copy link

djhoese commented Feb 8, 2019

Would this also apply to computing dask arrays (client.compute)? For example, if I have a dask array that is the result of many array operations that perform best on a threaded scheduler by themselves, is there an easy way to say that this array and all of its pre-tasks should be computed on a single worker? It's possible the scheduler is smart enough to keep the data on the same node anyway.

@guillaumeeb
Copy link
Member Author

@djhoese you can specify a worker name from client.compute (http://distributed.dask.org/en/latest/api.html#distributed.Client.compute), but I'm not sure resources can be used as a kwarg. Feel free to ask a question in distributed tracker or on Stack Overflow.

@guillaumeeb
Copy link
Member Author

As per the OP, the resources kwarg solution, seems to have some issue yet. See #230 or dask/distributed#1851.

You cannot use adapt() or scale after tasks submission.

@lesteve lesteve added the sprint A good issue to tackle during a sprint label May 24, 2019
@lesteve lesteve changed the title Document how to use book mutliple cores for a single task Document how to use book multiple cores for a single task May 29, 2019
@lesteve lesteve added the documentation Documentation-related label Dec 1, 2019
@lesteve lesteve added this to the 0.8 milestone Dec 6, 2019
@guillaumeeb guillaumeeb modified the milestones: 0.8, 0.8.1 Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation-related sprint A good issue to tackle during a sprint
Projects
None yet
Development

No branches or pull requests

3 participants