concepts of parallel computing in statistics and machine learning toolbox
subtleties in parallel computing
there are two main subtleties in parallel computations:
nested parallel evaluations (see no nested parfor loops). only the outermost
parfor
loop runs in parallel, the others run serially.reproducible results when using random numbers (see reproducibility in parallel statistical computations). how can you get exactly the same results when repeatedly running a parallel computation that uses random numbers?
vocabulary for parallel computation
worker — an independent matlab® session that runs code distributed by the client.
client — the matlab session with which you interact, and that distributes jobs to workers.
parfor
— a parallel computing toolbox™ function that distributes independent code segments to workers (see working with parfor).random stream — a pseudorandom number generator, and the sequence of values it generates. matlab implements random streams with the class.
reproducible computation — a computation that can be exactly replicated, even in the presence of random numbers (see reproducibility in parallel statistical computations).