Included check for existence of structure of Global variables

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2691 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
ratto 2009-05-27 06:48:07 +00:00
parent 490fc6a900
commit 7c07a0dab5
1 changed files with 8 additions and 1 deletions

View File

@ -25,8 +25,13 @@ fInputVar.DyMo=DyMo;
[tempo, MasterName]=system('hostname');
MasterName=MasterName(1:end-1);
fInputVar.MasterName = MasterName;
save([fname,'_input.mat'],'fInputVar','fGlobalVar')
if exist('fGlobalVar'),
save([fname,'_input.mat'],'fInputVar','fGlobalVar')
else
save([fname,'_input.mat'],'fInputVar')
end
save([fname,'_input.mat'],'Parallel','-append')
for j=1:length(Parallel),
nCPU(j)=length(Parallel(j).NumCPU);
totCPU=totCPU+nCPU(j);
@ -210,8 +215,10 @@ end
break
end
end
delete([fname,'_input.mat'])
for j=1:totCPU,
load([fname,'_output_',int2str(j),'.mat'],'fOutputVar');
delete([fname,'_output_',int2str(j),'.mat']);
fOutVar(j)=fOutputVar;