I am running a small script with parfort. The script starts with the following line:
parfor i=1:length(vX) fprintf('%d/%d\n',i,length(X)); ...
Therefore, apparently, I should immediately print printouts. When I start it with a pool of two workers opened by matlabpool(2) , I see a printout of no . When I close the workers while keeping the parfor loop, I see printouts, but only when I press ctrl-c. When I change parfor to regular for , I see the result. Note that I never saw the loop work to the end, as it is quite long, but the printout is the second line of the script and should happen immediately if there is no buffering problem that I do not know about in matlab. What's happening?
source share