Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Pfeifer
dynare
Commits
09bc0a0a
Commit
09bc0a0a
authored
12 years ago
by
Marco Ratto
Browse files
Options
Downloads
Patches
Plain Diff
fixed bug with seeds in hybrid matlab-octave parallel clusters
parent
fe0054f3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
matlab/global_initialization.m
+1
-0
1 addition, 0 deletions
matlab/global_initialization.m
matlab/parallel/InitializeComputationalEnvironment.m
+8
-0
8 additions, 0 deletions
matlab/parallel/InitializeComputationalEnvironment.m
matlab/set_dynare_seed.m
+1
-1
1 addition, 1 deletion
matlab/set_dynare_seed.m
with
10 additions
and
1 deletion
matlab/global_initialization.m
+
1
−
0
View file @
09bc0a0a
...
@@ -392,6 +392,7 @@ options_.mh_autocorrelation_function_size = 30;
...
@@ -392,6 +392,7 @@ options_.mh_autocorrelation_function_size = 30;
options_
.
plot_priors
=
1
;
options_
.
plot_priors
=
1
;
options_
.
cova_compute
=
1
;
options_
.
cova_compute
=
1
;
options_
.
parallel
=
0
;
options_
.
parallel
=
0
;
options_
.
parallel_info
.
isHybridMatlabOctave
=
false
;
options_
.
parallel_info
.
leaveSlaveOpen
=
0
;
options_
.
parallel_info
.
leaveSlaveOpen
=
0
;
options_
.
parallel_info
.
RemoteTmpFolder
=
''
;
options_
.
parallel_info
.
RemoteTmpFolder
=
''
;
options_
.
number_of_grid_points_for_kde
=
2
^
9
;
options_
.
number_of_grid_points_for_kde
=
2
^
9
;
...
...
This diff is collapsed.
Click to expand it.
matlab/parallel/InitializeComputationalEnvironment.m
+
8
−
0
View file @
09bc0a0a
...
@@ -45,6 +45,7 @@ end
...
@@ -45,6 +45,7 @@ end
global
options_
global
options_
isHybridMatlabOctave
=
false
;
for
j
=
1
:
length
(
options_
.
parallel
),
for
j
=
1
:
length
(
options_
.
parallel
),
if
isempty
(
options_
.
parallel
(
j
)
.
MatlabOctavePath
),
if
isempty
(
options_
.
parallel
(
j
)
.
MatlabOctavePath
),
if
exist
(
'OCTAVE_VERSION'
)
if
exist
(
'OCTAVE_VERSION'
)
...
@@ -57,6 +58,13 @@ for j=1:length(options_.parallel),
...
@@ -57,6 +58,13 @@ for j=1:length(options_.parallel),
dynareroot
=
strrep
(
which
(
'dynare'
),
'dynare.m'
,
''
);
dynareroot
=
strrep
(
which
(
'dynare'
),
'dynare.m'
,
''
);
options_
.
parallel
(
j
)
.
DynarePath
=
dynareroot
;
options_
.
parallel
(
j
)
.
DynarePath
=
dynareroot
;
end
end
isHybridMatlabOctave
=
isHybridMatlabOctave
||
any
(
regexpi
([
options_
.
parallel
(
j
)
.
MatlabOctavePath
],
'octave'
));
end
isHybridMatlabOctave
=
isHybridMatlabOctave
&&
~
exist
(
'OCTAVE_VERSION'
);
options_
.
parallel_info
.
isHybridMatlabOctave
=
isHybridMatlabOctave
;
if
isHybridMatlabOctave
,
% Reset dynare random generator and seed.
set_dynare_seed
(
'default'
);
end
end
...
...
This diff is collapsed.
Click to expand it.
matlab/set_dynare_seed.m
+
1
−
1
View file @
09bc0a0a
...
@@ -24,7 +24,7 @@ if ~nargin
...
@@ -24,7 +24,7 @@ if ~nargin
error
(
'set_dynare_seed:: I need at least one input argument!'
)
error
(
'set_dynare_seed:: I need at least one input argument!'
)
end
end
matlab_random_streams
=
~
(
exist
(
'OCTAVE_VERSION'
)
||
matlab_ver_less_than
(
'7.7'
));
matlab_random_streams
=
~
(
exist
(
'OCTAVE_VERSION'
)
||
matlab_ver_less_than
(
'7.7'
)
||
options_
.
parallel_info
.
isHybridMatlabOctave
);
if
matlab_random_streams
% Use new matlab interface.
if
matlab_random_streams
% Use new matlab interface.
if
nargin
==
1
if
nargin
==
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment