inst/examples/test_parallel/01_mclapply_par.r

### This is a famous example from multicore package.
### One can source this file into R interactive model or run it by the command
### SHELL> Rscript --vanilla 01_mclapply_spmd.r

library(parallel)

system.time(
  ret <- unlist(mclapply(1:32, function(x) sum(rnorm(1e7))))
)
RBigData/pbdMPI documentation built on Jan. 31, 2024, 10:34 p.m.