0
I have a code with a parfor
simple in Matlab that calls the Workers.
parfor valor= 1:fim
[output, out] = Computacao(dado1, dado2, int32(valor));
end
within the function that is called have an if for a condition in which if found an error it should stop, but wanted only one worker to stop for the value = 3 for example, and all others would be computed normally.
I tried it this way:
if or(((aaa+4/3*sss)./ddd) < 0, mu < 0)
problemaaa = 1;
fprintf('PROBLEM FOUND');
error('deuruim');
end
But when it finds the error it does not just for the calculation of the index with error, for all computations in progress. There is a way for me to kill only the worker of that index who found the error and continue normally?