Read The Data

library(Rhpc)
library(RhpcBLASctl)
Rhpc_initialize()

# use only phisical cores
cl<-Rhpc_getHandle(get_num_cores()-1)

# set affinity (HT disabled and single node)
cpus<-0:(get_num_cores()-1)
pids<-c(Sys.getpid(),unlist(Rhpc_worker_call(cl,Sys.getpid)))
lapply(paste0("taskset -p -c ", cpus, " ", pids),system)

# read RDA
onloadRDA<-function(){assign("M", readRDS("boofoo.rda"), envir=.GlobalEnv)}
Rhpc_worker_noback(cl, onloadRDA ) # read RDA on worker, nowait return
onloadRDA()                        # read RDA on master
# maybe rda file on file cache. it was good job...

# calc
f <- function()colSums(M)
result<-Rhpc_worker_call(cl,f)

# diet memory. if you want to ...
Rhpc_EvalQ(cl, gc())

Rhpc_finalize()
[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]ReadTheData.R2016-01-13 19:27 699