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

ROBUSTNESS: Detect when forked process terminates #112

Open
HenrikBengtsson opened this issue Mar 5, 2020 · 0 comments
Open

ROBUSTNESS: Detect when forked process terminates #112

HenrikBengtsson opened this issue Mar 5, 2020 · 0 comments

Comments

@HenrikBengtsson
Copy link
Contributor

Related to Issue #111, I'd like to suggest that you add a layer that detects when a forked process dies, which results in no results for parallel::mccollect(), and give an informative error message.

Example of the problem:

> library(BiocParallel)
> bplapply(1:2, FUN = function(x) quit("no"), BPPARAM = MulticoreParam(2L))
Error in result[[njob]] <- value : 
  attempt to select less than one element in OneIndex
2: In parallel::mccollect(wait = FALSE, timeout = 1) :
  1 parallel job did not deliver a result

I do this in the future framework, where you get an error like:

> library(future) 
> plan(multicore)
> f <- future(quit("no"))
> value(f)
Error: Failed to retrieve the result of MulticoreFuture (<none>) from the forked worker (on localhost; PID 17097). Post-mortem diagnostic: No process exists with this PID, i.e. the forked localhost worker is no longer alive.
In addition: Warning message:
In mccollect(jobs = jobs, wait = TRUE) :
  1 parallel job did not deliver a result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants