Displaying 1 result from an estimated 1 matches for "testfnc".
Did you mean:
testfunc
2008 Nov 30
2
Snow and multi-processing
...onger than the computing time.
However, if I export the 500,000 object first across the spawned processes as in this mock script
cl <- makeCluster(nnodes,method)
mArrayData <- getData(experiments)
clusterExport(cl, 'mArrayData')
Results <- parLapply(cl, theMapList, function(x) t.testFnc(x))
With a function that define the mArrayData argument as a default parameter as in
t.testFnc <- function(probeList, array=mArrayData){
x <- array[probeList$A,]
y <- array[probeList$B,]
res <- doSomeTest(x,y)
return(res)
}
Using this strategy, I was able to gain ful...