Run jobs asynchronously with BiocParellel
1
0
Entering edit mode
Qiang ▴ 80
@qiang-9580
Last seen 3.9 years ago

Hi,

Is it possible to run bplapply in the background to computing nodes (by batchtools) instead of blocking the R session?

I saw a related discussion about running a parallel job with the future.batchtools package. https://github.com/Bioconductor/BiocParallel/issues/64

This feature is what exactly I wished.

## submit job to nodes
f <- plan({ bplapply expr })
## check finshed or not
resolved(f)
## collect the results
v <- value(f)

Thanks, Qiang

BiocParallel future batchtools • 1.0k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

No, there are no plans to implement this functionality. A simple hack on non-Windows is

> res = mcparallel( bplapply(1:4, function(i) { Sys.sleep(i); i }) )
> 1 + 2
[1] 3
> str(mccollect(res))
List of 1
 $ 97731:List of 4
  ..$ : int 1
  ..$ : int 2
  ..$ : int 3
  ..$ : int 4
ADD COMMENT
0
Entering edit mode

Works perfectly. Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 798 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6