I have a code with a simple parfor
in matlab that calls the workers.
parfor valor= 1:fim
[output, out] = Computacao(dado1, dado2, int32(valor));
end
In the function that is called I have an if for a condition in which if I found an error it should stop, however I wanted it to stop only one worker for the value = 3 for example, and all others were computed normally. p>
I tried it as follows:
if or(((aaa+4/3*sss)./ddd) < 0, mu < 0)
problemaaa = 1;
fprintf('PROBLEM FOUND');
error('deuruim');
end
But when he finds the error he does not just calculate the index with error, for all computations in progress. Is there a way I can only kill the worker from that index that encountered the error and continue normally?