Comments (1)
Here's a more reproducible example
Without BiocParallel
g = function() stop("stopping in 'g'")
f = function(i) if (i == 2) g()
lapply(1:4, f)
traceback()
## 4: stop("stopping in 'g'") at #1
## 3: g() at #1
## 2: FUN(X[[i]], ...)
## 1: lapply(1:4, f)
With BiocParallel, traceback()
initially points to the failed iteration on the manager.
bplapply(1:4, f, BPPARAM = SnowParam())
traceback()
## 4: stop(.error_bplist(res)) at bpinit.R#54
## 3: .bpinit(manager = manager, X = X, FUN = FUN, ARGS = ARGS, BPPARAM = BPPARAM,
## BPOPTIONS = BPOPTIONS, BPREDO = BPREDO) at bplapply-methods.R#57
## 2: bplapply(1:4, f, BPPARAM = SnowParam()) at AllGenerics.R#2
## 1: bplapply(1:4, f, BPPARAM = SnowParam())
Using bptry()
gets us the results from the worker, but it's long, complicated, in the reverse order (deepest call is last, instead of first) and uninformative because it doesn't go deeper than a tryCatch()
executed at the top level of each function call (to capture remote errors and to allow for bpstopOnError
).
result <- bptry(bplapply(1:4, f, BPPARAM = SnowParam()))
length(attr(result[[2]], "traceback"))
## [1] 45
attr(result[[2]], "traceback") |> tail(6) |> cat(sep = "\n")
## 4: tryCatch({
## FUN(...)
## }, error = handle_error)
## 3: tryCatchList(expr, classes, parentenv, handlers)
## 2: tryCatchOne(expr, names, parentenv, handlers[[1L]])
## 1: value[[3L]](cond)
Running the same command under MulticoreParam gets a long traceback (60 calls deep) but no more information. Running under SerialParam is no more informative.
I think the code here
Line 199 in 43d8b2c
withCallingHandlers()
rather than tryCatch()
, only the call stack on the worker is reported (by trimming the stack to things below the call), and in the same order as the base traceback() (by reversing the output of sys.calls()
at Line 178 in 43d8b2c
from biocparallel.
Related Issues (20)
- Error in serialize(data, node$con, xdr = FALSE) : ignoring SIGPIPE signal HOT 5
- Performance (speed) degradation in MulticoreParam with default force.G = TRUE HOT 3
- Nested parallellization question HOT 6
- stop.on.error = FALSE for DoParam doesn't work as expected HOT 2
- Troubles with bplapply within function (using SnowParam on Windows) HOT 6
- MulticoreParam bplapply unable to restart upon interrupt HOT 1
- The running time isn't reduced when using bplapply()? HOT 3
- BiocParallel errors HOT 4
- Handle worker abort better HOT 1
- move Rmpi to Enhances: HOT 1
- "foreach" %in% loadedNamespaces() instead of "package:foreach" %in% search()? HOT 1
- BiocParallel errors:could not find function ".OLD_read_block" HOT 11
- I meet a error when I use BiocParallel HOT 6
- BiocParallel : long vectors are not supported in .C() HOT 5
- BiocParallel for parallelization in BEER: Error and GPU Compatibility HOT 8
- BatchtoolsParam fails to propagate errors in bpiterate HOT 2
- Extremely minor: typo in docs? man/MulticoreParam-class.Rd HOT 1
- BiocParallel socketConnection error HOT 5
- strategy of tasks in MulticoreParam HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biocparallel.