1

I would like to know if there is a way to monitorize a process using parLapply (parallel) like pblapply does. Here is just a simple code to try it:

library(parallel)
library(pbapply)

f <- function (x) {return <- (x^2)^2}
f.list <- list(50000000:200000000)

# pblapply
f1 <-pblapply(f.list,f)

# parLapply - Usable in linux and windows (slower in windows)
no_cores <- detectCores() - 1 # Calculate the number of cores
cl <- makeCluster(no_cores, type="SOCK") # Initiate cluster
f2 <- parLapply(cl, f.list, f)
stopCluster(cl)

I'm trying to implement a process over a huge list in Linux (using parallel) and I don't know how to see easily the status like pblapply does.

M--
  • 25,431
  • 8
  • 61
  • 93

0 Answers0