Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Johannes Pfeifer
dynare
Commits
6625ca41
Commit
6625ca41
authored
May 31, 2010
by
Marco Ratto
Browse files
Minor changes to header/commenting
parent
cbf9739d
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/independent_metropolis_hastings.m
View file @
6625ca41
...
...
@@ -19,6 +19,10 @@ function independent_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bou
% SPECIAL REQUIREMENTS
% None.
% PARALLEL CONTEXT
% See the comment in random_walk_metropolis_hastings.m funtion.
% Copyright (C) 2006-2008,2010 Dynare Team
%
% This file is part of Dynare.
...
...
@@ -48,6 +52,7 @@ InitSizeArray = min([repmat(MAX_nruns,nblck,1) fline+nruns-1],[],2);
load
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
],
'record'
);
%The mandatory variables for local/remote parallel computing are stored in localVars struct.
localVars
=
struct
(
'TargetFun'
,
TargetFun
,
...
'ProposalFun'
,
ProposalFun
,
...
...
...
@@ -67,13 +72,11 @@ localVars.InitSizeArray=InitSizeArray;
localVars
.
record
=
record
;
localVars
.
varargin
=
varargin
;
% tic,
% Like a sequential execution!
if
isnumeric
(
options_
.
parallel
),
fout
=
independent_metropolis_hastings_core
(
localVars
,
fblck
,
nblck
,
0
);
record
=
fout
.
record
;
% Parallel execution.
else
% global variables for parallel routines
globalVars
=
struct
(
'M_'
,
M_
,
...
...
...
@@ -109,9 +112,6 @@ end
irun
=
fout
(
1
)
.
irun
;
NewFile
=
fout
(
1
)
.
NewFile
;
% ComptationalTime=toc,
% record.Seeds.Normal = randn('state');
% record.Seeds.Unifor = rand('state');
save
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
],
'record'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment