Minor bug in extended_path.m
A parfor loop contains the line (211):
[results{k}(:,t), info_convergence] = extended_path_core(ep.periods,endo_nbr,exo_nbr,positive_var_indx, ...
Later, info_convergence
is used outside of the parfor loop (line 236).
MLint detects this as a critical bug, though I expect it hadn't been hit as people had run with verbosity off.
The fix is to make info_convergence
a reduction variable. (Outside the loop info_convergence = 1
, inside the loop [results{k}(:,t), tmp_info_convergence] = extended_path_core(ep.periods,endo_nbr,exo_nbr,positive_var_indx, ...
and then info_convergence = min( tmp_info_convergence, info_convergence );
.)