MATLAB: When does it happens the data-copy, when executing a parallel job

data copyparallel computing

when I call a function that I want to run in parallel (for example, inside a parfor statement), and this function receives some data as inputs, are these data copied to each (RAM-memory partition of the) worker just after calling the matlabpool open command, or each time, e.g., a parfor block is executed? Thank you in advance.

Best Answer

  • Normally data copies are broadcast each time a parfor block is executed, but this FEX file offers a way to make data persist from one parfor block to subsequent ones,