Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stéphane Adjemian
dynare
Commits
864fa25c
Verified
Commit
864fa25c
authored
Oct 25, 2021
by
Sébastien Villemot
Browse files
Options
Downloads
Plain Diff
Merge branch 'k_order_test' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1950
parents
e155c5cb
485c815f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/k_order_perturbation/burnside_k_order.mod
+12
-2
12 additions, 2 deletions
tests/k_order_perturbation/burnside_k_order.mod
with
12 additions
and
2 deletions
tests/k_order_perturbation/burnside_k_order.mod
+
12
−
2
View file @
864fa25c
...
...
@@ -140,8 +140,16 @@ dr = oo_.dr;
vcov = M_.Sigma_e;
seed = options_.DynareRandomStreams;
tStart1 = tic; fortran_endo_simul = k_order_simul(order, nstat, npred, nboth, nfwrd, nexog, ystart, ex_, ysteady, dr); tElapsed1 = toc(tStart1);
tStart2 = tic; dynare_endo_simul = dynare_simul_(order, nstat, npred, nboth, nfwrd, nexog, ystart,ex_,vcov,seed, ysteady, dr); tElapsed2 = toc(tStart2);
%do 1 call to get k_order_simul into memory (dynare_simul_ was already called within stoch_simul)
fortran_endo_simul = k_order_simul(order, nstat, npred, nboth, nfwrd, nexog, ystart, ex_, ysteady, dr);
tElapsed=NaN(2,1000);
for ii=1:1000
tStart1 = tic; fortran_endo_simul = k_order_simul(order, nstat, npred, nboth, nfwrd, nexog, ystart, ex_, ysteady, dr); tElapsed(1,ii) = toc(tStart1);
tStart2 = tic; dynare_endo_simul = dynare_simul_(order, nstat, npred, nboth, nfwrd, nexog, ystart,ex_,vcov,seed, ysteady, dr); tElapsed(2,ii) = toc(tStart2);
end
if max(max(abs(oo_.endo_simul-fortran_endo_simul(oo_.dr.order_var,:)))) > 1e-10
error('Error in k_order_simul: inaccurate simulation');
...
...
@@ -151,6 +159,8 @@ if max(max(abs(dynare_endo_simul-fortran_endo_simul))) > 1e-10
error('Error in k_order_simul: inaccurate simulation');
end;
tElapsed1=mean(tElapsed(1,:))
tElapsed2=mean(tElapsed(2,:))
if tElapsed1<tElapsed2
skipline()
dprintf('k_order_simul is %5.2f times faster than dynare_simul_', tElapsed2/tElapsed1)
...
...
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