MATLAB: Does the MATLABPOOL function return an intermittent error in Parallel Computing Toolbox 4.3 (R2010a)

Parallel Computing Toolbox

I use the MATLABPOOL command as shown below:
matlabpool
or
matlabpool(2)
My computer has 2 cores. I am not sure why sometimes the above commands work and sometimes do not. When the command works fine, I am able to ue the MATLABPOOL function as expected, but, when it fails I receive the error below:
Starting matlabpool using the 'local' configuration ... stopped.
??? Error using ==> matlabpool at 127
The interactive parallel job finished without any messages.

Best Answer

You should ensure to close the MATLABPOOL using the following commands everytime that you use distribute the job to multiple cores. Not following this step will cause an unexpected behavior in outputs while using the MATLABPOOL function in MATLAB. The commands can be one of the syntax as per your use case:
matlabpool close
matlabpool close force
matlabpool close force configname
You can find more information about the description of each syntax at the following link:
<http://www.mathworks.com/help/releases/R2010a/toolbox/distcomp/matlabpool.html>