🐛 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. Because it originally was an assignment where the variable named options_ was assigned to fGlobalVar.options_, but after 47af0cdewe only assign the string 'options_' stored in GlobalNames{j}.
covariance-quadratic-approximation
Willi Mutschler 2023-12-20 18:21:59 +01:00
parent bc69f6a102
commit 5f1ae3bb19
No known key found for this signature in database
GPG Key ID: 91E724BF17A73F6D
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ function storeGlobalVars(fname,append)
% None
%
%
% Copyright © 2009-2017 Dynare Team
% Copyright © 2009-2023 Dynare Team
%
% This file is part of Dynare.
%
@ -34,7 +34,7 @@ GlobalNames = who('global');
for j=1:length(GlobalNames)
eval(['global ',GlobalNames{j},';']);
fGlobalvar.(GlobalNames{j}) = GlobalNames{j};
fGlobalVar.(GlobalNames{j}) = eval(GlobalNames{j});
end
if nargin<2