the number of processors (might be smaller than cluster to assure that previous case i-useNCpus has been evaluated.)

freeMasterNode

if set to TRUE, no job is submitted to first node, so that this node can dispatch jobs without waiting

Author(s)

Thomas Wutzler

See Also

Examples

1
2
3
4
5
6
7
8
9
10
11
12
13
14

#sfInit(parallel=TRUE,cpus=2)# using as many cpus as rows in Z(Z<-matrix(letters[1:12],nrow=3))
F_APPLY <-function(x,z)paste(x,z,sep="");
F_ARGS <-function(i,prevRes){list(x=prevRes,z=Z[i])}.res0 <-rep("_",nrow(Z))# dependStep will be length of .res0
resSeq <-sfFArgsApplyDep(length(Z), F_ARGS, F_APPLY,.res0)(res <-matrix(sfSimplifyLBResult(resSeq),nrow=nrow(Z)))# Gives the same results as having one parallel call per column.# However, in this implementation, the finished nodes do not need to # wait for possibly slower finishing of other rows, and can tackle# already further columns.