> I'm new to the idea of parallel computing with matlab on a cluster. I > understand that using broadcast variables, like > > matlabpool 10 > bigd = loadBigData(); % loads a large matrix of class double > r = zeros(100,1); > parfor ii = 1:100, > r(ii) = doSomething(ii,bigd); > end > > causes a lot of extra network traffic. My first question is whether > the variable bigd is sent over the network 10 times (i.e. once per > lab) or 100 times (once per loop iteration).
Data broadcast into a PARFOR loop is sent over once per lab - however, even that is possibly more than ideal. You could for example use my Worker Object Wrapper