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

extended pmap with kw args #3715

Merged
merged 2 commits into from
Jul 18, 2013
Merged

extended pmap with kw args #3715

merged 2 commits into from
Jul 18, 2013

Conversation

amitmurthy
Copy link
Contributor

on_err_retry , default true, specifies if pmap should retry a failed task on a different worker.

on_err_stop , default false, specifies if pmap should not execute any pending tasks in case of an exception an any currently running tasks.

Default values mimic current behavior.

runtests.jl has been updated to stop on the first error.

@mlubin
Copy link
Member

mlubin commented Jul 14, 2013

Great addition. Could you update the docs?

@ViralBShah
Copy link
Member

We need better names though. Perhaps hold on the doc change until we can bikeshed this?

@StefanKarpinski
Copy link
Member

I'm a little confused about exactly what these mean – are they not always the opposite of each other? It seems like on_err_retry could just be called retry.

@mlubin
Copy link
Member

mlubin commented Jul 14, 2013

Well it's possible that one could want to not stop on errors and also not retry failed tasks.

@StefanKarpinski
Copy link
Member

So the reasonable options in the presence of failures are:

  1. stop and fail immediately,
  2. retry failed jobs (don't stop),
  3. don't retry but keep going, returning incomplete results.

np = nprocs()
n = length(lsts[1])
results = cell(n)
queue = [1:n]
i = 1
errors = Set()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using a bool flag here did not work, hence the Set object.

@amitmurthy
Copy link
Contributor Author

stop and fail immediately, - if on_err_stop = true, value of on_err_retry should be ignored

retry failed jobs - on_err_retry should be true AND on_err_stop should be false

don't retry but keep going, returning incomplete results. - on_err_retry is false, on_err_stop is false - results will have exception objects at the failed indexes

Will update the pull request.

Also, I think the names are OK. A bit long but clear.

@amitmurthy
Copy link
Contributor Author

Updated.

Renamed to err_retry and err_stop

@amitmurthy
Copy link
Contributor Author

Bump.

Are the revised names acceptable? Anything else needs to be done?

JeffBezanson added a commit that referenced this pull request Jul 18, 2013
@JeffBezanson JeffBezanson merged commit 7ad72b7 into JuliaLang:master Jul 18, 2013
@JeffBezanson
Copy link
Member

Do you think we should change the behavior of remotecall_fetch etc. returning exception objects, and instead have them throw an exception if an error happened on the remote end?

@amitmurthy
Copy link
Contributor Author

I suggest leaving it as is. When people start doing massively parallel stuff, they usually would like to be tolerant of a few requests failing. For example, a Google like distributed query on a web index.

@amitmurthy amitmurthy deleted the amitm/pmap branch July 19, 2013 10:42
Keno pushed a commit that referenced this pull request Dec 21, 2023
Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 85f1e5564
New commit: 3c86ba27e
Julia version: 1.11.0-DEV
Pkg version: 1.11.0
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@85f1e55...3c86ba2

```
$ git log --oneline 85f1e5564..3c86ba27e
3c86ba27e add `add --weak/extra Foo` to add to [weakdeps] or [extras] (#3708)
2e640f92f respect --color=no in Pkg.precompile (#3740)
cbd5d08ad Automatically add compat entries when adding deps to a package (#3732)
03de920b3 rm old manual handling of `--compiled-modules` (#3738)
314d5497b Use realpaths for temp dirs during tests. Fix SparseArrays `why` breakage (#3734)
a6531d4be environments.md: update Julia version (#3715)
a509bc062 Revise the API of is_manifest_current. (#3701)
60b7b7995 rm incorrect kwargs in add docstring (#3733)
```

Co-authored-by: Dilum Aluthge <[email protected]>
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.

5 participants