### run with unix command ### ### nice -n 19 nohup R CMD BATCH --vanilla bar.R & ### ### after you start the job, it runs in background so you can ### log out and it keeps running library(multicore) library(rcdd) ### see rcdd package vignette, pages 8 and 16 set.seed(42) d <- 5 ksplit <- 8 nsplit <- 200 x <- NULL for (isplit in 1:ksplit) { xsplit <- matrix(rnorm(d * nsplit), ncol = d) xsplit <- qdq(d2q(1e6 * xsplit), rep(d2q(1e6), length(xsplit))) x <- rbind(x, xsplit) foo <- cbind(0, cbind(1, xsplit)) parallel(redundant(foo, representation = "V")) } out <- collect() sapply(out, function(foo) nrow(foo$output)) for (isplit in seq(1, length(out), by = 2)) { foo <- rbind(out[[isplit]]$output, out[[isplit + 1]]$output) parallel(redundant(foo, representation = "V")) } out <- collect() sapply(out, function(foo) nrow(foo$output)) for (isplit in seq(1, length(out), by = 2)) { foo <- rbind(out[[isplit]]$output, out[[isplit + 1]]$output) parallel(redundant(foo, representation = "V")) } out <- collect() sapply(out, function(foo) nrow(foo$output)) foo <- rbind(out[[1]]$output, out[[2]]$output) out <- redundant(foo, representation = "V") nrow(out$output)