JuliaLang / JuliaLang/Distributed.jl
Decision: Use of `asyncmap` in pmap batch mode
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 55
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
pmap in batch mode uses a local asyncmap to process a batch - https://github.com/JuliaLang/julia/blob/9e3318c9840e7a9e387582ba861408cefe5a4f75/base/distributed/pmap.jl#L198
Considering that each computation in pmap is fairly large, and batch sizes small, an asyncmap would not have a major overhead and if the computation involves IO, quite beneficial.
For example, if the input is a list of file names to be processed, it is efficient to interleave I/O and computation and hence a local asyncmap is a better fit.
This issue is to take a decision whether to
-
Keep it as it is, i.e., no change - the batch is processed using
asyncmap -
Change it to a local map. If the computation involves I/O the caller would have to explicitly partition the input and the mapping function in turn would need to perform an
asyncmapand a flatten on the final output. -
Add another keyword arg to pmap,
batch_function=map. To useasyncmap, the caller would need to explicitly specifybatch_function=asyncmap. A user defined function (for example one that uses@threads) can also be specified.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the batch-mode implementation in base/distributed/pmap.jl around line 198 and review how its local asyncmap is used. Compare the three alternatives in the issue, including their I/O and caller implications. Done means a choice is documented clearly, with any resulting pmap change identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100