Skip to content
Snippets Groups Projects
Verified Commit 67fc27ca authored by Willi Mutschler's avatar Willi Mutschler
Browse files

:bug: Fix bugs in parallel toolbox introduced in #47af0c

1. 'fGlobalVar' was misspelled
2. Removing the eval crashes the parallel option as global variables are not passed correctly. For instance in dyn_waitbar_close there is `global options_`, but this was not recognized leading to an error because options_.console_mode could not be accessed leading to a Dot indexing is not supported for variables of this type error.
parent fb18777e
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ function storeGlobalVars(fname,append) ...@@ -12,7 +12,7 @@ function storeGlobalVars(fname,append)
% None % None
% %
% %
% Copyright © 2009-2017 Dynare Team % Copyright © 2009-2023 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -34,7 +34,7 @@ GlobalNames = who('global'); ...@@ -34,7 +34,7 @@ GlobalNames = who('global');
for j=1:length(GlobalNames) for j=1:length(GlobalNames)
eval(['global ',GlobalNames{j},';']); eval(['global ',GlobalNames{j},';']);
fGlobalvar.(GlobalNames{j}) = GlobalNames{j}; eval(['fGlobalVar.',GlobalNames{j},'=',GlobalNames{j},';']); % do not remove eval, otherwise parallel crashes as global variables are not passed correctly (for some reason)
end end
if nargin<2 if nargin<2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment