Warning: Error occurred while evaluating listener callback. (problem with parfor?)
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I get the following error randomly sometimes after my MATLAB program hangs and I press ctrl-c. I'm not using any object oriented code myself, though I do use 3rd party libraries that might (they also use mex files if that matters).
It uses some fairly long-running loops and so is not very easy to test -- usually the problem does not occur; maybe if I knew a bit more about the message I could come up with a test case. Here is the error:
??? Warning: Error occurred while evaluating listener callback. > In dataToFluxFixMulti at 14 In yeastAnalysis at 163 In yeastResults at 37 ??? Error using ==> parallel_function at 598
Error in ==> dataToFluxFixMulti at 14 parfor i = 1:nReps
Error in ==> yeastAnalysis at 163 [v_fix, ~, v_fix_s, ~] = dataToFluxFixMulti( ...
Error in ==> yeastResults at 37
If it helps, here is the rather short function that has the parfor loop:
function [v_sol, lIter, v_sol_s, lIter_s] = ...
dataToFluxFixMulti(m, r, r_sd, nReps)
% This is like dataToFlux, but returns a mean and std
% for v_sol and lIter, and saves the flux distributions.
nRxns = length(m.rxns);
v_sol_Dist = zeros(nReps, nRxns);
lIter_Dist = zeros(nReps, nRxns);
timeInit = num2str(now());
parfor i = 1:nReps
[v_sol, lIter] = dataToFluxFix(m, r, r_sd);
v_sol_Dist(i, :) = columnVector(v_sol)';
lIter_Dist(i) = lIter;
end
v_sol = mean(v_sol_Dist)';
lIter = mean(lIter_Dist);
v_sol_s = std(v_sol_Dist)';
lIter_s = std(lIter_Dist);
fileNameOut = ['dataToFlux_' num2str(nReps) '_' timeInit '.mat'];
save(fileNameOut, 'v_sol', 'v_sol_s', 'v_sol_Dist', ...
'lIter', 'lIter_s', 'lIter_Dist');
1 comentario
Benoit Pasquier
el 12 de Mayo de 2014
I have a very similar issue but it does not happen randomly, but always...
Respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!