Skip to content
Snippets Groups Projects
Verified Commit 25a80d01 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix bug introduced in 5670d393

The “solve1” function does not return an “errorcode” output argument in 5.x.
parent 1e45917a
No related branches found
No related tags found
No related merge requests found
Pipeline #7234 passed
...@@ -317,13 +317,12 @@ elseif ismember(options.solve_algo, [2, 12, 4]) ...@@ -317,13 +317,12 @@ elseif ismember(options.solve_algo, [2, 12, 4])
[fval_check, fjac] = feval(f, x, args{:}); [fval_check, fjac] = feval(f, x, args{:});
if norm(fval_check(j1(j))) < tolf if norm(fval_check(j1(j))) < tolf
errorflag = false; errorflag = false;
errorcode = 0;
continue continue
end end
end end
if blockcolumns>=blocklength if blockcolumns>=blocklength
%(under-)determined block %(under-)determined block
[x, errorflag, errorcode] = solver(f, x, j1(j), j2(j), jacobian_flag, ... [x, errorflag] = solver(f, x, j1(j), j2(j), jacobian_flag, ...
options.gstep, ... options.gstep, ...
tolf, options.solve_tolx, maxit, ... tolf, options.solve_tolx, maxit, ...
options.debug, args{:}); options.debug, args{:});
...@@ -332,7 +331,6 @@ elseif ismember(options.solve_algo, [2, 12, 4]) ...@@ -332,7 +331,6 @@ elseif ismember(options.solve_algo, [2, 12, 4])
fprintf('\nDYNARE_SOLVE (solve_algo=2|4|12): the Dulmage-Mendelsohn decomposition returned a non-square block. This means that the Jacobian is singular. You may want to try another value for solve_algo.\n') fprintf('\nDYNARE_SOLVE (solve_algo=2|4|12): the Dulmage-Mendelsohn decomposition returned a non-square block. This means that the Jacobian is singular. You may want to try another value for solve_algo.\n')
%overdetermined block %overdetermined block
errorflag = true; errorflag = true;
errorcode = 0;
end end
if errorflag if errorflag
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment