The following code:
matlabpool('open','local',2)
parfor i=1:5
proc = System.Diagnostics.Process;
end
results in an error:
Error: MATLAB cannot determine whether "System" refers to a function or variable.
However, when I execute the parfor loop again (after the error), it runs through! I found a couple of similar questions, but I wasn't able to implement the suggested solutions.
MATLAB parfor - cannot determine whether "ModelUtil" refers to a function or variable?
MATLAB using parfor (parallel computing toolbox) and custom packages with +
I can't wrap my mind around why the loop runs the second time. If I then call
matlabpool close
and execute the whole script again, the error appears once again. So it only happens the first time after the pool was initiated. Any ideas?