Warning: Error occurred while evaluating listener callback. (problem with parfor?)
조회 수: 4 (최근 30일)
이전 댓글 표시
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
Benoit Pasquier
2014년 5월 12일
I have a very similar issue but it does not happen randomly, but always...
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!