MATLAB: Parfor command missing some iterations during execuation

matlabpoolparfor

Dear all, I am having problem with my code in which parfor command is missing some iterations. The parfor code is hereunder
parfor fit_loop = 1 : Pop_size
system(['$eclipse ' 'MainFile30x30x3(' int2str(fit_loop) ')'])
end
In this loop I am using 6 cores of i7 laptop. I am using eclipse reservoir simulator for running MainFile30x30x3 file with iteration number. In this way all of the iterations are independent. The software running few iterations in parallel but missing some iterations in between and the error occur
'The process cannot access the file because it is being used by another process'
If somebody have any idea about this so do share with me.
Thanks

Best Answer

This means, that one of the files is in use already. If the eclipse function would create a useful error message, you could even see, which file it is. Perhaps a former run did not close the file correctly? Or eclipse writes to a logfile in addition?
Related Question