diff --git a/.gitignore b/.gitignore
index 1a4156923af106a7cb4c9c06aaa2dfd8e3630e00..903c28be3aa54a753cf905fe396bb61cd1425e12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,6 +58,12 @@ ylwrap
 !/doc/userguide/P_SchorfMod.pdf
 !/doc/userguide/P_ModStruct2.pdf
 !/doc/userguide/P_ShockModel2.pdf
+!/doc/parallel/AvenueParadigm.pdf
+!/doc/parallel/iVaNo_*.pdf
+!/doc/parallel/netbook_*.pdf
+!/doc/parallel/quest_*.pdf
+!/doc/parallel/RWMH_quest1_*.pdf
+!/doc/parallel/waitbars*.pdf
 
 # Preprocessor
 /preprocessor/dynare_m
diff --git a/configure.ac b/configure.ac
index 1ed100c70e4b3c1f746dbc8083b4792fd4aba43f..7d58b365d7073b6e043b2c114a58943859239909 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,6 +164,7 @@ AC_CONFIG_FILES([Makefile
                  doc/preprocessor/Makefile
                  doc/macroprocessor/Makefile
                  doc/userguide/Makefile
+                 doc/parallel/Makefile
                  tests/Makefile
                  matlab/dynare_version.m
                  windows/dynare-version.nsi
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 74ec71552073da0011a0853c81cb93a57a0531d4..b25c377ea173fa710054664f9678c7f1aba50f6d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = preprocessor macroprocessor userguide
+SUBDIRS = preprocessor macroprocessor userguide parallel
 
 PDF_TARGETS =
 
diff --git a/doc/parallel/AvenueParadigm.pdf b/doc/parallel/AvenueParadigm.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..939871e50d5c25088038aacb6e17c1200caea174
Binary files /dev/null and b/doc/parallel/AvenueParadigm.pdf differ
diff --git a/doc/parallel/Makefile.am b/doc/parallel/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..0b1ef771e7437c6145060947034aed1eaab73dd9
--- /dev/null
+++ b/doc/parallel/Makefile.am
@@ -0,0 +1,31 @@
+if HAVE_PDFLATEX
+if HAVE_BIBTEX
+pdf-local: parallel.pdf
+endif
+endif
+
+SRC = AvenueParadigm.pdf iVaNo_gain.pdf iVaNo_time_comp.pdf marco.bib					\
+	netbook_complete_comp.pdf netbook_complete_openclose.pdf										\
+	netbook_partial_comp.pdf netbook_partial_openclose.pdf parallel.tex					\
+	quest_complete_comp.pdf quest_complete_openclose.pdf quest_partial_comp.pdf	\
+	quest_partial_openclose.pdf RWMH_quest1_PriorsAndPosteriors1Comp.pdf				\
+	RWMH_quest1_PriorsAndPosteriors2Comp.pdf																		\
+	RWMH_quest1_PriorsAndPosteriors3Comp.pdf																		\
+	RWMH_quest1_PriorsAndPosteriors4Comp.pdf																		\
+	RWMH_quest1_PriorsAndPosteriors5Comp.pdf																		\
+	RWMH_quest1_PriorsAndPosteriors6Comp.pdf																		\
+	RWMH_quest1_PriorsAndPosteriors7Comp.pdf waitbars1.pdf waitbars2.pdf				\
+	waitbarsP.pdf
+
+EXTRA_DIST = $(SRC)
+
+parallel.pdf: $(SRC)
+	$(PDFLATEX) parallel
+	$(BIBTEX) parallel
+	$(PDFLATEX) parallel
+	$(PDFLATEX) parallel
+	$(PDFLATEX) parallel
+
+clean-local:
+	rm -f *.log *.aux *.toc *.blg *.bbl *.out
+	rm -f parallel.pdf
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors1Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors1Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..c9391397482558966664ea827673f6d67604f8d1
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors1Comp.pdf differ
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors2Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors2Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..3fe694d9fc26a79c6d135f561018e0f8f6dc31c2
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors2Comp.pdf differ
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors3Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors3Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..f52d3fd0fc36fa2fa2a23fc806cbc36d679f9d8e
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors3Comp.pdf differ
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors4Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors4Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..f502f3af28e762919bf4796b1e2e2821fc12afef
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors4Comp.pdf differ
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors5Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors5Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..46052c50f64a4079a926d43945e56e2da73afecb
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors5Comp.pdf differ
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors6Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors6Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7021acff5104f62926d44ac88b9d5e4bf21dd783
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors6Comp.pdf differ
diff --git a/doc/parallel/RWMH_quest1_PriorsAndPosteriors7Comp.pdf b/doc/parallel/RWMH_quest1_PriorsAndPosteriors7Comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7855dfd4a29b72a9aa7c972fdf408a9ae2eb6e8d
Binary files /dev/null and b/doc/parallel/RWMH_quest1_PriorsAndPosteriors7Comp.pdf differ
diff --git a/doc/parallel/iVaNo_gain.pdf b/doc/parallel/iVaNo_gain.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..9dffcd5659926c6fc4af4e4e42137139c9a638d7
Binary files /dev/null and b/doc/parallel/iVaNo_gain.pdf differ
diff --git a/doc/parallel/iVaNo_time_comp.pdf b/doc/parallel/iVaNo_time_comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..60c9abbf2d758dd1744fb69bc0b5100b0b3422cf
Binary files /dev/null and b/doc/parallel/iVaNo_time_comp.pdf differ
diff --git a/doc/parallel/marco.bib b/doc/parallel/marco.bib
new file mode 100644
index 0000000000000000000000000000000000000000..8531a2ff49a5c29ae84e582f038d411126e9eb83
--- /dev/null
+++ b/doc/parallel/marco.bib
@@ -0,0 +1,2492 @@
+% This file was created with JabRef 2.5.
+% Encoding: Cp1252
+
+@TECHREPORT{SIMLAB,
+  author = { \textsc{SIMLAB} },
+  title = { Ver 2.2},
+  institution = {European Commission, Joint Research Centre},
+  year = {2003},
+  type = { {http://www.jrc.cec.eu.int/uasa/prj-sa-soft.asp} },
+  address = {Ispra}
+}
+
+@TECHREPORT{Adolfson2005,
+  author = {Adolfson, Malin and Las�en, Stefan and Lind�, Jesper and Villani,
+	Mattias},
+  title = {Bayesian Estimation of an Open Economy {DSGE} Model with Incomplete
+	Pass-Through},
+  institution = {Sveriges Riksbank (Central Bank of Sweden)},
+  year = {2005},
+  type = {Working Paper Series},
+  number = {179},
+  month = Mar,
+  note = {available at http://ideas.repec.org/p/hhs/rbnkwp/0179.html}
+}
+
+@TECHREPORT{ACEL2005,
+  author = {David Altig and Lawrence Christiano and Martin Eichenbaum and Jesper
+	Linde},
+  title = {Firm-Specific Capital, Nominal Rigidities and the Business Cycle},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2005},
+  type = {NBER Working Papers},
+  number = {11034},
+  month = Jan,
+  note = {available at http://ideas.repec.org/p/nbr/nberwo/11034.html}
+}
+
+@UNPUBLISHED{An2005,
+  author = {An, A.},
+  title = {Bayesian Estimation of {DSGE} Models: Lessons from Second Order Approximations},
+  year = {2005},
+  source = {University of Pennsylvania}
+}
+
+@ARTICLE{AnSchorfheide2007,
+  author = {An, Sungbae and Schorfheide, Frank},
+  title = {Bayesian Analysis of {DSGE} Models},
+  journal = {Econometric Reviews},
+  year = {2007},
+  volume = {26},
+  pages = {113-172},
+  number = {2-4},
+  note = {DOI:10.1080/07474930701220071}
+}
+
+@TECHREPORT{AnSchorfheide2005,
+  author = {An, Sungbae and Schorfheide, Frank},
+  title = {Bayesian Analysis of {DSGE} Models},
+  institution = {C.E.P.R. Discussion Papers},
+  year = {2005},
+  type = {CEPR Discussion Papers},
+  number = {5207},
+  month = Sep,
+  note = {available at http://ideas.repec.org/p/cpr/ceprdp/5207.html}
+}
+
+@ARTICLE{Anderson2008,
+  author = {Gary Anderson},
+  title = {Solving Linear Rational Expectations Models: A Horse Race},
+  journal = {Computational Economics},
+  year = {2008},
+  volume = {31},
+  pages = {95-113},
+  number = {2},
+  month = {March},
+  abstract = {No abstract is available for this item.},
+  url = {http://ideas.repec.org/a/kap/compec/v31y2008i2p95-113.html}
+}
+
+@ARTICLE{AIM1985,
+  author = {Anderson, Gary and Moore, George},
+  title = {A linear algebraic procedure for solving linear perfect foresight
+	models},
+  journal = {Economics Letters},
+  year = {1985},
+  volume = {17},
+  pages = {247-252},
+  number = {3},
+  note = {available at http://ideas.repec.org/a/eee/ecolet/v17y1985i3p247-252.html}
+}
+
+@ARTICLE{KleinMelardZahaf2000,
+  author = {Andre Klein, Guy Melard and Toufik Zahaf},
+  title = {Construction of the exact Fisher information matrix of Gaussian time
+	series models by means of matrix differential rules},
+  journal = {Linear Algebra and its Applications},
+  year = {2000},
+  volume = {321},
+  pages = {209-232},
+  number = {1-3},
+  month = {December},
+  source = {http://www.sciencedirect.com/science/article/B6V0R-41V8JCT-H/2/007e48ff9a7d27171a39e42145f93266}
+}
+
+@ARTICLE{Aruoba_et_al_2006,
+  author = {Aruoba, S. Boragan and Fernandez-Villaverde, Jesus and Rubio-Ramirez,
+	Juan F.},
+  title = {Comparing solution methods for dynamic equilibrium economies},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2006},
+  volume = {30},
+  pages = {2477-2508},
+  number = {12},
+  month = {December},
+  note = {available at http://ideas.repec.org/a/eee/dyncon/v30y2006i12p2477-2508.html}
+}
+
+@TECHREPORT{Aruoba2003,
+  author = {S. Boragan Aruoba and Jesus Fernandez-Villaverde and Juan F. Rubio-Ramirez},
+  title = {Comparing Solution Methods for Dynamic Equilibrium Economies},
+  institution = {Penn Institute for Economic Research, Department of Economics, University
+	of Pennsylvania},
+  year = {2003},
+  type = {PIER Working Paper Archive},
+  number = {04-003},
+  month = Nov,
+  note = {available at http://ideas.repec.org/p/pen/papers/04-003.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@CONFERENCE{Azzini_etal_DYNARE_2007,
+  author =       {Azzini, I. and Girardi, R. and Ratto, M.},
+  title =        {Parallelization of {Matlab} codes under {Windows} platform for {Bayesian} estimation: A {DYNARE} application},
+  booktitle =    {DYNARE CONFERENCE},
+  year =         {2007},
+  address =      {Paris School of Economics},
+  month =        {September},
+}
+
+@BOOK{Barney_2009,
+  AUTHOR =       {Barney, B},
+  TITLE =        {Introducing To Parallel Computing (Tutorial)},
+  PUBLISHER =    {Lawrence Livermore National Laboratory},
+  YEAR =         {2009}
+}
+
+
+@ARTICLE{BekkerPollock1986,
+  author = {Bekker, Paul A. and Pollock, D. S. G.},
+  title = {Identification of linear stochastic models with covariance restrictions},
+  journal = {Journal of Econometrics},
+  year = {1986},
+  volume = {31},
+  pages = {179-208},
+  number = {2},
+  month = {March},
+  note = {available at http://ideas.repec.org/a/eee/econom/v31y1986i2p179-208.html}
+}
+
+@BOOK{BelsleyKuhWelsch1980,
+  title = {Regression Diagnostics - Identifying Influential Data and Sources
+	of Variation},
+  publisher = {New York: Wiley},
+  year = {1980},
+  author = {D.A. Belsley and E. Kuh and R.E. Welsch}
+}
+
+@ARTICLE{Benhabib2003,
+  author = {Benhabib, J. and Schmitt-Grohe, S. and Uribe, M.},
+  title = {Backward-Looking Interest-Rate Rules, Interest-Rate Smoothing, And
+	Macroeconomic Instability},
+  journal = {Journal of Money, Credit and Banking},
+  year = {2003},
+  volume = {35},
+  pages = {1379-1412}
+}
+
+@TECHREPORT{BayerFarmer2004,
+  author = {Andreas Beyer and Roger E. A. Farmer},
+  title = {On the indeterminacy of New-Keynesian economics},
+  institution = {European Central Bank},
+  year = {2004},
+  type = {Working Paper Series},
+  number = {323},
+  month = Mar,
+  note = {available at http://ideas.repec.org/p/ecb/ecbwps/20040323.html}
+}
+
+@ARTICLE{Blanchard1980,
+  author = {Blanchard, O. and Kahn, C.},
+  title = {The solution of linear difference models under rational expectations},
+  journal = {Econometrica},
+  year = {1980},
+  volume = {48},
+  pages = {1305--1311},
+  keyword = {linear difference model}
+}
+
+@ARTICLE{BlanchardKahn1980,
+  author = {Blanchard, Olivier Jean and Kahn, Charles M},
+  title = {The Solution of Linear Difference Models under Rational Expectations},
+  journal = {Econometrica},
+  year = {1980},
+  volume = {48},
+  pages = {1305-11},
+  number = {5},
+  month = {July},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v48y1980i5p1305-11.html}
+}
+
+@TECHREPORT{BoivinGiannoni2006,
+  author = {Jean Boivin and Marc Giannoni},
+  title = {{DSGE} Models in a Data-Rich Environment},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2006},
+  type = {NBER Working Papers},
+  number = {12772},
+  month = Dec,
+  note = {available at http://ideas.repec.org/p/nbr/nberwo/12772.html}
+}
+
+@TECHREPORT{BoswijkDoornik2003,
+  author = {H. Peter Boswijk and Jurgen Doornik},
+  title = {Identifying, Estimating and Testing Restricted Cointegrated Systems:
+	An Overview},
+  institution = {Economics Group, Nuffield College, University of Oxford},
+  year = {2003},
+  type = {Economics Papers},
+  number = {2003-W10},
+  month = Jan,
+  note = {available at http://ideas.repec.org/p/nuf/econwp/0310.html}
+}
+
+@ARTICLE{Bratley93,
+  author = {Bratley, P. and Fox, H. and Niederreiter, H.},
+  title = {Implementaton and tests of low-discrepancy sequences},
+  journal = {ACM Trans. Model. Comput. Simulation},
+  year = {1993},
+  volume = {2},
+  pages = {195--213}
+}
+
+@BOOK{Brookshear,
+  AUTHOR =       {Brookshear, J.G. },
+  TITLE =        {Computer Science: An Overview},
+  PUBLISHER =    {Pearson},
+  YEAR =         {2009},
+  edition =      {10th},
+  note =         {http://www.aw-bc.com/brookshear/},
+  isbn =         {0-321-52403-9},
+}
+
+
+@INCOLLECTION{BrowningHansenHeckman1999,
+  author = {Browning, Martin and Hansen, Lars Peter and Heckman, James J.},
+  title = {Micro data and general equilibrium models},
+  booktitle = {Handbook of Macroeconomics},
+  editor = {J. B. Taylor and M. Woodford}
+}
+
+@BOOK{BrysonHo69,
+  title = {Applied Optimal Control},
+  publisher = {Blaisdel},
+  year = {1969},
+  author = {Bryson, A.E. and Ho, Y.C.}
+}
+
+@ARTICLE{Calvo1983,
+  author = {Calvo, Guillermo A.},
+  title = {Staggered prices in a utility-maximizing framework},
+  journal = {Journal of Monetary Economics},
+  year = {1983},
+  volume = {12},
+  pages = {383-398},
+  number = {3},
+  month = {September},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v12y1983i3p383-398.html}
+}
+
+@ARTICLE{Campolongoetal2006,
+  author = {Campolongo, F. and Cariboni, J. and Saltelli, A.},
+  title = {An effective screening design for sensitivity analysis of large models},
+  journal = {Environmental Modelling and Software},
+  year = {2006},
+  note = {To appear}
+}
+
+@INBOOK{Canova2005,
+  chapter = {What {VAR} Tell us about {DSGE} Models?},
+  pages = {89-123},
+  title = {New Trends in Macroeconomics },
+  publisher = {Springer Berlin Heidelberg},
+  year = {2005},
+  editor = {Claude Diebolt and Catherine Kyrtsou},
+  author = {Fabio Canova and Joaquim Pires Pina},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Canova2009,
+  author = {Fabio Canova and Luca Sala},
+  title = {Back to square one: identification issues in {DSGE} models},
+  journal = {Journal of Monetary Economics},
+  year = {2009},
+  volume = {56},
+  number = {4},
+  month = {May}
+}
+
+@ARTICLE{ChangDohSchorfheide2007,
+  author = {Yongsung Chang and Taeyoung Doh and Frank Schorfheide},
+  title = {Non-stationary Hours in a {DSGE} Model},
+  journal = {Journal of Money, Credit and Banking},
+  year = {2007},
+  volume = {39},
+  pages = {1357-1373},
+  number = {6},
+  month = {09},
+  note = {available at http://ideas.repec.org/a/mcb/jmoncb/v39y2007i6p1357-1373.html}
+}
+
+@TECHREPORT{Chari2005,
+  author = {V. V. Chari and Patrick J. Kehoe and Ellen R. McGrattan},
+  title = {A critique of structural VARs using real business cycle theory},
+  institution = {Federal Reserve Bank of Minneapolis},
+  year = {2005},
+  type = {Working Papers},
+  number = {631},
+  note = {available at http://ideas.repec.org/p/fip/fedmwp/631.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{CEE2005,
+  author = {Lawrence Christiano and Martin Eichenbaum and Charles Evans},
+  title = {Nominal Rigidities and the Dynamic Effects of a Shock to Monetary
+	Policy},
+  journal = {Journal of Political Economy},
+  year = {2005},
+  volume = {113},
+  pages = {1-45},
+  number = {1},
+  month = {February},
+  note = {available at http://ideas.repec.org/a/ucp/jpolec/v113y2005i1p1-45.html}
+}
+
+@ARTICLE{Christiano2002,
+  author = {Lawrence J. Christiano},
+  title = {Solving dynamic equilibrium models by a method of undetermined coefficients},
+  journal = {Computational Economics},
+  year = {2002},
+  volume = {20},
+  number = {1-2}
+}
+
+@ARTICLE{Christiano1987,
+  author = {Christiano, Lawrence J},
+  title = {Is Consumption Insufficiently Sensitive to Innovations in Income?},
+  journal = {American Economic Review},
+  year = {1987},
+  volume = {77},
+  pages = {337-41},
+  number = {2},
+  month = {May},
+  note = {available at http://ideas.repec.org/a/aea/aecrev/v77y1987i2p337-41.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@TECHREPORT{Christiano2006,
+  author = {Lawrence J. Christiano and Martin Eichenbaum and Robert Vigfusson},
+  title = {Assessing Structural VARs},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2006},
+  type = {NBER Working Papers},
+  number = {12353},
+  month = Jul,
+  note = {available at http://ideas.repec.org/p/nbr/nberwo/12353.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@TECHREPORT{Cochrane2007,
+  author = {John H. Cochrane},
+  title = {Identification with Taylor Rules: A Critical Review},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2007},
+  type = {NBER Working Papers},
+  number = {13410},
+  month = Sep,
+  url = {http://ideas.repec.org/p/nbr/nberwo/13410.html}
+}
+
+@TECHREPORT{Coenen2005,
+  author = {Coenen, G. and Straub, R.},
+  title = {{Non-Ricardian} Households and Fiscal Policy in an Estimated {DSGE}
+	Model of the {Euro Area}},
+  institution = {Society for Computational Economics},
+  year = {2005},
+  type = {Computing in Economics and Finance 2005},
+  note = {available at http://ideas.repec.org/p/sce/scecf5/102.html}
+}
+
+@ARTICLE{Cooley1998,
+  author = {Cooley, Thomas F. and Dwyer, Mark},
+  title = {Business cycle analysis without much theory A look at structural
+	VARs},
+  journal = {Journal of Econometrics},
+  year = {1998},
+  volume = {83},
+  pages = {57-88},
+  number = {1-2},
+  note = {available at http://ideas.repec.org/a/eee/econom/v83y1998i1-2p57-88.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{CraggDonald1997,
+  author = {Cragg, John G. and Donald, Stephen G.},
+  title = {Inferring the rank of a matrix},
+  journal = {Journal of Econometrics},
+  year = {1997},
+  volume = {76},
+  pages = {223-250},
+  number = {1-2},
+  note = {available at http://ideas.repec.org/a/eee/econom/v76y1997i1-2p223-250.html}
+}
+
+@ARTICLE{CraggDonald1996,
+  author = {Cragg, John G. and Donald, Stephen G.},
+  title = {On the asymptotic properties of LDU-based tests of the rank of a
+	matrix},
+  journal = {Journal of the American Statistical Association},
+  year = {1996},
+  volume = {91},
+  pages = {13011309}
+}
+
+@BOOK{DavidsonMacKinnon2004,
+  title = {Econometric Theory and Methods},
+  publisher = {Oxford University Press},
+  year = {2004},
+  author = {Rusell Davidson and James MacKinnon}
+}
+
+@ARTICLE{DeFiore2005,
+  author = {De Fiore, F. and Liu, Z.},
+  title = {Does trade openness matter for aggregate instability?},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2005},
+  volume = {7},
+  pages = {1165-1192}
+}
+
+@ARTICLE{DejongIngramWhiteman2000,
+  author = {DeJong, David N. and Ingram, Beth F. and Whiteman, Charles H.},
+  title = {A Bayesian approach to dynamic macroeconomics},
+  journal = {Journal of Econometrics},
+  year = {2000},
+  volume = {98},
+  pages = {203-223},
+  number = {2},
+  month = {October},
+  note = {available at http://ideas.repec.org/a/eee/econom/v98y2000i2p203-223.html}
+}
+
+@ARTICLE{DeJongIngramWhiteman2000,
+  author = {David N. DeJong and Beth F. Ingram and Charles H. Whiteman},
+  title = {Keynesian impulses versus Solow residuals: identifying sources of
+	business cycle fluctuations},
+  journal = {Journal of Applied Econometrics},
+  year = {2000},
+  volume = {15},
+  pages = {311-329},
+  number = {3},
+  note = {available at http://ideas.repec.org/a/jae/japmet/v15y2000i3p311-329.html}
+}
+
+@ARTICLE{NegroSchorfheide2008,
+  author = {Del Negro, Marco and Frank Schorfheide},
+  title = {Forming priors for {DSGE} models (and how it affects the assessment
+	of nominal rigidities)},
+  journal = {Journal of Monetary Economics},
+  year = {2008},
+  volume = {55},
+  pages = {1191 - 1208},
+  number = {7},
+  doi = {DOI: 10.1016/j.jmoneco.2008.09.006},
+  issn = {0304-3932},
+  keywords = {Bayesian analysis},
+  url = {http://www.sciencedirect.com/science/article/B6VBW-4TKPVGT-3/2/508d89fdb8eb927643250b7f36aab161}
+}
+
+@TECHREPORT{DNSSW2005,
+  author = {Marco DelNegro and Frank Schorfheide and Frank Smets and Raf Wouters},
+  title = {On the fit and forecasting performance of New-Keynesian models},
+  institution = {European Central Bank},
+  year = {2005},
+  type = {Working Paper Series},
+  number = {491},
+  month = Jun,
+  note = {available at http://ideas.repec.org/p/ecb/ecbwps/20050491.html}
+}
+
+@ARTICLE{Demmel1987,
+  author = {Demmel, James},
+  title = {The condition number and the distance to the nearest ill-posed problem},
+  journal = {Numerische Mathematik},
+  year = {1987},
+  volume = {51},
+  number = {251289}
+}
+
+
+@MISC{ParallelDYNARE,
+  author = {ParallelDYNARE},
+  title =        {http://www.dynare.org/DynareWiki/ParallelDynare},
+  year =         {2009},
+}
+
+@ARTICLE{Dufour2003,
+  author = {Jean-Marie Dufour},
+  title = {Identification, weak instruments, and statistical inference in econometrics},
+  journal = {Canadian Journal of Economics},
+  year = {2003},
+  volume = {36},
+  pages = {767-808},
+  number = {4},
+  month = {November},
+  note = {available at http://ideas.repec.org/a/cje/issued/v36y2003i4p767-808.html}
+}
+
+@ARTICLE{EdelmanRao2005,
+  author = {Edelman, Alan and Rao, Raj},
+  title = {Random Matrix Theory},
+  journal = {Acta Numerica},
+  year = {2005},
+  volume = {1},
+  number = {65}
+}
+
+@ARTICLE{EichenbaumFisher2007,
+  author = {Martin Eichenbaum and Jonas Fisher},
+  title = {Estimating the Frequency of Reoptimisation in Calvo-style Models},
+  journal = {Journal of Monetary Economics, forthcoming},
+  year = {2007}
+}
+
+@ARTICLE{EichenbaumFisher2007,
+  author = {Eichenbaum, Martin and Fisher, Jonas D.M.},
+  title = {Estimating the frequency of price re-optimization in Calvo-style
+	models},
+  journal = {Journal of Monetary Economics},
+  year = {2007},
+  volume = {54},
+  pages = {2032-2047},
+  number = {7},
+  month = {October},
+  url = {http://ideas.repec.org/a/eee/moneco/v54y2007i7p2032-2047.html}
+}
+
+@ARTICLE{Erceg2005,
+  author = {Christopher J. Erceg and Luca Guerrieri and Christopher Gust},
+  title = {Can Long-Run Restrictions Identify Technology Shocks?},
+  journal = {Journal of the European Economic Association},
+  year = {2005},
+  volume = {3},
+  pages = {1237-1278},
+  number = {6},
+  month = {December},
+  note = {available at http://ideas.repec.org/a/tpr/jeurec/v3y2005i6p1237-1278.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{ErcegHendersonLevin2000,
+  author = {Erceg, Christopher J. and Henderson, Dale W. and Levin, Andrew T.},
+  title = {Optimal monetary policy with staggered wage and price contracts},
+  journal = {Journal of Monetary Economics},
+  year = {2000},
+  volume = {46},
+  pages = {281-313},
+  number = {2},
+  month = {October},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v46y2000i2p281-313.html}
+}
+
+@ARTICLE{Evans2005,
+  author = {Evans, G. W. and McGough, B.},
+  title = {Monetary policy and stable indeterminacy with inertia},
+  journal = {Economics Letters},
+  year = {2005},
+  volume = {87},
+  pages = {1-7}
+}
+
+@MISC{Favero2002,
+  author = {Favero, C. and Monacelli, T.},
+  title = {Policy Mix and Macroeconomic Stability: Evidence and Some Theory},
+  year = {2002}
+}
+
+@ARTICLE{Feller45,
+  author = {Feller, W.},
+  title = {The Fundamental Limit Theorems in Probability},
+  journal = {Bull. Amer. Math. Soc.},
+  year = {1945},
+  volume = {51},
+  pages = {800-832}
+}
+
+@TECHREPORT{Fernandez-Villaverde2005,
+  author = {Jesus Fernandez-Villaverde and Juan Rubio-Ramirez and Thomas J. Sargent},
+  title = {A, B, C's (and D)'s for Understanding VARs},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2005},
+  type = {NBER Technical Working Papers},
+  number = {0308},
+  month = Jun,
+  note = {available at http://ideas.repec.org/p/nbr/nberte/0308.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{VillaverdeRamirez2006,
+  author = {Jesus Fernandez-Villaverde and Juan F. Rubio-Ramirez},
+  title = {The Research Agenda: Jesus Fernandez-Villaverde and Juan F. Rubio-Ramirez
+	on Estimating {DSGE} Models},
+  journal = {EconomicDynamics Newsletter},
+  year = {2006},
+  volume = {8},
+  number = {1},
+  month = {November},
+  note = {available at http://ideas.repec.org/a/red/ecodyn/v8y2006i1agenda.html}
+}
+
+@ARTICLE{RamirezVillaverde2005,
+  author = {Jesus Fernandez-Villaverde and Juan F. Rubio-Ramirez},
+  title = {Estimating dynamic equilibrium economies: linear versus nonlinear
+	likelihood},
+  journal = {Journal of Applied Econometrics},
+  year = {2005},
+  volume = {20},
+  pages = {891-910},
+  number = {7},
+  note = {available at http://ideas.repec.org/a/jae/japmet/v20y2005i7p891-910.html}
+}
+
+@TECHREPORT{VillaverdeRamirez2004,
+  author = {Jesus Fernandez-Villaverde and Juan Francisco Rubio-Ramirez},
+  title = {On the solution of the growth model with investment-specific technological
+	change},
+  institution = {Federal Reserve Bank of Atlanta},
+  year = {2004},
+  type = {Working Paper},
+  number = {2004-39},
+  note = {available at http://ideas.repec.org/p/fip/fedawp/2004-39.html}
+}
+
+@BOOK{Fisher1966,
+  title = {The identification problem in econometrics},
+  publisher = {McGraw-Hill},
+  year = {1966},
+  author = {F. Fisher}
+}
+
+@ARTICLE{Fisher2006,
+  author = {Fisher, Jonas},
+  title = {The Dynamic Effects of Neutral and Investment-Specific Technology
+	Shocks},
+  journal = {Journal of Political Economy},
+  year = {2006},
+  volume = {114},
+  pages = {413-451},
+  number = {3}
+}
+
+@BOOK{FlorensMarimoutouFeisolle2008,
+  title = {Econometric Modelling and Inference},
+  publisher = {Cambridge},
+  year = {2008},
+  author = { Jean-Pierre Florens and V\^{e}layoudom Marimoutou and Anne P\'{e}guin-Feissolle}
+}
+
+@ARTICLE{Flores-Lagunes2007,
+  author = {Alfonso Flores-Lagunes},
+  title = {Finite sample evidence of IV estimators under weak instruments},
+  journal = {Journal of Applied Econometrics},
+  year = {2007},
+  volume = {22},
+  pages = {677-694},
+  number = {3},
+  note = {available at http://ideas.repec.org/a/jae/japmet/v22y2007i3p677-694.html}
+}
+
+@TECHREPORT{ForchiniHillier2005,
+  author = {Giovanni Forchini and Grant Hillier},
+  title = {Ill-conditioned problems, Fisher information and weak instruments},
+  institution = {Centre for Microdata Methods and Practice, Institute for Fiscal Studies},
+  year = {2005},
+  type = {CeMMAP working papers},
+  number = {CWP04/05},
+  month = Apr,
+  note = {available at http://ideas.repec.org/p/ifs/cemmap/04-05.html}
+}
+
+@TECHREPORT{Forni2006,
+  author = {Forni, L. and Monteforte, L. and Sessa, L.},
+  title = {The estimated general equilibrium effects of fiscal policy: the case
+	of the euro area},
+  institution = {Society for Computational Economics},
+  year = {2006},
+  type = {Computing in Economics and Finance 2006}
+}
+
+@ARTICLE{Gali1999b,
+  author = {Jordi Gali},
+  title = {Technology, Employment, and the Business Cycle: Do Technology Shocks
+	Explain Aggregate Fluctuations?},
+  journal = {American Economic Review},
+  year = {1999},
+  volume = {89},
+  pages = {249-271},
+  number = {1},
+  month = {March},
+  note = {available at http://ideas.repec.org/a/aea/aecrev/v89y1999i1p249-271.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{GaliGertler1999,
+  author = {Gali, Jordi and Gertler, Mark},
+  title = {Inflation dynamics: A structural econometric analysis},
+  journal = {Journal of Monetary Economics},
+  year = {1999},
+  volume = {44},
+  pages = {195-222},
+  number = {2},
+  month = {October},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v44y1999i2p195-222.html}
+}
+
+@ARTICLE{GillLewbel1992,
+  author = {Gill, Len and Lewbel, Arthur},
+  title = {Testing the Rank and Definiteness of Estimated Matrices with Applications
+	to Factor, State-Space and ARMA Models},
+  journal = {Journal of the American Statistical Association},
+  year = {1992},
+  volume = {419},
+  pages = {766-776},
+  month = {September},
+  note = {available at http://www.sciencedirect.com/science/article/B6WS7-47CR92D-363/2/b82d013604acbb0ffc3764ea49d4a91b}
+}
+
+@ARTICLE{GCH2000,
+  author = {Greenwood, Jeremy and Hercowitz, Zvi and Krusell, Per},
+  title = {The role of investment-specific technological change in the business
+	cycle},
+  journal = {European Economic Review},
+  year = {2000},
+  volume = {44},
+  pages = {91-115},
+  number = {1},
+  month = {January},
+  note = {available at http://ideas.repec.org/a/eee/eecrev/v44y2000i1p91-115.html}
+}
+
+@ARTICLE{GoffeCreel_Grid_2008,
+  AUTHOR =       {Goffe, W.L.  and Creel, M.},
+  TITLE =        {Multi-core {CPUs}, Clusters, and Grid Computing: A Tutorial},
+  JOURNAL =      {Computational economics},
+  YEAR =         {2008},
+  volume =       {32},
+  number =       {4},
+  pages =        {353-382}
+}
+
+@ARTICLE{Greenwood1997,
+  author = {Greenwood, Jeremy and Hercowitz, Zvi and Krusell, Per},
+  title = {Long-Run Implications of Investment-Specific Technological Change},
+  journal = {American Economic Review},
+  year = {1997},
+  volume = {87},
+  pages = {342-62},
+  number = {3},
+  month = {June},
+  note = {available at http://ideas.repec.org/a/aea/aecrev/v87y1997i3p342-62.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@INCOLLECTION{RabitzAlisSAbook00,
+  author = {H. Rabitz, and \"{O}. F. Ali\c{s}},
+  title = {Managing the Tyranny of Parameters in Mathematical Modelling of Physical
+	Systems},
+  booktitle = {Sensitivity Analysis},
+  publisher = {John Wiley and Sons Publishers},
+  year = {2000},
+  editor = {A. Saltelli and K. Chan and M. Scott},
+  pages = {199-223}
+}
+
+@ARTICLE{HahnHausmanKuersteiner2004,
+  author = {Jinyong Hahn and Jerry Hausman and Guido Kuersteiner},
+  title = {Estimation with weak instruments: Accuracy of higher-order bias and
+	MSE approximations},
+  journal = {Econometrics Journal},
+  year = {2004},
+  volume = {7},
+  pages = {272-306},
+  number = {1},
+  month = {06},
+  note = {available at http://ideas.repec.org/a/ect/emjrnl/v7y2004i1p272-306.html}
+}
+
+@BOOK{Hamilton1994,
+  title = {Time Series Analysis},
+  publisher = {Princeton University Press},
+  year = {1994},
+  author = {James Hamilton},
+  volume = { },
+  series = { },
+  address = { },
+  edition = { },
+  month = { },
+  note = { },
+  abstract = { },
+  isbn = { },
+  keywords = { }
+}
+
+@ARTICLE{Hansen1985,
+  author = {Hansen, Gary D.},
+  title = {Indivisible labor and the business cycle},
+  journal = {Journal of Monetary Economics},
+  year = {1985},
+  volume = {16},
+  pages = {309-327},
+  number = {3},
+  month = {November},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v16y1985i3p309-327.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Hansen1988,
+  author = {Hansen, Gary D. and Sargent, Thomas J.},
+  title = {Straight time and overtime in equilibrium},
+  journal = {Journal of Monetary Economics},
+  year = {1988},
+  volume = {21},
+  pages = {281-308},
+  number = {2-3},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v21y1988i2-3p281-308.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Hansen82,
+  author = {Hansen, Lars Peter},
+  title = {Large Sample Properties of Generalized Method of Moments Estimators},
+  journal = {Econometrica},
+  year = {1982},
+  volume = {50},
+  pages = {1029-54},
+  number = {4},
+  month = {July},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v50y1982i4p1029-54.html}
+}
+
+@ARTICLE{HansenHeatonYaron1996,
+  author = {Hansen, Lars Peter and Heaton, John and Yaron, Amir},
+  title = {Finite-Sample Properties of Some Alternative GMM Estimators},
+  journal = {Journal of Business \& Economic Statistics},
+  year = {1996},
+  volume = {14},
+  pages = {262-80},
+  number = {3},
+  month = {July},
+  note = {available at http://ideas.repec.org/a/bes/jnlbes/v14y1996i3p262-80.html}
+}
+
+@TECHREPORT{Hansen1994,
+  author = {Lars Peter Hansen and Ellen R. McGrattan and Thomas J. Sargent},
+  title = {Mechanics of forming and estimating dynamic linear economies},
+  institution = {Federal Reserve Bank of Minneapolis},
+  year = {1994},
+  type = {Staff Report},
+  number = {182},
+  note = {available at http://ideas.repec.org/p/fip/fedmsr/182.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@BOOK{HastieTibshiraniGAM96,
+  title = {Generalized Additive Models},
+  publisher = {Chapman and Hall},
+  year = {1996},
+  author = {Hastie, T.J. and Tibshirani, R.J.}
+}
+
+@BOOK{Horn1985,
+  title = {Matrix Analysis},
+  publisher = {Cambridge University Press},
+  year = {1985},
+  author = {Horn, Roger and Johnson, Charles}
+}
+
+@ARTICLE{HornbergerSpear81,
+  author = {Hornberger, G.M. and Spear, R.C.},
+  title = {An approach to the preliminary analysis of environmental systems},
+  journal = {Journal of Environmental Management},
+  year = {1981},
+  volume = {7},
+  pages = {7--18}
+}
+
+@INPROCEEDINGS{Hradisky_etal_2006,
+  AUTHOR =       {Hradisky, M. and Liska, R. and Ratto, M. and Girardi, R.},
+  TITLE =        {{Exchange Rate Versus Inflation Targeting in a Small Open Economy SDGE Model, for European Union New Members States}},
+  BOOKTITLE =    {DYNARE CONFERENCE, Paris September 4-5},
+  YEAR =         {2006},
+}
+
+@INCOLLECTION{Hsiao1983,
+  author = {Hsiao, Cheng},
+  title = {Identification},
+  booktitle = {Handbook of Econometrics},
+  publisher = {Elsevier},
+  year = {1983},
+  editor = {Z. Griliches and M. D. Intriligator},
+  volume = {1},
+  series = {Handbook of Econometrics},
+  chapter = {4},
+  pages = {223-283},
+  month = {June},
+  url = {http://ideas.repec.org/h/eee/ecochp/1-04.html}
+}
+
+@ARTICLE{Ireland2004,
+  author = {Ireland, P.},
+  title = {A method for taking models to the data},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2004},
+  volume = {28},
+  pages = {1205--1226},
+  keyword = {hybrid macroeconomic models}
+}
+
+@ARTICLE{Ireland2001,
+  author = {Ireland, Peter N.},
+  title = {Technology shocks and the business cycle : an empirical investigation},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2001},
+  volume = {25},
+  pages = {703-719},
+  owner = {nikolay},
+  timestamp = {2007.06.19}
+}
+
+@ARTICLE{Iskrev2010,
+  author = {Nikolay Iskrev},
+  title = {Local Identification in {DSGE} Models},
+  journal = {Journal of Monetary Economics},
+  year = {2010},
+  volume = {57},
+  pages = {189-202}
+}
+
+@UNPUBLISHED{Iskrev2009b,
+  author = {Nikolay Iskrev},
+  title = {Evaluating the strenght of identification in {DSGE} models. An a priori
+	approach},
+  note = {unpublished manuscript},
+  year = {2009}
+}
+
+@ARTICLE{Iskrev2007b,
+  author = {Iskrev, Nikolay},
+  title = {Evaluating the information matrix in linearized {DSGE} models},
+  journal = {Economics Letters},
+  year = {2008},
+  volume = {99},
+  pages = {607-610},
+  number = {3},
+  month = {June},
+  url = {http://ideas.repec.org/a/eee/ecolet/v99y2008i3p607-610.html}
+}
+
+@UNPUBLISHED{Iskrev2007c,
+  author = {Nikolay Iskrev},
+  title = {How much do we learn from the estimation of {DSGE} models - A case
+	study of identification issues in a New Keynesian business cycle
+	model},
+  note = {unpublished manuscript},
+  year = {2008}
+}
+
+@UNPUBLISHED{Iskrev2007a,
+  author = {Nikolay Iskrev},
+  title = {Evaluating the information matrix in linearized {DSGE} models},
+  year = {2007},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@UNPUBLISHED{Iskrev2007b,
+  author = {Nikolay Iskrev},
+  title = {Identification and Estimation of {DSGE} model - An Integrated Approach},
+  year = {2007}
+}
+
+@BOOK{Judd98,
+  title = {Numerical methods in economics},
+  publisher = {The MIT press},
+  year = {1998},
+  author = {K. L. Judd}
+}
+
+@BOOK{Judge1982,
+  title = {Introduction to the Theory and Practice of Econometrics},
+  publisher = {Wiley, New York},
+  year = {1982},
+  author = {George G. Judge and William E. Griffiths and R. Carter Hill and Helmut
+	Lutkepohl and Tsoung-Chao Lee}
+}
+
+@MISC{DYNARE,
+  author = {M. Juillard},
+  title = {{DYNARE}: {A} program for simulating and estimating {SDGE} models},
+  year = {2004},
+  note = {http://www.cepremap.cnrs.fr/dynare}
+}
+
+@TECHREPORT{Juillard2006,
+  author = {Juillard, M. and Karam, P. and Laxton, D. and Pesenti, P.},
+  title = {Welfare-based monetary policy rules in an estimated {DSGE} model
+	of the {US} economy},
+  institution = {European Central Bank},
+  year = {2006},
+  type = {Working Paper Series},
+  number = {613},
+  month = {April}
+}
+
+@TECHREPORT{JuillardKaramLaxtonPesenti2006,
+  author = {Michel Juillard and Philippe Karam and Douglas Laxton and Paolo Pesenti},
+  title = {Welfare-based monetary policy rules in an estimated {DSGE} model of
+	the US economy},
+  institution = {European Central Bank},
+  year = {2006},
+  type = {Working Paper Series},
+  number = {613},
+  month = Apr,
+  note = {available at http://ideas.repec.org/p/ecb/ecbwps/20060613.html}
+}
+
+@TECHREPORT{JustinianoPrimiceri2006,
+  author = {Alejandro Justiniano and Giorgio E. Primiceri},
+  title = {The Time Varying Volatility of Macroeconomic Fluctuations},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2006},
+  type = {NBER Working Papers},
+  number = {12022},
+  month = Feb,
+  note = {available at http://ideas.repec.org/p/nbr/nberwo/12022.html}
+}
+
+@BOOK{Kailath1980,
+  title = {Linear Systems},
+  publisher = {Prentice-Hall},
+  year = {1980},
+  author = {Thomas Kailath},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Kalm60,
+  author = {Kalman, R.E.},
+  title = {A new approach to linear filtering and prediction problems},
+  journal = {ASME Trans., Journal Basic Eng.},
+  year = {1960},
+  volume = {82D},
+  pages = {35-45}
+}
+
+@ARTICLE{KalmBucy61,
+  author = {Kalman, R.E. and Bucy, R. S.},
+  title = {New results in linear filtering and prediction theory},
+  journal = {ASME Trans., Journal Basic Eng.},
+  year = {1961},
+  volume = {83D},
+  pages = {95-108}
+}
+
+@ARTICLE{Kim2003,
+  author = {Kim, Jinill},
+  title = {Functional equivalence between intertemporal and multisectoral investment
+	adjustment costs},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2003},
+  volume = {27},
+  pages = {533-549},
+  number = {4},
+  month = {February},
+  url = {http://ideas.repec.org/a/eee/dyncon/v27y2003i4p533-549.html}
+}
+
+@ARTICLE{King1991,
+  author = {King, Robert G. and Plosser, Charles I. and Stock, James H. and Watson,
+	Mark W.},
+  title = {Stochastic Trends and Economic Fluctuations},
+  journal = {American Economic Review},
+  year = {1991},
+  volume = {81},
+  pages = {819-40},
+  number = {4},
+  month = {September},
+  note = {available at http://ideas.repec.org/a/aea/aecrev/v81y1991i4p819-40.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{KingWatson1998,
+  author = {King, Robert G and Watson, Mark W},
+  title = {The Solution of Singular Linear Difference Systems under Rational
+	Expectations},
+  journal = {International Economic Review},
+  year = {1998},
+  volume = {39},
+  pages = {1015-26},
+  number = {4},
+  month = {November},
+  url = {http://ideas.repec.org/a/ier/iecrev/v39y1998i4p1015-26.html}
+}
+
+@ARTICLE{Kleibergen2005,
+  author = {Frank Kleibergen},
+  title = {Testing Parameters in GMM Without Assuming that They Are Identified},
+  journal = {Econometrica},
+  year = {2005},
+  volume = {73},
+  pages = {1103-1123},
+  number = {4},
+  month = {07},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v73y2005i4p1103-1123.html}
+}
+
+@ARTICLE{KleibergenPaap2006,
+  author = {Kleibergen, Frank and Paap, Richard},
+  title = {Generalized reduced rank tests using the singular value decomposition},
+  journal = {Journal of Econometrics},
+  year = {2006},
+  volume = {127},
+  pages = {97-126},
+  number = {1},
+  month = {July},
+  note = {available at http://ideas.repec.org/a/eee/econom/v133y2006i1p97-126.html}
+}
+
+@ARTICLE{KleinNeudecker2000,
+  author = {A. Klein and H. Neudecker},
+  title = {A direct derivation of the exact Fisher information matrix of Gaussian
+	vector state space models},
+  journal = {Linear Algebra and its Applications},
+  year = {2000},
+  volume = {321},
+  pages = {233-238},
+  number = {1-3},
+  month = {December},
+  source = {http://www.sciencedirect.com/science/article/B6V0R-41V8JCT-J/2/c00d3da4b616b1d7b7918fea911a5805}
+}
+
+@ARTICLE{Klein2000,
+  author = {Klein, Paul},
+  title = {Using the generalized Schur form to solve a multivariate linear rational
+	expectations model},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2000},
+  volume = {24},
+  pages = {1405-1423},
+  number = {10},
+  month = {September},
+  note = {available at http://ideas.repec.org/a/eee/dyncon/v24y2000i10p1405-1423.html}
+}
+
+@UNPUBLISHED{KomunjerNg2009,
+  author = {Ivana Komunjer and Serena Ng},
+  title = {Dynamic Identification of {DSGE} Models},
+  note = {unpublished manuscript},
+  year = {2009}
+}
+
+@ARTICLE{Koopmans1949,
+  author = {Koopmans, T.C.},
+  title = {Identification Problems in Economic Model Construction},
+  journal = { Econometrica},
+  year = {1949},
+  volume = {17},
+  pages = {125-144}
+}
+
+@ARTICLE{Koopmans1950,
+  author = {Koopmans, T.C. and Reiersol, Q },
+  title = {The identification of Structural Charactersistics},
+  journal = {Annals of Mathematical Statistics},
+  year = {1950},
+  volume = {21},
+  pages = {165-181}
+}
+
+@ARTICLE{Kuttner94,
+  author = {Kuttner, K.N.},
+  title = {Estimating potential output as a latent variable},
+  journal = {Journal of Business and Economic Statistics},
+  year = {1994},
+  volume = {12},
+  pages = {361-368}
+}
+
+@ARTICLE{Kydland1982,
+  author = {Kydland, Finn E and Prescott, Edward C},
+  title = {Time to Build and Aggregate Fluctuations},
+  journal = {Econometrica},
+  year = {1982},
+  volume = {50},
+  pages = {1345-70},
+  number = {6},
+  month = {November},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v50y1982i6p1345-70.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Levin2003,
+  author = {Levin, A. and Wieland, W. and Williams, J.C.},
+  title = {The Performance of Forecast-Based Monetary Policy Rules under Model
+	Uncertainty},
+  journal = {American Economic Review},
+  year = {2003},
+  volume = {93},
+  pages = {622-645}
+}
+
+@TECHREPORT{LevinOnatskiWilliamsWilliams2005,
+  author = {Andrew T. Levin and Alexei Onatski and John C. Williams and Noah
+	Williams},
+  title = {Monetary Policy Under Uncertainty in Micro-Founded Macroeconometric
+	Models},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2005},
+  type = {NBER Working Papers},
+  number = {11523},
+  month = Aug,
+  note = {available at http://ideas.repec.org/p/nbr/nberwo/11523.html}
+}
+
+@ARTICLE{LevinePearlmanPierce_JEDC_2008,
+  author = {Paul Levine and Joseph Pearlman and Richard Pierse},
+  title = {Linear-quadratic approximation, external habit and targeting rules},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2008},
+  volume = {32},
+  pages = {3315 - 3349},
+  number = {10},
+  doi = {DOI: 10.1016/j.jedc.2008.02.001},
+  issn = {0165-1889},
+  keywords = {Linear-quadratic approximation},
+  url = {http://www.sciencedirect.com/science/article/B6V85-4RWBSVN-2/2/b2b735dd6daddecd81e2970c3ac9dc29}
+}
+
+@ARTICLE{RS-HDMR-Rabitz2006,
+  author = {G. Li and J. Hu and S.-W. Wang and P.G. Georgopoulos and J. Schoendorf
+	and H. Rabitz},
+  title = {{Random Sampling-High Dimensional Model Representation} {(RS-HDMR)}
+	and Orthogonality of Its Different Order Component Functions},
+  journal = {Journal of Physical Chemistry A},
+  year = {2006},
+  volume = {110},
+  pages = {2474-2485}
+}
+
+@ARTICLE{RS-HDMR-Rabitz2002,
+  author = {Li, G. and Wang S. W. and Rabitz H.},
+  title = {Practical approaches to construct {RS-HDMR} component functions.},
+  journal = {Journal of Physical Chemistry},
+  year = {2002},
+  volume = {106},
+  pages = {8721-8733}
+}
+
+@UNPUBLISHED{Li2004,
+  author = {Hong Li},
+  title = {The Econometrics of the Lucas Critique: Estimation and Testing of
+	Euler Equation Models with Time-varying Reduced-form Coefficients},
+  note = {Princeton University},
+  year = {2004}
+}
+
+@ARTICLE{Lippi1994,
+  author = {Lippi, Marco and Reichlin, Lucrezia},
+  title = {VAR analysis, nonfundamental representations, blaschke matrices},
+  journal = {Journal of Econometrics},
+  year = {1994},
+  volume = {63},
+  pages = {307-325},
+  number = {1},
+  month = {July},
+  note = {available at http://ideas.repec.org/a/eee/econom/v63y1994i1p307-325.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Long1983,
+  author = {Long, John B, Jr and Plosser, Charles I},
+  title = {Real Business Cycles},
+  journal = {Journal of Political Economy},
+  year = {1983},
+  volume = {91},
+  pages = {39-69},
+  number = {1},
+  month = {February},
+  note = {available at http://ideas.repec.org/a/ucp/jpolec/v91y1983i1p39-69.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@TECHREPORT{Lubik2003,
+  author = {Lubik, T.},
+  title = {Investment Spending, Equilibrium Indeterminacy, and the Interactions
+	of Monetary and Fiscal Policy},
+  institution = {The Johns Hopkins University},
+  year = {2003},
+  number = {Economics Working Paper Archive 490}
+}
+
+@ARTICLE{LubikSchorfheideAER,
+  author = {Thomas A. Lubik and Frank Schorfheide},
+  title = {Testing for Indeterminacy: An Application to U.S. Monetary Policy},
+  journal = {American Economic Review},
+  year = {2004},
+  volume = {94},
+  pages = {190-217},
+  number = {1},
+  month = {March},
+  note = {available at http://ideas.repec.org/a/aea/aecrev/v94y2004i1p190-217.html}
+}
+
+@TECHREPORT{Lubik2005b,
+  author = {Lubik, T. and Schorfheide, F.},
+  title = {A {Bayesian} Look at New Open Economy Macroeconomics},
+  institution = {The Johns Hopkins University,Department of Economics},
+  year = {2005},
+  type = {Economics Working Paper Archive},
+  number = {521},
+  month = {May},
+  note = {available at http://ideas.repec.org/p/jhu/papers/521.html}
+}
+
+@TECHREPORT{LubikSchorfheide2005,
+  author = {Thomas Lubik and Frank Schorfheide},
+  title = {A Bayesian Look at New Open Economy Macroeconomics},
+  institution = {The Johns Hopkins University,Department of Economics},
+  year = {2005},
+  type = {Economics Working Paper Archive},
+  number = {521},
+  month = May,
+  note = {available at http://ideas.repec.org/p/jhu/papers/521.html}
+}
+
+@TECHREPORT{Lubik2005,
+  author = {Lubik, T. and Schorfheide, F.},
+  title = {Do Central Banks Respond to Exchange Rate Movements? {A} Structural
+	Investigation},
+  institution = {The Johns Hopkins University,Department of Economics},
+  year = {2003},
+  type = {Economics Working Paper Archive},
+  number = {505},
+  note = {available at http://ideas.repec.org/p/jhu/papers/505.html}
+}
+
+@BOOK{MagnusAbadir2005,
+  title = {Matrix Algebra},
+  publisher = {Cambridge University Press},
+  year = {2005},
+  author = {Jan R. Magnus and Karim M. Abadir}
+}
+
+@BOOK{MagnusNeudecker1999,
+  title = {Matrix Differential Calculus with its Applications in Statistics
+	and Econometrics},
+  publisher = {Wiley},
+  year = {1999},
+  author = {Jan R. Magnus and Heinz Neudecker}
+}
+
+@BOOK{Manski1995,
+  title = {Identification Problems in Social Sciences},
+  publisher = {Harvard University Press},
+  year = {1995},
+  author = {C. F. Manski}
+}
+
+@ARTICLE{Mauntz2006,
+  author = {Mauntz, W. and Kucherenko, S.},
+  title = {Applicaton of Global Sensitivity Indices for Measuring the Effectiveness
+	of {Quasi-Monte Carlo} Methods},
+  journal = {Monte Carlo Methods and Simulation},
+  year = {2006},
+  note = {submitted}
+}
+
+@ARTICLE{McHugh1956,
+  author = {R. B. McHugh},
+  title = {Efficient Estimation and Local Identification in Latent Class Analysis},
+  journal = {Psychometrica},
+  year = {1956},
+  pages = {331-347},
+  number = {21}
+}
+
+@ARTICLE{McManus1992,
+  author = {McManus, Douglas A.},
+  title = {How common is identification in parametric models?},
+  journal = {Journal of Econometrics},
+  year = {1992},
+  volume = {53},
+  pages = {5-23},
+  number = {1-3},
+  note = {available at http://ideas.repec.org/a/eee/econom/v53y1992i1-3p5-23.html}
+}
+
+@BOOK{MirandaFackler2002,
+  title = {Applied Computational Economics and Finance},
+  publisher = {MIT Press},
+  year = {2002},
+  author = {Mario J. Miranda and Paul W. Fackler}
+}
+
+@ARTICLE{Moreira2003,
+  author = {Marcelo J. Moreira},
+  title = {A Conditional Likelihood Ratio Test for Structural Models},
+  journal = {Econometrica},
+  year = {2003},
+  volume = {71},
+  pages = {1027-1048},
+  number = {4},
+  month = {07},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v71y2003i4p1027-1048.html}
+}
+
+@ARTICLE{Morris91,
+  author = {Morris, M. D.},
+  title = {Factorial Sampling Plans for Preliminary Computational Experiments},
+  journal = {Technometrics},
+  year = {1991},
+  volume = {33},
+  pages = {161-174}
+}
+
+@ARTICLE{NeelyRoyWhiteman2001,
+  author = {Neely, Christopher J and Roy, Amlan and Whiteman, Charles H},
+  title = {Risk Aversion versus Intertemporal Substitution: A Case Study of
+	Identification Failure in the Intertemporal Consumption Capital Asset
+	Pricing Model},
+  journal = {Journal of Business \& Economic Statistics},
+  year = {2001},
+  volume = {19},
+  pages = {395-403},
+  number = {4},
+  month = {October},
+  note = {available at http://ideas.repec.org/a/bes/jnlbes/v19y2001i4p395-403.html}
+}
+
+@ARTICLE{NelsonPlosser1982,
+  author = {Nelson, Charles R. and Plosser, Charles I.},
+  title = {Trends and Random Walks in Macroeconomic Time Series: Some Evidence
+	and Implications},
+  journal = {Journal of Monetary Economics},
+  year = {1982},
+  volume = {10},
+  pages = {139-162},
+  number = {2},
+  month = {September},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@INCOLLECTION{NeweyMcFadden1994,
+  author = {Newey, Whitney K. and McFadden, Daniel},
+  title = {Large sample estimation and hypothesis testing},
+  booktitle = {Handbook of Econometrics},
+  publisher = {Elsevier},
+  year = {1994},
+  editor = {R. F. Engle and D. McFadden},
+  volume = {4},
+  series = {Handbook of Econometrics},
+  chapter = {36},
+  pages = {2111-2245},
+  url = {http://ideas.repec.org/h/eee/ecochp/4-36.html}
+}
+
+@ARTICLE{Ng1990fk,
+  author = {Ng, C.N. and Young, P.C.},
+  title = {Recursive estimation and forecasting of non-stationary time series},
+  journal = {Journal of Forecasting},
+  year = {1990},
+  volume = {9},
+  pages = {173-204}
+}
+
+@ARTICLE{OakleyOHagan02,
+  author = {Oakley, J. and O'Hagan, A.},
+  title = {Probabilistic sensitivity analysis of complex models: a {Bayesian}
+	approach},
+  journal = {J. Royal Stat. Soc. B},
+  year = {2004},
+  volume = {66},
+  pages = {751-769}
+}
+
+@TECHREPORT{OECD93,
+  author = { {OECD/NEA PSAC User group} },
+  title = { {PSACOIN Level S} intercomparison},
+  institution = {Nuclear Energy Agency, Organisation for Economic Cooperation and
+	Development},
+  year = {1993},
+  type = { {A. Alonso, P. Robinson, E. J. Bonano and D. A. Galson, Eds} },
+  address = {Paris}
+}
+
+@TECHREPORT{OECD89,
+  author = { {OECD/NEA PSAC User group} },
+  title = { {PSACOIN Level E} intercomparison},
+  institution = {Nuclear Energy Agency, Organisation for Economic Cooperation and
+	Development},
+  year = {1989},
+  type = { {B. W. Goodwin, J. M. Laurens, J. E. Sinclair, D.A. Galson and E.
+	Sartori, Eds} },
+  address = {Paris}
+}
+
+@ARTICLE{OnatskiWilliams2004,
+  author = {Alexei Onatski and Noah Williams},
+  title = {Empirical and policy performance of a forward-looking monetary model},
+  journal = {Proceedings},
+  year = {2004},
+  number = {Mar},
+  note = {available at http://ideas.repec.org/a/fip/fedfpr/y2004imarx6.html}
+}
+
+@ARTICLE{Owen98,
+  author = {Owen, A.B.},
+  title = {Latin Supercube Sampling for Very High- Dimensional Simulations},
+  journal = {ACM Transactions on Modeling and Computer Simulation},
+  year = {1998},
+  volume = {8},
+  pages = {71--102},
+  number = {1}
+}
+
+@ARTICLE{Paskov95,
+  author = {Paskov, S.H. and Traub, J.F.},
+  title = {Faster evaluation of financial derivatives},
+  journal = {Journal of Portfolio Management},
+  year = {1995},
+  volume = {22},
+  pages = {113--120},
+  number = {1},
+  note = {forthcoming}
+}
+
+@BOOK{Pesaran1989,
+  title = {The Limits to Rational Expectations},
+  publisher = {Basil Blackwell, Oxford},
+  year = {1989},
+  author = {Pesaran, M. H.}
+}
+
+@ARTICLE{Pesaran1981,
+  author = {Pesaran, M. H.},
+  title = {Identification of rational expectations models},
+  journal = {Journal of Econometrics},
+  year = {1981},
+  volume = {16},
+  pages = {375-398},
+  number = {3},
+  month = {August},
+  note = {available at http://ideas.repec.org/a/eee/econom/v16y1981i3p375-398.html}
+}
+
+@ARTICLE{Planasetal2006,
+  author = {Planas, C. and Roeger, W. and Rossi, A.},
+  title = {How Much Has Labour Taxes Contributed to {EU} Unemployment?},
+  journal = {Journal of Economic Dynamics and Control},
+  year = {2006},
+  note = {forthcoming}
+}
+
+@TECHREPORT{Pytlarczyk2005,
+  author = {Pytlarczyk, E.},
+  title = {An estimated {DSGE} model for the {German} economy within the {Euro
+	Area}},
+  institution = {Deutsche Bundesbank, Research Centre},
+  year = {2005},
+  type = {Discussion Paper Series 1: Economic Studies},
+  number = {2005,33},
+  note = {available at http://ideas.repec.org/p/zbw/bubdp1/4227.html}
+}
+
+@ARTICLE{PauRabanal2005,
+  author = {Rabanal, Pau and Rubio-Ramirez, Juan F.},
+  title = {Comparing New Keynesian models of the business cycle: A Bayesian
+	approach},
+  journal = {Journal of Monetary Economics},
+  year = {2005},
+  volume = {52},
+  pages = {1151-1166},
+  number = {6},
+  month = {September},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v52y2005i6p1151-1166.html}
+}
+
+@MANUAL{PsTools,
+  TITLE =        {PsTools v2.44},
+  author =       {Russinovich, M.},
+  year =         {2009},
+  note =         {available at Microsoft TechNet, http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx},
+}
+
+@TECHREPORT{Rabanal2001,
+  author = {Pau Rabanal and Juan Francisco Rubio-Ramirez},
+  title = {Comparing new Keynesian models of the Business Cycle: a Bayesian
+	approach},
+  institution = {Federal Reserve Bank of Atlanta},
+  year = {2001},
+  type = {Working Paper},
+  number = {2001-22},
+  note = {available at http://ideas.repec.org/p/fip/fedawp/2003-30.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{RabitzCPC99,
+  author = {H. Rabitz and Ali\c{s},\"{O}. F. and Shorter, J. and Shim, K.},
+  title = {Efficient input-output model representations},
+  journal = {Computer Physics Communications},
+  year = {1999},
+  volume = {117},
+  pages = {11-20}
+}
+
+@CONFERENCE{Ratsimalahelo2001,
+  author = {Ratsimalahelo, Zaka},
+  title = {Specification of VARMA Echelon Form Models},
+  booktitle = {Proceedings IFAC Symposium on Modeling and Control of Economic Systems},
+  year = {2001},
+  editor = {Neck R.},
+  pages = {186-190},
+  publisher = {Elsevier, North-Holland}
+}
+
+@TECHREPORT{Ratsimalahelo2003,
+  author = {Ratsimalahelo, Zaka},
+  title = {Rank Test Based On Matrix Perturbation Theory},
+  institution = {EconWPA},
+  year = {2003},
+  type = {Econometrics},
+  number = {0306008},
+  month = Jun,
+  note = {available at http://ideas.repec.org/p/wpa/wuwpem/0306008.html}
+}
+
+@ARTICLE{Ratto_CompEcon_2008,
+  author = {Ratto, M.},
+  title = {Analysing {DSGE} Models with Global Sensitivity Analysis},
+  journal = {Computational Economics},
+  year = {2008},
+  volume = {31},
+  pages = {115--139}
+}
+
+@ARTICLE{Ratto_et_al2006,
+  author = {M. Ratto and A. Pagano and P.C. Young},
+  title = {State Dependent Parameter meta-modelling and sensitivity analysis},
+  journal = {Journal of the Royal Statistica Society, Series B},
+  year = {2006},
+  note = {under revision}
+}
+
+@TECHREPORT{Ratto_etal_ECFIN_2010,
+  author = {Marco Ratto and Werner Roeger and Jan in 't Veld},
+  title = {Using a {DSGE} model to look at the recent boom-bust cycle in the
+	{US}},
+  institution = {European Commission},
+  year = {2010},
+  type = {European Economy. Economic Papers},
+  number = {397},
+  address = {Brussels},
+  month = {January},
+  url = {http://ec.europa.eu/economy_finance/publications/economic_paper/2010/ecp397_en.htm}
+}
+
+@ARTICLE{Ratto_et_al_EconModel2009,
+  author = {Marco Ratto and Werner Roeger and Jan in 't Veld},
+  title = {{QUEST III}: An estimated open-economy {DSGE} model of the euro area
+	with fiscal and monetary policy},
+  journal = {Economic Modelling},
+  year = {2009},
+  volume = {26},
+  pages = {222 - 233},
+  number = {1},
+  doi = {DOI: 10.1016/j.econmod.2008.06.014},
+  keywords = {{DSGE} modeling},
+  url = {http://www.sciencedirect.com/science/article/B6VB1-4TC8J5F-1/2/7f22da17478841ac5d7a77d06f13d13e}
+}
+
+@TECHREPORT{RattoCEF2006,
+  author = {Ratto, M. and Roeger, W. and in 't Veld, J.},
+  title = {Fiscal Policy in an estimated open-economy model for the {EURO} area},
+  institution = {Society for Computational Economics},
+  year = {2006},
+  type = {Computing in Economics and Finance 2006},
+  note = {available at http://ideas.repec.org/p/sce/scecfa/43.html}
+}
+
+@TECHREPORT{Ratto2005,
+  author = {M. Ratto and W. Roeger and J. In 't Veld and R. Girardi},
+  title = {An Estimated Open-economy Model for the {EURO} {Area}},
+  institution = {Joint Research Centre, European Commission},
+  year = {2005},
+  number = {EUR 21882 EN}
+}
+
+@TECHREPORT{Ratto2005b,
+  author = {M. Ratto and W. Roeger and J. In 't Veld and R. Girardi},
+  title = {An estimated new {Keynesian} dynamic stochastic general equilibrium
+	model of the {Euro} area},
+  institution = {European Commission},
+  year = {2005},
+  type = {Economic Papers. No. 220},
+  number = {EUR 21882 EN},
+  month = {January}
+}
+
+@INPROCEEDINGS{Rattoetal2004,
+  author = {Ratto, M. and Tarantola, S. and Saltelli, A. and Young, P. C.},
+  title = {Accelerated Estimation of Sensitivity Indices Using {State Dependent
+	Parameter} Models},
+  booktitle = {Sensitivity Analysis of Model Output, Proceedings of the 4th International
+	Conference on Sensitivity Analysis of Model Output (SAMO 2004) Santa
+	Fe, New Mexico, March 8-11, 2004.},
+  year = {2004},
+  editor = {Hanson, K. M. and Hemez, F. M.},
+  pages = {61-70},
+  note = {http://library.lanl.gov/ccw/samo2004/},
+  organisation = {Los Alamos National Laboratories}
+}
+
+@TECHREPORT{RattoSDP2006,
+  author = {Ratto, M. and Tarantola, S. and Saltelli, A. and Young, P. C.},
+  title = {Improved and Accelerated Sensitivity Analysis Using {State Dependent
+	Parameter} Models},
+  institution = {Joint Research Centre, European Commission},
+  year = {2006},
+  number = {EUR 22251 EN, ISBN 92-79-02036-6},
+  note = {available at {http://webfarm.jrc.cec.eu.int/uasa/doc/mrat/eur/EUR22251EN.pdf}}
+}
+
+@TECHREPORT{Ravenna2005,
+  author = {Federico Ravenna},
+  title = {Vector Autoregressions and Reduced Form Representations of {DSGE} Models},
+  institution = {Society for Economic Dynamics},
+  year = {2005},
+  type = {2005 Meeting Papers},
+  number = {841},
+  note = {available at http://ideas.repec.org/p/red/sed005/841.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Rayner1991,
+  author = {Rayner, Janne},
+  title = {Another look at the identification of current rational-expectations
+	models},
+  journal = {Journal of Econometrics},
+  year = {1991},
+  volume = {47},
+  pages = {305-331},
+  number = {2-3},
+  month = {February},
+  note = {available at http://ideas.repec.org/a/eee/econom/v47y1991i2-3p305-331.html}
+}
+
+@ARTICLE{RobinSmith2000,
+  author = {Robin, Jean-Marc and Smith, Richard J.},
+  title = {Tests of Rank},
+  journal = {Econometric Theory},
+  year = {2000},
+  volume = {16},
+  pages = {151-1753},
+  number = {2},
+  month = {April},
+  note = {available at http://www.sciencedirect.com/science/article/B6WS7-47CSDW8-KK/2/e4f1e012ed6dce16b1e91bae0f2803c9l}
+}
+
+@TECHREPORT{Roeger97,
+  author = {W. Roeger and J. in 't Veld},
+  title = {QUEST {II}. {A} Multi-Country Business Cycle and Growth Model},
+  institution = {European Commission},
+  year = {1997},
+  type = {Economic Papers. No. 123},
+  number = {II/511/97-EN},
+  address = {Brussels},
+  month = {October}
+}
+
+@INCOLLECTION{RotembergWoodford1997,
+  author = {Julio J. Rotemberg and Michael Woodford},
+  title = {n Optimization-Based Econometric Framework for the Evaluation of
+	Monetary Policy},
+  booktitle = {NBER Macroeconomics Annual},
+  publisher = {MIT Press},
+  year = {1997},
+  editor = {B. Bernanke and J. Rotemberg}
+}
+
+@TECHREPORT{RotembergWoodford1998,
+  author = {Julio J. Rotemberg and Michael Woodford},
+  title = {An Optimization-Based Econometric Framework for the Evaluation of
+	Monetary Policy: Expanded Version},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {1998},
+  type = {NBER Technical Working Papers},
+  number = {0233},
+  month = May,
+  note = {available at http://ideas.repec.org/p/nbr/nberte/0233.html}
+}
+
+@ARTICLE{Rothenberg1971,
+  author = {Rothenberg, Thomas J},
+  title = {Identification in Parametric Models},
+  journal = {Econometrica},
+  year = {1971},
+  volume = {39},
+  pages = {577-91},
+  number = {3},
+  month = {May},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v39y1971i3p577-91.html}
+}
+
+@TECHREPORT{Rothenberg1966,
+  author = {Thomas J. Rothenberg},
+  title = {Efficient Estimation with a priori Information: A Classical Approach},
+  institution = {Cowles Foundation, Yale University},
+  year = {1966},
+  type = {Cowles Foundation Discussion Papers},
+  number = {205},
+  note = {available at http://ideas.repec.org/p/cwl/cwldpp/205.html}
+}
+
+@ARTICLE{Sacks_et_al89,
+  author = {J. Sacks and W.J. Welch and T.J. Mitchell and H.P. Wynn},
+  title = {Design and analysis of computer experiments},
+  journal = {Statistical Science},
+  year = {1989},
+  volume = {4},
+  pages = {409-435}
+}
+
+@ARTICLE{SaltCPC02,
+  author = {Saltelli, A.},
+  title = {Making best use of model valuations to compute sensitivity indices},
+  journal = {Computer Physics Communications},
+  year = {2002},
+  volume = {145},
+  pages = {280-297}
+}
+
+@ARTICLE{Salt_et_al_CHEMREV05,
+  author = {Saltelli, A. and Ratto, M. and Tarantola, S. and Campolongo, F.},
+  title = {Sensitivity Analysis for Chemical Models},
+  journal = {Chemical Reviews},
+  year = {2005},
+  volume = {105},
+  pages = {2811-2828}
+}
+
+@ARTICLE{SaltSobolRESS95,
+  author = {Saltelli, A. and Sobol', I. M.},
+  title = {About the use of rank transformation in sensitivity analysis of model
+	output},
+  journal = {Reliability Engineering and System Safety},
+  year = {1995},
+  volume = {50},
+  pages = {225-239}
+}
+
+@ARTICLE{SaltTaraJASA02,
+  author = {Saltelli, A. and Tarantola, S.},
+  title = {On the relative importance of input factors in mathematical models:
+	safety assessment for nuclear waste disposal},
+  journal = {Journal of American Statistical Association},
+  year = {2002},
+  volume = {97},
+  pages = {702-709}
+}
+
+@BOOK{SaltSAprimer04,
+  title = {'Sensitivity Analysis in Practice: A Guide to Assessing Scientific
+	Models},
+  publisher = {John Wiley and Sons},
+  year = {2004},
+  author = {A. Saltelli and S. Tarantola and F. Campolongo and M. Ratto}
+}
+
+@BOOK{Sargen1988,
+  title = {Lectures on Advanced Econometric Theory},
+  publisher = {Basil Blackwell, Oxford},
+  year = {1988},
+  author = {Denis J. Sargen}
+}
+
+@ARTICLE{Sargent1979,
+  author = {Sargent, T. J.},
+  title = {A Note on Maximum Likelihood Estimation of the Rational Expectations
+	Model of the Term Structure},
+  journal = {Journal of Monetary Economics},
+  year = {1979},
+  volume = {5},
+  pages = {133-143}
+}
+
+@ARTICLE{Sargent1976,
+  author = {Sargent, Thomas J},
+  title = {The Observational Equivalence of Natural and Unnatural Rate Theories
+	of Macroeconomics},
+  journal = {Journal of Political Economy},
+  year = {1976},
+  volume = {84},
+  pages = {631-40},
+  number = {3},
+  month = {June},
+  note = {available at http://ideas.repec.org/a/ucp/jpolec/v84y1976i3p631-40.html}
+}
+
+@TECHREPORT{Sbordone2005,
+  author = {Argia M. Sbordone},
+  title = {A Limited Information Approach to the Simultaneous Estimation of
+	Wage and Price Dynamics},
+  institution = {Society for Computational Economics},
+  year = {2005},
+  type = {Computing in Economics and Finance 2005},
+  number = {321},
+  month = Nov,
+  note = {available at http://ideas.repec.org/p/sce/scecf5/321.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@TECHREPORT{Sbordone2005a,
+  author = {Argia M. Sbordone},
+  title = {Do expected future marginal costs drive inflation dynamics?},
+  institution = {Federal Reserve Bank of New York},
+  year = {2005},
+  type = {Staff Reports},
+  number = {204},
+  note = {available at http://ideas.repec.org/p/fip/fednsr/204.html}
+}
+
+@ARTICLE{Sbordone2002,
+  author = {Sbordone, Argia M.},
+  title = {Prices and unit labor costs: a new test of price stickiness},
+  journal = {Journal of Monetary Economics},
+  year = {2002},
+  volume = {49},
+  pages = {265-292},
+  number = {2},
+  month = {March},
+  note = {available at http://ideas.repec.org/a/eee/moneco/v49y2002i2p265-292.html}
+}
+
+@TECHREPORT{Schmitt-GroheUribe2004,
+  author = {Stephanie Schmitt-Grohe and Martin Uribe},
+  title = {Optimal Operational Monetary Policy in the Christiano-Eichenbaum-Evans
+	Model of the U.S. Business Cycle},
+  institution = {National Bureau of Economic Research, Inc},
+  year = {2004},
+  type = {NBER Working Papers},
+  number = {10724},
+  month = Sep,
+  note = {available at http://ideas.repec.org/p/nbr/nberwo/10724.html}
+}
+
+@INBOOK{Schorfheide2007,
+  chapter = {Bayesian Methods in Macroeconometrics},
+  title = {The New Palgrave Dictionary of Economics},
+  publisher = {Palgrave Macmillan},
+  year = {2007},
+  editor = {S. N. Durlauf and L. E. Blume},
+  author = {Schorfheide, Frank}
+}
+
+@ARTICLE{Schorfheide2000,
+  author = {Schorfheide, F.},
+  title = {Loss function-based evaluation of {DSGE} models},
+  journal = {Journal of Applied Econometrics},
+  year = {2000},
+  volume = {15},
+  pages = {645--670},
+  number = {6},
+  keyword = {model comparison}
+}
+
+@ARTICLE{Schorfheide2000,
+  author = {Frank Schorfheide},
+  title = {Loss function-based evaluation of {DSGE} models},
+  journal = {Journal of Applied Econometrics},
+  year = {2000},
+  volume = {15},
+  pages = {645-670},
+  number = {6},
+  note = {available at http://ideas.repec.org/a/jae/japmet/v15y2000i6p645-670.html}
+}
+
+@ARTICLE{Schweppe1965,
+  author = {Schweppe, F.},
+  title = {Evaluation of likelihood functions for {Gaussian} signals},
+  journal = {IEEE Trans. on Information Theory},
+  year = {1965},
+  volume = {11},
+  pages = {61--70}
+}
+
+@ARTICLE{SegalWeinstein1989,
+  author = {Mordechai Segal and Ehud Weinstein},
+  title = {A new method for evaluating the log-likelihood gradient, the Hessian,
+	and the Fisher information matrix for linear dynamic systems.},
+  journal = {IEEE Transactions on Information Theory},
+  year = {1989},
+  volume = {35},
+  pages = {682-},
+  number = {3},
+  source = {http://dblp.uni-trier.de}
+}
+
+@ARTICLE{ShapiroBrowne1983,
+  author = {A. Shapiro and M. Browne},
+  title = {On the investigation of local identifiability: A counterexample},
+  journal = {Psychometrika},
+  year = {1983},
+  volume = {48},
+  pages = {303-304},
+  number = {2},
+  month = {June},
+  url = {http://ideas.repec.org/a/spr/psycho/v48y1983i2p303-304.html}
+}
+
+@ARTICLE{Sims2002,
+  author = {Sims, C.},
+  title = {Solving rational expectations models},
+  journal = {Computational Economics},
+  year = {2002},
+  volume = {20},
+  pages = {1--20},
+  keyword = {rational expectations}
+}
+
+@ARTICLE{Sims2002,
+  author = {Sims, Christopher A},
+  title = {Solving Linear Rational Expectations Models},
+  journal = {Computational Economics},
+  year = {2002},
+  volume = {20},
+  pages = {1-20},
+  number = {1-2},
+  month = {October},
+  note = {available at http://ideas.repec.org/a/kap/compec/v20y2002i1-2p1-20.html}
+}
+
+@TECHREPORT{Sims1998,
+  author = {Christopher A. Sims and Tao A. Zha},
+  title = {Does monetary policy generate recessions?},
+  institution = {Federal Reserve Bank of Atlanta},
+  year = {1998},
+  type = {Working Paper},
+  number = {98-12},
+  note = {available at http://ideas.repec.org/p/fip/fedawp/98-12.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Sims1998,
+  author = {Sims, C. and Zha, T.},
+  title = {Bayesian Methods for Dynamic Multivariate Models},
+  journal = {International Economic Review},
+  year = {1998},
+  volume = {49},
+  pages = {949--968},
+  keyword = {multivariate}
+}
+
+@TECHREPORT{Smets2007,
+  author = {Smets, Frank and Wouters, Rafael},
+  title = {Shocks and Frictions in US Business Cycles: A Bayesian {DSGE} Approach},
+  institution = {C.E.P.R. Discussion Papers},
+  year = {2007},
+  type = {CEPR Discussion Papers},
+  number = {6112},
+  month = Feb,
+  note = {available at http://ideas.repec.org/p/cpr/ceprdp/6112.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{SmetsWouters2007,
+  author = {Smets, Frank and Wouters, Rafael},
+  title = {Shocks and Frictions in {US} Business Cycles: A {Bayesian} {DSGE}
+	Approach},
+  journal = {The American Economic Review},
+  year = {2007},
+  volume = {97},
+  pages = {586-606},
+  number = {3},
+  month = {June}
+}
+
+@ARTICLE{SmetsWouters2005,
+  author = {Smets, Frank and Wouters, Rafael},
+  title = {Comparing shocks and frictions in US and euro area business cycles:
+	a Bayesian {DSGE} Approach},
+  journal = {Journal of Applied Econometrics},
+  year = {2005},
+  volume = {20},
+  pages = {161-183},
+  number = {2},
+  note = {available at http://ideas.repec.org/a/jae/japmet/v20y2005i2p161-183.html}
+}
+
+@ARTICLE{Smets2003,
+  author = {Smets, F. and Wouters, R.},
+  title = {An Estimated Dynamic Stochastic General Equilibrium Model of the
+	{Euro Area}},
+  journal = {Journal of the European Economic Association},
+  year = {2003},
+  volume = {1},
+  pages = {1123--1175},
+  number = {5},
+  keyword = {euro area}
+}
+
+@ARTICLE{SmetsWouters2003,
+  author = {Frank Smets and Raf Wouters},
+  title = {An Estimated Dynamic Stochastic General Equilibrium Model of the
+	Euro Area},
+  journal = {Journal of the European Economic Association},
+  year = {2003},
+  volume = {1},
+  pages = {1123-1175},
+  number = {5},
+  month = {09},
+  note = {available at http://ideas.repec.org/a/tpr/jeurec/v1y2003i5p1123-1175.html}
+}
+
+@TECHREPORT{SobolLPtau,
+  author = { Sobol', I.M. and Turchaninov V.I. and Levitan, Yu.L. and Shukhman,
+	B.V. },
+  title = {Quasirandom Sequence Generators},
+  institution = {Keldysh Institute of Applied Mathematics, Russian Academy of Sciences},
+  year = {1992},
+  type = {IPM ZAK. NO.30 },
+  address = {Moscow}
+}
+
+@ARTICLE{Sobol98,
+  author = {Sobol', I. M.},
+  title = {On {quasi-Monte Carlo} integrations},
+  journal = {Mathematics and Computers in Simulation},
+  year = {1998},
+  volume = {47},
+  pages = {103-112}
+}
+
+@ARTICLE{Sobol93,
+  author = {Sobol', I. M.},
+  title = {Sensitivity analysis for non-linear mathematical models},
+  journal = {Mathematical Modelling and Computational Experiment},
+  year = {1993},
+  volume = {1},
+  pages = {407-414},
+  note = {English translation of Russian original paper \cite{Sobol9093}}
+}
+
+@ARTICLE{Sobol9093,
+  author = {Sobol', I. M.},
+  title = {Sensitivity estimates for nonlinear mathematical models},
+  journal = {Matematicheskoe Modelirovanie},
+  year = {1990},
+  volume = {2},
+  pages = {112-118},
+  note = {in Russian, translated in English in \cite{Sobol93}}
+}
+
+@ARTICLE{Sobol76,
+  author = {Sobol', I. M.},
+  title = {Uniformly distributed sequences with additional uniformity properties},
+  journal = {USSR Comput. MAth. Math. Phys.},
+  year = {1976},
+  volume = {16},
+  pages = {236-242},
+  number = {5}
+}
+
+@ARTICLE{Sobol95,
+  author = {Sobol', I. M. and Shukhman, B.V.},
+  title = {Integration with quasirandom sequences: {Numerical experience}},
+  journal = {International Journal of Modern Physics C},
+  year = {1995},
+  volume = {6},
+  pages = {263--275},
+  number = {2}
+}
+
+@ARTICLE{StockWright2000,
+  author = {James H. Stock and Jonathan Wright},
+  title = {GMM with Weak Identification},
+  journal = {Econometrica},
+  year = {2000},
+  volume = {68},
+  pages = {1055-1096},
+  number = {5},
+  month = {September},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v68y2000i5p1055-1096.html}
+}
+
+@ARTICLE{StockWrightYogo2002,
+  author = {Stock, James H and Wright, Jonathan H and Yogo, Motohiro},
+  title = {A Survey of Weak Instruments and Weak Identification in Generalized
+	Method of Moments},
+  journal = {Journal of Business \& Economic Statistics},
+  year = {2002},
+  volume = {20},
+  pages = {518-29},
+  number = {4},
+  month = {October},
+  note = {available at http://ideas.repec.org/a/bes/jnlbes/v20y2002i4p518-29.html}
+}
+
+@TECHREPORT{SvenssonWilliams2005,
+  author = {Svensson, Lars E.O. and Williams, Noah},
+  title = {Monetary policy with model uncertainty: distribution forecast targeting},
+  institution = {Deutsche Bundesbank, Research Centre},
+  year = {2005},
+  type = {Discussion Paper Series 1: Economic Studies},
+  number = {2005,35},
+  url = {http://ideas.repec.org/p/zbw/bubdp1/4229.html}
+}
+
+@BOOK{Terceiro1990,
+  title = {Estimation of Dynamic Econometric Models with Errors in Variables},
+  publisher = {Berlin: Springer-Verlag},
+  year = {1990},
+  author = {Terceiro, J}
+}
+
+@ARTICLE{Truong2006py,
+  author = {Truong, N.--V. and Wang, L. and Young, P.C.},
+  title = {Nonlinear System modelling Based on Non-Parametric Identification
+	and Linear Wavelet Estimation of SDP Models},
+  journal = {International Journal of Control},
+  year = {2006},
+  volume = {to appear}
+}
+
+@ARTICLE{Wallis1980,
+  author = {Wallis, Kenneth F},
+  title = {Econometric Implications of the Rational Expectations Hypothesis},
+  journal = {Econometrica},
+  year = {1980},
+  volume = {48},
+  pages = {49-73},
+  number = {1},
+  month = {January},
+  note = {available at http://ideas.repec.org/a/ecm/emetrp/v48y1980i1p49-73.html}
+}
+
+@TECHREPORT{Watson1993,
+  author = {Mark W. Watson},
+  title = {Vector autoregressions and cointegration},
+  institution = {Federal Reserve Bank of Chicago},
+  year = {1993},
+  type = {Working Paper Series, Macroeconomic Issues},
+  number = {93-14},
+  note = {available at http://ideas.repec.org/p/fip/fedhma/93-14.html},
+  owner = {nikolay},
+  timestamp = {2007.06.16}
+}
+
+@ARTICLE{Wegge1983,
+  author = {Wegge, Leon L. and Feldman, Mark},
+  title = {Identifiability criteria for Muth-rational expectations models},
+  journal = {Journal of Econometrics},
+  year = {1983},
+  volume = {21},
+  pages = {245-254},
+  number = {2},
+  month = {February},
+  note = {available at http://ideas.repec.org/a/eee/econom/v21y1983i2p245-254.html}
+}
+
+@BOOK{Woodford2003,
+  title = {Interest and Prices},
+  publisher = {Princeton University Press},
+  year = {2003},
+  author = {Michael Woodford},
+  volume = { },
+  series = { },
+  address = { },
+  edition = { },
+  month = { },
+  note = { },
+  abstract = { },
+  isbn = { },
+  keywords = { }
+}
+
+@BOOK{Wooldridge2002,
+  title = {Econometric Analysis of Cross Section and Panel Data},
+  publisher = {MIT Press},
+  year = {2002},
+  author = {Jeffrey M. Wooldridge}
+}
+
+@ARTICLE{Wright2003,
+  author = {Jonathan H. Wright},
+  title = {Detecting lack of identification in GMM},
+  journal = {Econometric Theory},
+  year = {2003},
+  pages = {322-330},
+  number = {19}
+}
+
+@INCOLLECTION{YoungSDP01,
+  author = {Young, P.C.},
+  title = {The identification and estimation of nonlinear stochastic systems},
+  booktitle = {Nonlinear Dynamics and Statistics},
+  publisher = {Birkhauser},
+  year = {2001},
+  editor = {A. I. Mees et al.},
+  address = {Boston}
+}
+
+@INCOLLECTION{YoungTVPSDP00,
+  author = {Young, P.C.},
+  title = {Stochastic, Dynamic Modelling and Signal Processing: Time Variable
+	and State Dependent Parameter Estimation},
+  booktitle = {Nonlinear and Nonstationary Signal Processing},
+  publisher = {Cambridge University Press},
+  year = {2000},
+  editor = {W. J. Fitzgerald et al.},
+  pages = {74-114},
+  address = {Cambridge}
+}
+
+@INCOLLECTION{YoungTVPSDP02,
+  author = {Young, P.C.},
+  title = {Time variable and state dependent modelling of nonstationary and
+	nonlinear time series},
+  booktitle = {Developments in Time Series Analysis},
+  publisher = {Chapman and Hall},
+  year = {1993},
+  editor = {T. Subba Rao},
+  pages = {374-413},
+  address = {London}
+}
+
+@INCOLLECTION{YoungRSA78,
+  author = {Young, P.C.},
+  title = {A general theory of modelling for badly defined dynamic systems},
+  booktitle = {Modeling, Identification and Control in Environmental Systems},
+  publisher = {North Holland},
+  year = {1978},
+  editor = {Vansteenkiste, G. C.},
+  pages = {103--135},
+  address = {Amsterdam}
+}
+
+@ARTICLE{YoungCPC99,
+  author = {Young, P.C.},
+  title = {Data-based mechanistic modelling, generalised sensitivity and dominant
+	mode analysis},
+  journal = {Computer Physics Communication},
+  year = {1999},
+  volume = {117},
+  pages = {113--129}
+}
+
+@ARTICLE{YoungProgEnvSci99,
+  author = {Young, P.C.},
+  title = {Nonstationary time series analysis and forecasting},
+  journal = {Progress in Environmental Science},
+  year = {1999},
+  volume = {1},
+  pages = {3-48}
+}
+
+@BOOK{YoungBook84,
+  title = {Recursive Estimation and Time-Series Analysis},
+  publisher = {Springer},
+  year = {1984},
+  author = {Young, P.C.}
+}
+
+@ARTICLE{Youngetal01,
+  author = {Young, P.C. and McKenna, P. and Bruun, J.},
+  title = {Identification of nonlinear stochastic systems by state dependent
+	parameter estimation},
+  journal = {International Journal of Control},
+  year = {2001},
+  volume = {74},
+  pages = {1837--1857}
+}
+
+@ARTICLE{Young1989fk,
+  author = {Young, P.C. and Ng, C.N},
+  title = {Variance intervention},
+  journal = {Journal of Forecasting},
+  year = {1989},
+  volume = {8},
+  pages = {399-416}
+}
+
+@ARTICLE{YoungParkinsonDBM96,
+  author = {P.C. Young and S.D. Parkinson and M. Lees},
+  title = {Simplicity out of complexity: Occam's razor revisited},
+  journal = {Journal of Applied Statistics},
+  year = {1996},
+  volume = {23},
+  pages = {165-210}
+}
+
+@ARTICLE{YoungPedregal99,
+  author = {P.C. Young and D.J. Pedregal},
+  title = {Recursive and en-bloc approaches to signal extraction},
+  journal = {Journal of Applied Statistics},
+  year = {1999},
+  volume = {26},
+  pages = {103-128}
+}
+
+@ARTICLE{YoungPedregalTychDHR98,
+  author = {P.C. Young and D.J. Pedregal and W. Tych},
+  title = {Dynamic Harmonic Regression},
+  journal = {Journal of Forecasting},
+  year = {1998},
+  volume = {18},
+  pages = {369-394}
+}
+
+@ARTICLE{Zadrozny1989,
+  author = {P. A. Zadrozny},
+  title = {Analytic derivatives for estimation of linear dynamic models},
+  journal = {Computers and Mathematics with Applications},
+  year = {1989},
+  volume = {18},
+  pages = {539-553},
+  number = {6-7},
+  source = {http://www.sciencedirect.com/science/article/B6TYJ-46NX30F-6/2/dc2cd83cfeb64941e0497dc92ed1ba2e}
+}
+
+@ARTICLE{ZouHastie2005,
+  author = {Zou,Hui and Hastie,Trevor},
+  title = {Regularization and variable selection via the elastic net},
+  journal = {Journal of the Royal Statistical Society: Series B (Statistical Methodology)},
+  year = {2005},
+  volume = {67},
+  pages = {301-320},
+  number = {2},
+  doi = {10.1111/j.1467-9868.2005.00503.x},
+  eprint = {http://www.blackwell-synergy.com/doi/pdf/10.1111/j.1467-9868.2005.00503.x},
+  url = {http://www.blackwell-synergy.com/doi/abs/10.1111/j.1467-9868.2005.00503.x}
+}
+
+@BOOK{SaltSAbook00,
+  title = {Sensitivity Analysis},
+  publisher = {John Wiley and Sons},
+  year = {2000},
+  editor = {A. Saltelli and K. Chan and M. Scott},
+  series = {Wiley Series in Probability and Statistics},
+  address = {New York}
+}
diff --git a/doc/parallel/netbook_complete_comp.pdf b/doc/parallel/netbook_complete_comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ab59b97531acf0c251afdb3533de52003ce42fd5
Binary files /dev/null and b/doc/parallel/netbook_complete_comp.pdf differ
diff --git a/doc/parallel/netbook_complete_openclose.pdf b/doc/parallel/netbook_complete_openclose.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..d57103069edf16015479184f7ec2689e3d0a1099
Binary files /dev/null and b/doc/parallel/netbook_complete_openclose.pdf differ
diff --git a/doc/parallel/netbook_partial_comp.pdf b/doc/parallel/netbook_partial_comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6e8bc584c15163b027878280b15037affb2e1133
Binary files /dev/null and b/doc/parallel/netbook_partial_comp.pdf differ
diff --git a/doc/parallel/netbook_partial_openclose.pdf b/doc/parallel/netbook_partial_openclose.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..3a15fd723215b580b201fc3e686645b92e04b881
Binary files /dev/null and b/doc/parallel/netbook_partial_openclose.pdf differ
diff --git a/doc/parallel/parallel.tex b/doc/parallel/parallel.tex
new file mode 100644
index 0000000000000000000000000000000000000000..b20a8845ccd6b2ca09cbcd5a616b0ce0de6edd0a
--- /dev/null
+++ b/doc/parallel/parallel.tex
@@ -0,0 +1,1238 @@
+% ----------------------------------------------------------------
+% AMS-LaTeX Paper ************************************************
+% **** -----------------------------------------------------------
+\documentclass[12pt,a4paper,pdftex,nofootinbib]{article}
+\usepackage{amssymb,amsmath}
+\usepackage[pdftex]{graphicx}
+\usepackage{epstopdf}
+\usepackage{natbib}
+\usepackage{verbatim}
+\usepackage[pdftex]{color}
+\usepackage{psfrag}
+\usepackage{setspace}
+\usepackage{rotating}
+\usepackage{epsf}
+\usepackage{epsfig}
+
+\newcounter{exmpl}
+\def\etal{{\em et al}.}
+\def\bfp{{\bf p}}
+\def\bfz{{\bf z}}
+\def\bfU{{\bf U}}
+\def\hbfx{{\hat{\bf x}}}
+\def\be{{\begin{equation}}}
+\def\ee{{\end{equation}}}
+\def\bfF{{\bf F}}
+\def\bfP{{\bf P}}
+\def\hbfP{{\hat{\bf P}}}
+\def\bfH{{\bf H}}
+\def\bfG{{\bf G}}
+\def\bfQ{{\bf Q}}
+\def\bfL{{\bf L}}
+\def\bfI{{\bf I}}
+\def\vare{\varepsilon}
+\def\mbfx{{\bf x}}
+\def\mbfH{{\bf H}}
+\def\mbfP{{\bf P}}
+\def\mbfchi{{\mbox{\boldmath$\chi$}}}
+\def\mbfzeta{{\mbox{\boldmath$\zeta$}}}
+\def\mbfeta{{\mbox{\boldmath$\eta$}}}
+\def\ni{{\noindent}}
+\def\mbfx{{\mbox{\boldmath$x$}}}
+
+
+%\bibpunct{(}{)}{;}{a}{,}{,}
+\bibpunct[, ]{(}{)}{;}{a}{,}{,}
+%\pagestyle{headings}
+
+\def \supp{{\rm supp}}
+\def \var{{\rm var}}
+
+% ----------------------------------------------------------------
+\begin{document}
+
+% ----------------------------------------------------------------
+\title{Parallel DYNARE Toolbox\\FP7 Funded \\ Project MONFISPOL Grant no.: 225149}
+
+\author{Marco Ratto\\
+European Commission, Joint Research Centre, Ispra, ITALY
+}
+%%% To have the current date inserted, use \date{\today}:
+%%% To insert a footnote, add thanks in the date/title/author fields:
+\date{\today}
+%\date{\today \thanks{Authors gratefully acknowledge the
+%contribution by ... for ...}}
+\newpage
+\singlespacing
+{\footnotesize
+\maketitle \tableofcontents
+}
+\newpage
+\doublespacing
+%-----------------------------------------------------------------------
+\begin{abstract}
+In this document, we describe the basic ideas and the methodology identified to realize the parallel package within the DYNARE project (called the ``Parallel DYNARE'' hereafter) and its algorithmic performance.
+The parallel methodology has been developed taking into account two different perspectives: the ``User perspective'' and the ``Developers perspective''. The fundamental requirement of the ``User perspective'' is to allow DYNARE users to use the parallel routines easily, quickly and appropriately. Under the ``Developers perspective'', on the other hand, we need to build a core of parallelizing routines that are sufficiently abstract and modular to allow DYNARE software developers to use them easily as a sort of `parallel paradigm', for application to any DYNARE routine or portion of code containing computational intensive loops suitable for parallelization.
+We will finally show tests showing the effectiveness of the parallel implementation.
+\end{abstract}
+% ----------------------------------------------------------------
+\newpage
+\section{The ideas implemented in Parallel DYNARE}
+The basic idea behind ``Parallel Dynare'' is to build a framework to parallelize portions of code that require a minimal (i.e. start-end communication) or no communications between different processes, denoted in the literature as ``embarrassingly parallel'' \citep{GoffeCreel_Grid_2008,Barney_2009}.  In more complicated cases there are different and more sophisticated solutions to write (or re-write) parallel codes using, for example, OpenMP or MPI.
+Within DYNARE, we can find many portions of code with the above features: loops of computational sequences with no interdependency that are coded sequentially. Clearly, this does not make optimal use of computers having 2-4-8, or more cores or CPUs.
+The basic idea is to assign the different and independent computational sequences to different cores, CPU's or computers and coordinating this new distributed computational environment with the following criteria:
+
+\begin{itemize}
+\item provide the necessary input data to any sequence, possibly including results obtained from previous DYNARE sessions (e.g. a first batch of Metropolis iterations);
+\item distribute the workload, automatically balancing between the computational resources;
+\item collect the output data;
+\item ensure the coherence of the results with the original sequential execution.
+\end{itemize}
+
+Generally, during a program execution, the largest computational time is spent to execute nested cycles. For simplicity and without loss in generality we can consider here only \verb"for" cycles (it is possible to demonstrate that any \verb"while" cycle admits an equivalent \verb"for" cycle).
+Then, after identifying the most computationally expensive \verb"for" cycles, we can split their execution (i.e. the number or iterations) between different cores, CPUs, computers. For example, consider the following simple MATLAB piece of code:
+
+\singlespacing
+
+%\begin{table}[!ht]
+%{\small
+{\footnotesize
+\hspace{3cm}
+\begin{tabular}[b]{| p{6cm} |}
+  \hline
+  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
+\begin{verbatim}
+...
+n=2;
+m=10^6;
+Matrix= zeros(n,m);
+for i=1:n,
+    Matrix(i,:)=rand(1,m);
+end,
+Mse= Matrix;
+...
+\end{verbatim}
+\\
+Example \refstepcounter{exmpl} \label{ex:serial} \theexmpl
+\\  \hline
+\end{tabular}
+%\vspace*{\baselineskip}
+}
+%\end{table}
+
+%\hspace{2cm}{\begin{minipage}[c]{5cm}
+%\begin{tabular}{| p{6cm} |}
+%  \hline
+%%\begin{quote}
+%\begin{verbatim}
+%...
+%n=2;
+%m=10^6;
+%Matrix= zeros(n,m);
+%for i=1:n,
+%    Matrix(i,:)=rand(1,m);
+%end,
+%Mse= Matrix;
+%...
+%\end{verbatim}
+%\\  \hline
+%\end{tabular}
+%%\end{quote}
+%\end{minipage}}
+\doublespacing
+
+With one CPU this cycle is executed in sequence: first for \verb"i=1", and then for \verb"i=2". Nevertheless, these 2 iterations are completely independent. Then, from a theoretical point of view, if we have two CPUs (cores) we can rewrite the above code as:
+
+\singlespacing
+{\footnotesize
+\hspace{1cm}\begin{tabular}[b]{| p{10cm} |}
+  \hline
+\begin{verbatim}
+            ...
+            n=2;
+            m=10^6;
+            <provide to CPU1 and CPU2 input data m>
+
+<Execute on CPU1>            <Execute on CPU2>
+Matrix1 = zeros(1,m);         Matrix2 = zeros(1,m);
+Matrix1(1,:)=rand(1,m);       Matrix2(1,:)=rand(1,m);
+save Matrix1                  save Matrix2
+
+            retrieve Matrix1 and Matrix2
+            Mpe(1,:) = Matrix1;
+            Mpe(2,:) = Matrix2;
+\end{verbatim}
+\\
+Example \refstepcounter{exmpl} \label{ex:parallel} \theexmpl\\
+\hline
+\end{tabular}
+}
+\doublespacing
+
+The \verb"for" cycle has disappeared and it has been split into two separated sequences that can be executed in parallel on two CPUs. We have the same result (\verb"Mpa=Mse") but the computational time can be reduced up to 50\%.
+
+\section{The DYNARE environment}
+We have considered the following DYNARE components suitable to be parallelized using the above strategy:
+
+\begin{enumerate}
+\item the Random Walk- (and the analogous Independent-)-Metropolis-Hastings algorithm with multiple chains: the different chains are completely independent and do not require any communication between them, so it can be executed on different cores/CPUs/Computer Network easily;
+\item a number of procedures performed after the completion of Metropolis, that use the posterior MC sample:
+\begin{enumerate}
+\item the diagnostic tests for the convergence of the Markov Chain \\(\texttt{McMCDiagnostics.m});
+\item the function that computes posterior IRF's (\texttt{posteriorIRF.m}).
+\item the function that computes posterior statistics for filtered and smoothed variables, forecasts, smoothed shocks, etc.. \\ (\verb"prior_posterior_statistics.m").
+\item the utility function that loads matrices of results and produces plots for posterior statistics (\texttt{pm3.m}).
+\end{enumerate}
+\end{enumerate}
+
+Unfortunately, MATLAB does not provide commands to simply write parallel code as in Example \ref{ex:parallel} (i.e.  the pseudo-commands : \texttt{<provide inputs>}, \texttt{<execute on CPU>} and \texttt{<retrieve>}). In other words, MATLAB does not allow concurrent programming: it does not support multi-threads, without the use (and purchase) of MATLAB Distributed Computing Toolbox. Then, to obtain the behavior described in Example \ref{ex:parallel}, we had to find an alternative solution.
+
+The solution that we have found can be synthesized as follows:
+
+\begin{quote}
+\emph{When the execution of the code should start in parallel (as in Example \ref{ex:parallel}), instead of running it inside the active MATLAB session, the following steps are performed:
+\begin{enumerate}
+\item the control of the execution is passed to the operating system (Windows/Linux) that allows for multi-threading;
+\item concurrent threads (i.e. MATLAB instances) are launched on different processors/cores/machines;
+\item when the parallel computations are concluded the control is given back to the original MATLAB session that collects the result from all parallel `agents' involved and coherently continue along the sequential computation.
+\end{enumerate}
+}\end{quote}
+
+Three core functions have been developed implementing this behavior, namely \verb"MasterParallel.m", \verb"slaveParallel.m" and \verb"fParallel.m". The first function (\verb"MasterParallel.m") operates at the level of the `master' (original) thread and acts as a wrapper of the portion of code to be distributed in parallel, distributes the tasks and collects the results from the parallel computation. The other functions (\verb"slaveParallel.m" and \verb"fParallel.m") operate at the level of each individual `slave' thread and collect the jobs distributed by the `master', execute them and make the final results available to the master.
+The two different implementations of slave operation comes from the fact that, in a single DYNARE session, there may be a number parallelized sessions that are launched by the master thread. Therefore, those two routines reflect two different versions of the parallel package:
+\begin{enumerate}
+\item the `slave' MATLAB sessions are closed after completion of each single job, and new instances are called for any subsequent parallelized task (\verb"fParallel.m");
+\item once opened, the `slave' MATLAB sessions are kept open during the DYNARE session, waiting for the jobs to be executed, and are only closed upon completion of the DYNARE session on the `master' (\verb"slaveParallel.m").
+\end{enumerate}
+
+We will see that none of the two options is superior to the other, depending on the model size.
+
+
+\section{Installation and utilization}
+Here we describe how to run parallel sessions in DYNARE and, for the developers community, how to apply the package to parallelize any suitable piece of code that may be deemed necessary.
+
+\subsection{Requirements}
+
+\subsubsection{For a Windows grid}
+\begin{enumerate}
+\item a standard Windows network (SMB) must be in place;
+\item PsTools \citep{PsTools} must be installed in the path of the master Windows machine;
+\item the Windows user on the master machine has to be user of any other slave machine in the cluster, and that user will be used for the remote computations.
+\end{enumerate}
+
+\subsubsection{For a UNIX grid}
+\begin{enumerate}
+\item SSH must be installed on the master and on the slave machines;
+\item the UNIX user on the master machine has to be user of any other slave machine in the cluster, and that user will be used for the remote computations;
+\item SSH keys must be installed so that the SSH connection from the master to the slaves can be done without passwords, or using an SSH agent.
+\end{enumerate}
+
+\subsection{The user perspective}
+We assume here that the reader has some familiarity with DYNARE and its use. For the DYNARE users, the parallel routines are fully integrated and hidden inside the DYNARE environment.
+
+\subsubsection{The interface}
+The general idea is to put all the configuration of the cluster in a config file different from the MOD file, and to trigger the parallel computation with option(s) on the \verb"dynare" command line.
+The configuration file is designed as follows:
+\begin{itemize}
+  \item be in a standard location
+   \begin{itemize}
+   \item {\footnotesize\verb"$HOME/.dynare"} under Unix;
+   \item {\footnotesize\verb"c:\Documents and Setting\<username>\Application Data\dynare.ini"} on Windows;
+   \end{itemize}
+  \item have provisions for other Dynare configuration parameters unrelated to parallel computation
+  \item allow to specify several clusters, each one associated with a nickname;
+  \item For each cluster, specify a list of slaves with a list of options for each slave [if not explicitly specified by the configuration file, the preprocessor sets the options to default];
+\end{itemize}
+
+The list of slave options includes:
+\begin{description}
+\item[Name]: name of the node;
+\item[CPUnbr]:  this is the number of CPU's to be used on that computer; if \verb"CPUnbr" is a vector of integers, the syntax is \verb"[s:d]", with \verb"d>=s" (\verb"d, s" are integer); the first core has number 1 so that, on a quad-core, use \verb"4" to use all cores, but use \verb [3:4] to specify just the last two cores (this is particularly relevant for Windows where it is possible to assign jobs to specific processors);
+\item[ComputerName]: Computer name on the network or IP address; use the NETBIOS name under Windows\footnote{In Windows XP it is possible find this name in 'My Computer' $->$ mouse right click $->$ 'Property' $->$ 'Computer Name'.}, or the DNS name under Unix.;
+\item[UserName]: required for remote login; in order to assure proper communications between the master and the slave threads, it must be the same user name actually logged on the `master' machine. On a Windows network, this is in the form \verb"DOMAIN\username", like \verb"DEPT\JohnSmith", i.e. user JohnSmith in windows group DEPT;
+\item[Password]: required for remote login (only under Windows): it is the user password on \verb"DOMAIN" and \verb"ComputerName";
+\item[RemoteDrive]: Drive to be used on remote computer (only for Windows, for example the drive \verb"C" or drive \verb"D");
+\item[RemoteDirectory]: Directory to be used on remote computer, the parallel toolbox will create a new empty temporary subfolder which will act as remote working directory;
+\item[DynarePath]: path to matlab directory within the Dynare installation directory;
+\item[MatlabOctavePath]: path to MATLAB or Octave executable;
+\item[SingleCompThread]: disable MATLAB's native multithreading;
+\end{description}
+
+Those options have the following specifications:
+
+\singlespacing  \noindent
+{\footnotesize
+      \begin{tabular}{|l|l|l|l|l|l|l|}
+        \hline
+        % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
+ Node Options & type & default & \multicolumn{2}{c|}{Win} & \multicolumn{2}{c|}{Unix} \\
+ & &  & Local & Remote & Local & Remote \\ \hline
+ Name & string & (stop) & *&*&*&*\\
+ CPUnbr & integer & (stop) &*&*&*&*\\
+  & or array & & & & & \\
+ ComputerName & string & (stop) & &*& &*\\
+ UserName & string & empty & &*& &*\\
+ Password & string & empty & &*& & \\
+ RemoteDrive & string & empty & &*& & \\
+ RemoteDirectory & string & empty & &*& &*\\
+ DynarePath & string & empty & & & & \\
+ MatlabOctavePath & string & empty & & & & \\
+ SingleCompThread & boolean & true & & & & \\
+        \hline
+      \end{tabular}
+}
+\doublespacing
+
+\vspace{1cm}
+The cluster options are as follows
+
+\singlespacing \noindent
+{\footnotesize
+      \begin{tabular}{|l|l|l|l|l|}
+        \hline
+ Cluster Options & type & default & Meaning & Required \\ \hline
+ Name & string & empty & name of the node &*\\
+ Members & string & empty & list of members in this cluster &*\\
+        \hline
+      \end{tabular}
+}
+\doublespacing
+
+\vspace{1cm}
+The syntax of the configuration file will take the following form (the order in which the clusters and nodes are listed is not significant):
+
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = c1
+Members = n1 n2 n3
+
+[cluster]
+Name = c2
+Members = n2 n3
+
+[node]
+Name = n1
+ComputerName = localhost
+CPUnbr = 1
+
+[node]
+Name = n2
+ComputerName = karaba.cepremap.org
+CPUnbr = 5
+UserName = houtanb
+RemoteDirectory = /home/houtanb/Remote
+DynarePath = /home/houtanb/dynare/matlab
+MatlabOctavePath = matlab
+
+[node]
+Name = n3
+ComputerName = hal.cepremap.ens.fr
+CPUnbr = 3
+UserName = houtanb
+RemoteDirectory = /home/houtanb/Remote
+DynarePath = /home/houtanb/dynare/matlab
+MatlabOctavePath = matlab
+ \end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+
+Finally, the DYNARE command line options are:
+ \begin{itemize}
+  \item \verb"conffile=<path>": specify the location of the configuration file if it is not standard
+  \item \verb"parallel": trigger the parallel computation using the first cluster specified in config file
+  \item \verb"parallel=<clustername>": trigger the parallel computation, using the given cluster
+  \item \verb"parallel_slave_open_mode": use the leaveSlaveOpen mode in the cluster
+  \item \verb"parallel_test": just test the cluster, don�t actually run the MOD file
+
+ \end{itemize}
+
+
+
+\subsubsection{Preprocessing cluster settings}
+The DYNARE pre-processor treats user-defined configurations by filling a new sub-structure in the \verb"options_" structure, named \verb"parallel", with the following fields:
+
+\singlespacing
+{\footnotesize
+\hspace{3cm}\begin{tabular}[b]{| p{7cm} |}
+  \hline
+\begin{verbatim}
+options_.parallel=
+    struct('Local', Value,
+    'ComputerName', Value,
+    'CPUnbr', Value,
+    'UserName', Value,
+    'Password', Value,
+    'RemoteDrive', Value,
+    'RemoteFolder', Value,
+    'MatlabOctavePath', Value,
+    'DynarePath', Value);
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+
+All these fields correspond to the slave options except \verb"Local", which is set by the pre-processor according to the value of \verb"ComputerName":	
+\begin{description}
+\item[Local:] the variable \verb"Local" is binary, so it can have only two values 0 and 1. If \verb"ComputerName" is set to \verb"localhost", the preprocessor sets \verb"Local = 1" and the parallel computation is executed on the local machine, i.e. on the same computer (and working directory) where the DYNARE project is placed. For any other value for \verb"ComputerName", we will have \verb"Local = 0";
+\end{description}
+
+In addition to the \verb"parallel" structure, which can be in a vector form, to allow specific entries for each slave machine in the cluster, there is another \verb"options_" field, called \verb"parallel_info", which stores all options that are common to all cluster. Namely, according to the \verb"parallel_slave_open_mode" in the command line, the \verb"leaveSlaveOpen" field takes values:
+\begin{description}
+\item[\texttt{leaveSlaveOpen=1}]: with \verb"parallel_slave_open_mode", i.e. the slaves operate `Always-Open'.
+\item[\texttt{leaveSlaveOpen=0}]: without \verb"parallel_slave_open_mode", i.e. the slaves operate `Open-Close';
+\end{description}
+
+
+\subsubsection{Example syntax for Windows and Unix, for local parallel runs (assuming quad-core)}
+In this case, the only slave options are \verb"ComputerName" and \verb"CPUnbr".
+
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = local
+Members = n1
+
+[node]
+Name = n1
+ComputerName = localhost
+CPUnbr = 4
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+
+\subsubsection{Examples of Windows syntax for remote runs}
+\begin{itemize}
+\item the Windows \verb"Password" has to be typed explicitly;
+\item \verb"RemoteDrive" has to be typed explicitly;
+\item for \verb"UserName", ALSO the group has to be specified, like \verb"DEPT\JohnSmith", i.e. user \verb"JohnSmith" in windows group \verb"DEPT";
+\item \verb"ComputerName" is the name of the computer in the windows network, i.e. the output of hostname, or the full IP address.
+\end{itemize}
+
+\begin{description}
+\item[Example 1] Parallel codes that are run on a remote computer named \verb"vonNeumann" with eight cores, using only the cores 4,5,6, working on the drive 'C' and folder '\verb"dynare_calcs\Remote"'. The computer \verb"vonNeumann" is in a net domain of the CompuTown university, with user \verb"John" logged with the password \verb"*****":
+
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = vonNeumann
+Members = n2
+
+[node]
+Name = n2
+ComputerName = vonNeumann
+CPUnbr = [4:6]
+UserName = COMPUTOWN\John
+Password = *****
+RemoteDrive = C
+RemoteDirectory = dynare_calcs\Remote
+DynarePath = c:\dynare\matlab
+MatlabOctavePath = matlab
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+
+\item[Example 2] We can build a cluster, combining local and remote runs. For example the following configuration file includes the two previous configurations but also gives the possibility (with cluster name \verb"c2") to build a grid with a total number of 7 CPU's :
+
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = local
+Members = n1
+
+[cluster]
+Name = vonNeumann
+Members = n2
+
+[cluster]
+Name = c2
+Members = n1 n2
+
+[node]
+Name = n1
+ComputerName = localhost
+CPUnbr = 4
+
+[node]
+Name = n2
+ComputerName = vonNeumann
+CPUnbr = [4:6]
+UserName = COMPUTOWN\John
+Password = *****
+RemoteDrive = C
+RemoteDirectory = dynare_calcs\Remote
+DynarePath = c:\dynare\matlab
+MatlabOctavePath = matlab
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+\item[Example 3] We can build a cluster, combining many remote machines. For example the following commands build a grid of four machines with a total number of 14 CPU's:
+
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = c4
+Members = n1 n2 n3 n4
+
+[node]
+Name = n1
+ComputerName = vonNeumann1
+CPUnbr = 4
+UserName = COMPUTOWN\John
+Password = *****
+RemoteDrive = C
+RemoteDirectory = dynare_calcs\Remote
+DynarePath = c:\dynare\matlab
+MatlabOctavePath = matlab
+
+[node]
+Name = n2
+ComputerName = vonNeumann2
+CPUnbr = 4
+UserName = COMPUTOWN\John
+Password = *****
+RemoteDrive = C
+RemoteDirectory = dynare_calcs\Remote
+DynarePath = c:\dynare\matlab
+MatlabOctavePath = matlab
+
+[node]
+Name = n3
+ComputerName = vonNeumann3
+CPUnbr = 2
+UserName = COMPUTOWN\John
+Password = *****
+RemoteDrive = D
+RemoteDirectory = dynare_calcs\Remote
+DynarePath = c:\dynare\matlab
+MatlabOctavePath = matlab
+
+[node]
+Name = n4
+ComputerName = vonNeumann4
+CPUnbr = 4
+UserName = COMPUTOWN\John
+Password = *****
+RemoteDrive = C
+RemoteDirectory = John\dynare_calcs\Remote
+DynarePath = c:\dynare\matlab
+MatlabOctavePath = matlab
+
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+\end{description}
+
+
+
+\subsubsection{Example Unix syntax for remote runs}
+\begin{itemize}
+\item no \verb"Password" and \verb"RemoteDrive" fields are needed;
+\item \verb"ComputerName" is the full IP address or the DNS address.
+\end{itemize}
+
+\begin{description}
+\item[One remote slave:] the following command defines remote runs on the machine \verb"name.domain.org".\\
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = unix1
+Members = n2
+
+[node]
+Name = n2
+ComputerName = name.domain.org
+CPUnbr = 4
+UserName = JohnSmith
+RemoteDirectory = /home/john/Remote
+DynarePath = /home/john/dynare/matlab
+MatlabOctavePath = matlab
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+\item[Combining local and remote runs:] the following commands define a cluster of local an remote CPU's.
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{8cm} |}
+  \hline
+\begin{verbatim}
+[cluster]
+Name = unix2
+Members = n1 n2
+
+[node]
+Name = n1
+ComputerName = localhost
+CPUnbr = 4
+
+[node]
+Name = n2
+ComputerName = name.domain.org
+CPUnbr = 4
+UserName = JohnSmith
+RemoteDirectory = /home/john/Remote
+DynarePath = /home/john/dynare/matlab
+MatlabOctavePath = matlab
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+\end{description}
+
+\subsubsection{Testing the cluster}
+
+In this section we describe what happens when the user omits a mandatory entry or provides bad values for them and how DYNARE reacts in these cases. In the parallel package there is a utility (\verb"AnalyseComputationalEnvironment.m") devoted to this task (this is triggered by the command line option \verb"parallel_test"). When necessary during the discussion, we use the \verb"parallel" entries used in the previous examples.
+
+%Le parti in rosa sono una possibile reazione ad un errore che pu� accadere � vanno concordate e quindi magari riviste.
+
+\begin{description}
+%\item[Local:] if no value is given for this variable the execution is stopped when DYNARE starts. More serious if we give a bad value (i.e. for example -1, 3), DYNARE will be stopped after some time with no error message! In these cases the Dynare �
+\item[ComputerName:] If \verb"Local=0", DYNARE checks if the computer \verb"vonNeumann" exists and if it is possible communicate with it. If this is not the case, an error message is generated and the computation is stopped.
+\item[CPUnbr:] a value for this variable must be in the form \verb"[s:d]" with \verb"d>=s". If the user types  values \verb"s>d", their order is flipped and a warning message is sent. When the user provides a correct value for this field, DYNARE checks if \verb"d" CPUs (or cores) are available on the computer. Suppose that this check returns an integer \verb"nC". We can have three possibilities:
+    \begin{enumerate}
+    \item \verb"nC= d;" all the CPU's available are used, no warning message are generated by DYNARE;
+    \item \verb"nC> d;" some CPU's will not be used;
+    \item \verb"nC< d;" DYNARE alerts the user that there are less CPU's than those declared. The parallel tasks would run in any case, but some CPU's will have multiple instances assigned, with no gain in computational time.
+    \end{enumerate}
+\item[UserName \& Password:] if \verb"Local = 1", no information about user name and password is necessary: ``I am working on this computer''. When remote computations on a Windows network are required, DYNARE checks if the user name and password are correct, otherwise execution is stopped with an error; for a Unix network, the user and the proper operation of SSH is checked;
+\item[RemoteDrive \& RemoteDirectory:] if \verb"Local = 1", these fields are not required since the working directory of the `slaves' will be the same of the `master'. If \verb"Local = 0", DYNARE tries to copy a file (\verb"Tracing.txt") in this remote location. If this operation fails, the DYNARE execution is stopped with an error;
+\item[MatlabOctavePath \& DynarePath:] MATLAB instances are tried on slaves and the DYNARE path is checked.
+\end{description}
+
+
+\subsection{The Developers perspective}
+%L'esposizione nel seguito (e anche in alcuni punti su) dipende molto da come il pacchetto parallelo viene rilasciato in Dynare, e quindi se PsTools viene installato durante l'installazione di Dynare oppure no, se le directory necessarie alla computazione vengono create durante l'installazione di Dynare oppure no. E cose cos� ...
+
+In this section we describe with some accuracy the DYNARE parallel routines.
+\begin{description}
+\item[Windows:]
+With Windows operating system, the parallel package requires the installation of a free software package called PsTools \citep{PsTools}. PsTools suite is a resource kit with a number of command line tools that mimics administrative features available under the Unix environment. PsTools can be downloaded from \cite{PsTools} and extracted in a Windows directory on your computer: to make PsTools working properly, it is mandatory to add this directory to the Windows path. After this step it is possible to invoke and use the PsTools commands from any location in the Windows file system. PsTools, MATLAB and DYNARE have to be installed and work properly on all the machines in the grid for parallel computation.
+\item[Unix:]
+With Unix operating system, SSH must be installed on the master and on the slave machines. Moreover, SSH keys must be installed so that the SSH connections from the master to the slaves can be done without passwords.
+\end{description}
+
+% NO DEFAULT REMOTE FOLDER !!!!!!
+%\item the creation of a directory devoted to the local/remote computation and data exchanges. %We usually create this directory on local drive 'C' within a directory '\verb"dynare_calcs"' and call it 'Remote', i.e. '\verb"C:\dynare_calcs\Remote"'. In this way the default value for RemoteDrive \& RemoteDirectory will be 'C' \& '\verb"C:\dynare_calcs\Remote"'.
+
+As soon as the computational environment is set-up for working on a grid of CPU's, the parallel package allows to parallelize any loop that is computationally expensive, following the step by step procedure showed in Table \ref{tab:devpar}. This is done using five basic functions: \verb"masterParallel.m", \verb"fParallel.m" or \verb"slaveParallel.m", \verb"fMessageStatus.m", \verb"closeSlave.m".
+
+\begin{description}
+ \item[\texttt{masterParallel}] is the entry point to the parallelization system:
+ \begin{itemize}
+  \item It is called from the master computer, at the point where the parallelization system should be activated. Its main arguments are the name of the function containing the task to be run on every slave computer, inputs to that function stored in two structures (one for local and the other for global variables), and the configuration of the cluster; this function exits when the task has finished on all computers of the cluster, and returns the output in a structure vector (one entry per slave);
+  \item all file exchange through the filesystem is concentrated in this \verb"masterParallel" routine: so it prepares and send the input information for slaves, it retrieves from slaves the info about the status of remote computations stored on remote slaves by the remote processes; finally it retrieves outputs stored on remote machines by slave processes;
+  \item there are two modes of parallel execution, triggered by option \verb"parallel_slave_open_mode":
+   \begin{itemize}
+   \item when \verb"parallel_slave_open_mode=0", the slave processes are closed after the completion of each task, and new instances are initiated when a new job is required; this mode is managed by \verb"fParallel.m" [`Open-Close'];
+   \item when \verb"parallel_slave_open_mode=1", the slave processes are kept running after the completion of each task, and wait for new jobs to be performed; this mode is managed by \texttt{slaveParallel.m} [`Always-Open'];
+   \end{itemize}
+  \end{itemize}
+ \item[\texttt{slaveParallel.m/fParallel.m}:] are the top-level functions to be run on every slave; their main arguments are the name of the function to be run (containing the computing task), and some information identifying the slave; the functions use the input information that has been previously prepared and sent by \verb"masterParallel" through the filesystem, call the computing task, finally the routines store locally on remote machines the  outputs such that \verb"masterParallel" retrieves back the outputs to the master computer;
+ \item[\texttt{fMessageStatus.m}:] provides the core for simple message passing during slave execution: using this routine, slave processes can store locally on remote machine basic info on the progress of computations; such information is retrieved by the master process (i.e. \verb"masterParallel.m") allowing to echo progress of remote computations on the master; the routine \verb"fMessageStatus.m" is also the entry-point where a signal of interruption sent by the master can be checked and executed; this routine typically replaces calls to \verb"waitbar.m";
+ \item[\texttt{closeSlave.m}] is the utility that sends a signal to remote slaves to close themselves. In the standard operation, this is only needed with the `Always-Open' mode and it is called when DYNARE computations are completed. At that point, \texttt{slaveParallel.m} will get a signal to terminate and no longer wait for new jobs. However, this utility is also useful in any parallel mode if, for any reason, the master needs to interrupt the remote computations which are running;
+ \end{description}
+
+The parallel toolbox also includes a number of utilities:
+\begin{itemize}
+ \item \verb"AnalyseComputationalEnviroment.m": this a testing utility that checks that the cluster works properly and echoes error messages when problems are detected;
+ \item \verb"InitializeComputationalEnviroment.m" : initializes some internal variables and remote directories;
+ \item \verb"distributeJobs.m": uses a simple algorithm to distribute evenly jobs across the available CPU's;
+ \item a number of generalized routines that properly perform \verb"delete", \verb"copy", \verb"mkdir", \verb"rmdir" commands through the network file-system (i.e. used from the master to operate on slave machines); the routines are adaptive to the actual environment (Windows or Unix);
+ \begin{description}
+  \item[\texttt{dynareParallelDelete.m}]: generalized \verb"delete";
+  \item[\texttt{dynareParallelDir.m}]: generalized \verb"dir";
+  \item[\texttt{dynareParallelGetFiles.m}]: generalized \verb"copy" FROM slaves TO master machine;
+  \item[\texttt{dynareParallelMkDir.m}]: generalized \verb"mkdir" on remote machines;
+  \item[\texttt{dynareParallelRmDir.m}]: generalized \verb"rmdir" on remote machined;
+  \item[\texttt{dynareParallelSendFiles.m}]: generalized \verb"copy" TO slaves FROM master machine;
+ \end{description}
+\end{itemize}
+
+In Table \ref{tab:devpar} we have synthesized the main steps for parallelizing MATLAB codes.
+
+{\small
+\begin{table}
+\begin{tabular}{|p{\linewidth}|}
+\hline
+\begin{enumerate}
+\item locate within DYNARE the portion of code suitable to be parallelized, i.e. an expensive cycle \verb"for";
+\item suppose that the function \verb"tuna.m" contains a cycle \verb"for" that is suitable for parallelization: this cycle has to be extracted from \verb"tuna.m" and put it in a new MATLAB function named \verb"tuna_core.m";
+\item at the point where the expensive cycle should start, the function \verb"tuna.m" invokes the utility \verb"masterParallel.m", passing to it the \verb"options_.parallel" structure, the name of the of the function to be run in parallel (\verb"tuna_core.m"), the local and global variables needed and all the information about the files (MATLAB functions \verb"*.m"; data files \verb"*.mat") that will be handled by \verb"tuna_core.m";
+\item the function \verb"masterParallel.m" reads the input arguments provided by \verb"tuna.m" and:
+\begin{itemize}
+\item decides how to distribute the task evenly across the available CPU's (using the utility routine \verb"distributeJobs.m"); prepares and initializes the computational environment (i.e. copy files/data) for each slave machine;
+\item uses the PsTools and the Operating System commands to launch new MATLAB instances, synchronize the computations, monitor the progress of slave tasks through a simple message passing system (see later) and collect results upon completion of the slave threads;
+\end{itemize}
+\item the slave threads are executed using the MATLAB functions \verb"fParallel.m"/\verb"slaveParallel.m" as wrappers for implementing the tasks sent by the master (i.e. to run the \verb"tuna_core.m" routine);
+\item the utility \verb"fMessageStatus.m" can be used within the core routine \verb"tuna_core.m" to send information to the master regarding the progress of the slave thread;
+\item when all DYNARE computations are completed, \verb"closeSlave.m" closes all open remote MATLAB/OCTAVE instances waiting for new jobs to be run.
+\end{enumerate}
+\\ \hline
+\end{tabular}
+\caption{Procedure for parallelizing portions of codes.}\label{tab:devpar}
+\end{table}
+}
+
+So far, we have parallelized the following functions, by selecting the most computationally intensive loops:
+\begin{enumerate}
+\item the cycle looping for multiple chain random walk Metropolis:\\
+\verb"random_walk_metropolis_hastings", \\
+\verb"random_walk_metropolis_hastings_core";
+\item the cycle looping for multiple chain independent Metropolis:\\
+\verb"independent_metropolis_hastings.m", \\
+\verb"independent_metropolis_hastings_core.m";
+\item the cycle looping over estimated parameters computing univariate diagnostics:\\
+\verb"McMCDiagnostics.m", \\
+\verb"McMCDiagnostics_core.m";
+\item the Monte Carlo cycle looping over posterior parameter subdraws performing the IRF simulations (\verb"<*>_core1") and the cycle looping over exogenous shocks plotting IRF's charts (\verb"<*>_core2"):\\
+\verb"posteriorIRF.m", \\\verb"posteriorIRF_core1.m", \verb"posteriorIRF_core2.m";
+\item the Monte Carlo cycle looping over posterior parameter subdraws, that computes filtered, smoothed, forecasted variables and shocks:\\
+\verb"prior_posterior_statistics.m", \\
+\verb"prior_posterior_statistics_core.m";
+\item the cycle looping over endogenous variables making posterior plots of filter, smoother, forecasts:
+\verb"pm3.m", \verb"pm3_core.m".
+\end{enumerate}
+%A developer can use the existent functions \verb"masterParalle.m" and \verb"fParalell.m"  a couple of functions already parallelized as example and then to add new parallel routine in Dynare.
+%Remember that, from the user side to use the parallel routines it is only required to insert in the .mod file the commands the \verb"options_.parallel" structure as described above (see also [2, 5]). If the file \verb".mod" do not contain this structure (or it is commented) Dynare is executed in a traditional way.
+
+\subsubsection{Write a parallel code: an example}
+%Per questo paragrafo ci sono secondo me due soluzioni possibili:
+%
+%1.
+%
+Using a MATLAB pseudo (but very realistic) code, we now describe in detail how to use the above step by step procedure to parallelize the random walk Metropolis Hastings algorithm. Any other function can be parallelized in the same way.
+
+It is obvious that most of the computational time spent by the \\ \verb"random_walk_metropolis_hastings.m" function is given by the cycle looping over the parallel chains performing the Metropolis:
+
+\singlespacing
+{\footnotesize
+\hspace{2cm}\begin{tabular}[b]{| p{9cm} |}
+  \hline
+\begin{verbatim}
+function random_walk_metropolis_hastings
+       (TargetFun, ProposalFun, ..., varargin)
+[...]
+for b = fblck:nblck,
+...
+end
+[...]
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+
+Since those chains are totally independent, the obvious way to reduce the computational time is to parallelize this loop, executing the \verb"(nblck-fblck)" chains on different computers/CPUs/cores.
+
+%\singlespacing
+%{\footnotesize
+%\hspace{2cm}\begin{tabular}[b]{| p{9cm} |}
+%  \hline
+%\begin{verbatim}
+%...
+%if (nblck>fblck) & (number of available CPUs >1)
+%execute
+%the	nblck - nblck branch on CPU 1
+%	    	(nblck+1) - (nblck+1) on CPU 2
+%		[...]
+%		Fblck - fblck on CPU F
+%else
+%	for b = fblck:nblck,
+%...
+%end
+%end
+%...
+%\end{verbatim}
+%\\ \hline
+%\end{tabular}
+%}
+%\doublespacing
+
+To do so, we remove the \verb"for" cycle and put it in a new function named \verb"<*>_core.m":
+
+\singlespacing
+{\footnotesize
+\noindent\begin{tabular}[b]{| p{\linewidth} |}
+\hline
+\begin{verbatim}
+function myoutput =
+    random_walk_metropolis_hastings_core(myinputs,fblck,nblck, ...)
+[...]
+\end{verbatim}
+just list global variables needed (they are set-up properly by \verb"fParallel" or \verb"slaveParallel")
+\begin{verbatim}
+global bayestopt_ estim_params_ options_  M_ oo_
+\end{verbatim}
+here we collect all local variables stored in \verb"myinputs"
+\begin{verbatim}
+TargetFun=myinputs.TargetFun;
+ProposalFun=myinputs.ProposalFun;
+xparam1=myinputs.xparam1;
+[...]
+\end{verbatim}
+here we run the loop
+\begin{verbatim}
+for b = fblck:nblck,
+...
+end
+[...]
+\end{verbatim}
+here we wrap all output arguments needed by the `master' routine
+\begin{verbatim}
+myoutput.record = record;
+[...]
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+The split of the \verb"for" cycle has to be performed in such a way that the new \verb"<*>_core" function can work in both serial and parallel mode. In the latter case, such a function will be invoked by the slave threads and executed for the number of iterations assigned by \verb"masterParallel.m".
+
+The modified \verb"random_walk_metropolis_hastings.m" is therefore:
+
+\singlespacing
+{\footnotesize
+\noindent\begin{tabular}[b]{| p{\linewidth} |}
+\hline
+\begin{verbatim}
+function random_walk_metropolis_hastings(TargetFun,ProposalFun,�,varargin)
+[...]
+% here we wrap all local variables needed by the <*>_core function
+localVars = struct('TargetFun', TargetFun, ...
+[...]
+    'd', d);
+[...]
+% here we put the switch between serial and parallel computation:
+if isnumeric(options_.parallel) || (nblck-fblck)==0,
+% serial computation
+    fout = random_walk_metropolis_hastings_core(localVars, fblck,nblck, 0);
+    record = fout.record;
+
+else
+% parallel computation
+
+    % global variables for parallel routines
+    globalVars = struct('M_',M_, ...
+                       [...]
+                       'oo_', oo_);
+
+    % which files have to be copied to run remotely
+    NamFileInput(1,:) = {'',[ModelName '_static.m']};
+    NamFileInput(2,:) = {'',[ModelName '_dynamic.m']};
+    [ ...]
+
+    % call the master parallelizing utility
+    [fout, nBlockPerCPU, totCPU] = masterParallel(options_.parallel, ...
+    fblck, nblck, NamFileInput, 'random_walk_metropolis_hastings_core',
+    localVars, globalVars, options_.parallel_info);
+
+    % collect output info from parallel tasks provided in fout
+    [ ...]
+end
+
+% collect output info from either serial or parallel tasks
+irun = fout(1).irun;
+NewFile = fout(1).NewFile;
+[...]
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+
+Finally, in order to allow the master thread to monitor the progress of the slave threads, some message passing elements have to be introduced in the \verb"<*>_core.m" file. The utility function \verb"fMessageStatus.m" has been  designed as an interface for this task, and can be seen as a generalized form of the MATLAB utility \verb"waitbar.m".
+
+In the following example, we show a typical use of this utility, again from the random walk Metropolis routine:
+\singlespacing
+{\footnotesize
+\noindent\begin{tabular}[b]{| p{\linewidth} |}
+\hline
+\begin{verbatim}
+for  j = 1:nruns
+[...]
+% define the progress of the loop:
+prtfrc = j/nruns;
+
+% define a running message:
+% first indicate which chain is running on the current CPU [b]
+% out of the chains [mh_nblock] requested by the DYNARE user
+waitbarString = [ '(' int2str(b) '/' int2str(mh_nblck) ') ...
+
+% then add possible further information, like the acceptation rate
+    ' sprintf('%f done, acceptation rate %f',prtfrc,isux/j)]
+
+    if mod(j, 3)==0 & ~whoiam
+        % serial computation
+        waitbar(prtfrc,hh,waitbarString);
+
+    elseif mod(j,50)==0 & whoiam,
+        % parallel computation
+        fMessageStatus(prtfrc, ...
+            whoiam, ...
+            waitbarString, ...
+            waitbarTitle, ...
+            options_.parallel(ThisMatlab))
+
+    end
+    [...]
+end
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+In the previous example, a number of arguments are used to identify which CPU and which computer in the claster is sending the message, namely:
+\singlespacing
+{\footnotesize
+\noindent\begin{tabular}[b]{| p{\linewidth} |}
+\hline
+\begin{verbatim}
+%  whoiam [int]         index number of this CPU among all CPUs in the
+%                       cluster
+%  ThisMatlab [int]     index number of this slave machine in the cluster
+%                       (entry in options_.parallel)
+\end{verbatim}
+\\ \hline
+\end{tabular}
+}
+\doublespacing
+The message is stored as a MATLAB data file \verb"*.mat" saved on the working directory of remote slave computer. The master will will check periodically for those messages and retrieve the files from remote computers and produce an advanced monitoring plot.
+
+So, assuming to run two Metropolis chains, under the standard serial implementation there will be a first \verb"waitbar" popping up on matlab, corresponding to the first chain:
+
+\hspace{2cm}\epsfxsize=200pt \epsfbox{waitbars1.pdf}
+
+\ni followed by a second \texttt{waitbar}, when the first chain is completed.
+
+\hspace{2cm}\epsfxsize=200pt \epsfbox{waitbars2.pdf}
+
+On the other hand, under the parallel implementation, a parallel monitoring plot will be produced by \texttt{masterParallel.m}:
+
+\hspace{2cm}\epsfxsize=200pt \epsfbox{waitbarsP.pdf}
+
+
+
+%Finally we describe the masterParallel.m and fParallel.m functions:
+%
+%\begin{verbatim}
+%function Results= masterParallel (DATA, functionName)
+%
+%[...]
+%
+%read  options_.parallel;
+%call the function rACE=AnalyseComputationalEnviroment (options_.parallel);
+%
+%switch rACE
+%	[...]
+%end
+%[...]
+%\end{verbatim}
+
+%Non so se pu� andare bene impostata in questo modo � se va bene la concludo.
+%
+%2.
+%Prendiamo il tutto il lavoro fatto per arrivare a parallellizzare la PosteriorIRF,
+%Traacianti, anlisi computazionale � commentiamo bene tutte le funzioni coinvolte e le usiamo qui �
+	
+
+\section{Parallel DYNARE: testing}
+We checked the new parallel platform for DYNARE performing a number of tests, using different models and computer architectures. We present here all tests performed with Windows Xp/Matlab. However, similar tests were performed successfully under Linux/Ubuntu environment.
+In the Bayesian estimation of DSGE models with DYNARE, most of the computing time is devoted to the posterior parameter estimation with the Metropolis algorithm. The first and second tests are therefore focused on the parallelization of the Random Walking Metropolis Hastings algorithm (Sections \ref{s:test1}-\ref{s:test2}). In addition, further tests (Sections \ref{s:test3}-\ref{s:test4}) are devoted to test all the parallelized functions in DYNARE. Finally, we compare the two parallel implementations of the Metropolis Hastings algorithms, available in DYNARE: the Independent and the Random Walk (Section \ref{s:test5}).
+
+\subsection{Test 1.}\label{s:test1}
+The main goal here was to evaluate the parallel package on a \emph{fixed hardware platform} and using chains of \emph{variable length}. The model used for testing is a modification of \cite{Hradisky_etal_2006}. This is a small scale open economy DSGE model with 6 observed variables, 6 endogenous variables and 19 parameters to be estimated.
+We estimated the model on a bi-processor machine (Fujitsu Siemens, Celsius R630) powered with an Intel(R) Xeon(TM) CPU 2.80GHz Hyper Treading Technology; first with the original serial Metropolis and subsequently using the parallel solution, to take advantage of the two processors technology. We ran chains of increasing length: 2500, 5000, 10,000, 50,000, 100,000, 250,000, 1,000,000.
+
+\begin{figure}[!ht]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{iVaNo_time_comp.pdf}
+  \caption{Computational time (in minutes) versus chain length for the serial and parallel implementation (Metropolis with two chains).}\label{fig:test_time_comp}
+\end{centering}
+\end{figure}
+\begin{figure}[!ht]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{iVaNo_gain.pdf}
+  \caption{Reduction of computational time (i.e. the `time gain') using the parallel coding versus chain length. The time gain is computed as $(T_s-T_p)/T_p$, where $T_s$ and $T_p$ denote the computing time of the serial and parallel implementations respectively.}\label{fig:test_gain}
+\end{centering}
+\end{figure}
+
+Overall results are given in Figure \ref{fig:test_time_comp}, showing the computational time versus chain length, and Figure \ref{fig:test_gain}, showing the reduction of computational time (or the time gain) with respect to the serial implementation provided by the parallel coding. The gain in computing time of the exercise is of about 45\% on this test case, so reducing from 11.40 hours to about 6 hours the cost of running 1,000,000 Metropolis iterations (the ideal gain would be of 50\% in this case).
+
+\subsection{Test 2.}\label{s:test2}	
+The scope of the second test was to verify if results were robust over different hardware platforms.
+We estimated the model with chain lengths of 1,000,000 runs on the following hardware platforms:
+\begin{itemize}
+\item Single processor machine: Intel(R) Pentium4(R) CPU 3.40GHz with Hyper Treading Technology (Fujitsu-Siemens Scenic Esprimo);
+\item Bi-processor machine: two CPU's Intel(R) Xeon(TM) 2.80GHz Hyper Treading Technology (Fujitsu-Siemens, Celsius R630);
+\item Dual core machine: Intel Centrino T2500 2.00GHz Dual Core  (Fujitsu-Siemens, LifeBook S Series).
+\end{itemize}
+
+We first run the tests with normal configuration. However, since (i) dissimilar software environment on the machine can influence the computation; (ii) Windows service (Network, Hard Disk writing, Demon, Software Updating, Antivirus, etc.) can start during the simulation; we also run the tests not allowing for any other process to start during the estimation. Table \ref{tab:trail} gives results for the ordinary software environment and process priority is set as low/normal.
+
+\begin{table}
+\begin{centering}
+\begin{tabular}{l|l|l|l}
+  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
+Machine	& Single-processor	& Bi-processor	& Dual core \\ \hline
+Parallel & 8:01:21 & 7:02:19 & 5:39:38 \\
+Serial & 10:12:22 & 13:38:30 & 11:02:14 \\
+Speed-Up rate & 1.2722 & 1.9381 & 1.9498\\
+Ideal Speed-UP rate &  $\sim$1.5 & 2 & 2 \\
+  \hline
+\end{tabular}
+\caption{Trail results with normal PC operation. Computing time expressed in h:m:s. Speed-up rate is computed as $T_s/T_p$, where $T_s$ and $T_p$ are the computing times for the serial and parallel implementations.}\label{tab:trail}
+\end{centering}
+\end{table}
+
+Results showed that Dual-core technology provides a similar gain if compared with bi-processor results, again about 45\%. The striking results was that the Dual-core processor clocked at 2.0GHz was about 30\% faster than the Bi-processor clocked at 2.8GHz. Interesting gains were also obtained via multi-threading on the Single-processor machine, with speed-up being about 1.27 (i.e. time gain of about 21\%). However, beware that we burned a number of processors performing tests on single processors with hyper-threading and using very long chains (1,000,000 runs)!
+We re-run the tests on the Dual-core machine, by cleaning the PC operation from any interference by other programs and show results in Table \ref{tab:trail2}.
+A speed-up rate of 1.06 (i.e. 5.6\% time gain) can be obtained simply hiding the MATLAB waitbar. The speed-up rate can be pushed to 1.22 (i.e. 18\% time gain) by disconnecting the network and setting the priority of the process to real time. It can be noted that from the original configuration, taking 11:02 hours to run the two parallel chains, the computational time can be reduced to 4:40 hours (i.e. for a total time gain of over 60\% with respect to the serial computation) by parallelizing and optimally configuring the operating environment.
+These results are somehow surprising and show how it is possible to reduce dramatically the computational time with slight modification in the software configuration.
+\begin{table}[t]
+\begin{centering}
+\begin{tabular}{p{5cm}|l|l}
+  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
+Environment	& Computing time & Speed-up rate \\
+& & w.r.t. Table \ref{tab:trail}\\ \hline
+Parallel Waitbar Not Visible & 5:06:00 & 1.06 \\ \hline
+Parallel waitbar Not Visible, Real-time Process priority,
+Unplugged network cable. &
+	4:40:49 & 1.22\\
+  \hline
+\end{tabular}
+\caption{Trail results with different software configurations (optimized operating environment for computational requirements).}\label{tab:trail2}
+\end{centering}
+\end{table}
+
+Given the excellent results reported above, we have parallelized many other DYNARE functions. This implies that parallel instances can be invoked many times during a single DYNARE session. Under the basic parallel toolbox implementation, that we call the `Open/Close' strategy, this implies that MATLAB instances are opened and closed many times by system calls, possibly slowing down the computation, specially for `entry-level' computer resources. As mentioned before, this suggested to implement an alternative strategy for the parallel toolbox, that we call the `Always-Open' strategy, where the slave MATLAB threads, once opened, stay alive and wait for new tasks assigned by the master until the full DYNARE procedure is completed. We show next the tests of these latest implementations.
+
+\subsection{Test 3}\label{s:test3}
+In this Section we use the \cite{Lubik2003} model as test function\footnote{The \cite{Lubik2003} model is also selected as the `official' test model for the parallel toolbox in DYNARE.} and a very simple computer class, quite diffuse nowadays: Netbook personal Computer. In particular we used the Dell Mini 10 with Processor Intel� Atom� Z520 (1,33 GHz, 533 MHz), 1 GB di RAM (with Hyper-trading). First, we tested the computational gain of running a full Bayesian estimation: Metropolis (two parallel chains), MCMC diagnostics, posterior IRF's and filtered, smoothed, forecasts, etc. In other words, we designed DYNARE sessions that invoke all parallelized functions. Results are shown in Figures \ref{fig:netbook_complete_openclose}-\ref{fig:netbook_partial_openclose}.
+\begin{figure}[p]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{netbook_complete_openclose.pdf}
+  \caption{Computational Time (s) versus Metropolis length, running all the parallelized functions in DYNARE and the basic parallel implementation (the `Open/Close' strategy). \citep{Lubik2003}.}\label{fig:netbook_complete_openclose}
+\end{centering}
+\end{figure}
+\begin{figure}[p]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{netbook_partial_openclose.pdf}
+  \caption{Computational Time (s) versus Metropolis length, loading previously performed MH runs and running \emph{only} the parallelized functions after Metropolis \citep{Lubik2003}. Basic parallel implementation (the `Open/Close' strategy).}\label{fig:netbook_partial_openclose}
+\end{centering}
+\end{figure}
+In Figure \ref{fig:netbook_complete_openclose} we show the computational time versus the length of the Metropolis chains in the serial and parallel setting (`Open/Close' strategy). With very short chain length, parallel setting obviously slows down performances of the computations (due to delays in open/close MATLAB sessions and in synchronization), while increasing the chain length, we can get speed-up rates up to 1.41 on this `entry-level' portable computer (single processor and Hyper-threading).
+In order to appreciate the gain of parallelizing all functions invoked after Metropolis, in Figure \ref{fig:netbook_partial_openclose} we show the results of the experiment, but without running Metropolis, i.e. we use the options \verb"load_mh_files = 1" and \verb"mh_replic = 0" DYNARE options (i.e. Metropolis and MCMC diagnostics are not invoked). The parallelization of the functions invoked after Metropolis allows to attain speed-up rates of 1.14 (i.e. time gain of about 12\%). Note that the computational cost of these functions is proportional to the chain length only when the latter is relatively small. In fact, the number of sub-draws taken by \verb"posteriorIRF.m" or \verb"prior_posterior_statistics.m" is proportional to the total number of MH draws up to a maximum threshold of 500 sub-draws (for IRF's) and 1,200 sub-draws (for smoother). This is reflected in the shape of the plots, which attain a plateau when these thresholds are reached.
+%\begin{table}
+%\begin{centering}
+%\begin{tabular}{l|l|l}
+%  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
+%Chain Length & Time Serial (s) & Time Parallel (s) \\ \hline					
+%105 & 85 & 151 \\
+%1005 & 246 & 287 \\
+%5005 & 755 & 599 \\
+%10005 & 1246 & 948 \\
+%15005 & 1647 & 1250 \\
+%20005 & 2068 & 1502 \\
+%25005 & 2366 & 1675 \\
+% \hline
+%\end{tabular}
+%\caption{Trail results for the \cite{Lubik2003} model. Computational Time running all the parallelized functions in DYNARE and the basic parallel implementation (the `Open/Close' strategy).}\label{tab:trail_ls2003}
+%\end{centering}
+%\end{table}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{netbook_complete_comp.pdf}
+  \caption{Comparison of the `Open/Close' strategy and the `Always-open' strategy. Computational Time (s) versus Metropolis length, running all the parallelized functions in DYNARE \citep{Lubik2003}.}\label{fig:netbook_complete_comp}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{netbook_partial_comp.pdf}
+  \caption{Comparison of the `Open/Close' strategy and the `Always-open' strategy. Computational Time (s) versus Metropolis length, running only the parallelized functions after Metropolis \citep{Lubik2003}.}\label{fig:netbook_partial_comp}
+\end{centering}
+\end{figure}
+In Figures \ref{fig:netbook_complete_comp}-\ref{fig:netbook_partial_comp} we plot results of the same type of tests just described, but comparing the `Open/Close' and the `Always-open' strategies. We can see in both graphs that the more sophisticated approach 'Always-open' provides some reduction in computational time. When the entire Bayesian analysis is performed (including Metropolis and MCMC diagnostics, Figure \ref{fig:netbook_complete_comp}) the gain is on average of 5\%, but it can be more than 10\% for short chains. When the Metropolis is not performed, the gain rises on average at about 10\%. As expectable, the gain of the `Always-open' strategy is specially visible when the computational time spent in a single parallel session is not too long if compared to the cost of opening and closing new MATLAB sessions under the `Open/Close' approach.
+
+
+\subsection{Test 4}\label{s:test4}
+Here we increase the dimension of the test model, using the QUEST III model \citep{Ratto_et_al_EconModel2009}, using a more powerful Notebook Samsung Q 45 with an Dual core Processor Intel Centrino. In Figures \ref{fig:quest_complete_openclose}-\ref{fig:quest_partial_openclose} we show the computational gain of the parallel coding with the `Open/Close' strategy. When the Metropolis is included in the analysis (Figure \ref{fig:quest_complete_openclose}), the computational gain increases with the chain length. For 50,000 MH iterations, the speed-up rate is about 1.42 (i.e. a 30\% time gain), but pushing the computation up to 1,000,000 runs provides an almost ideal speed-up of 1.9 (i.e. a gain of about 50\% similar to Figure \ref{fig:test_time_comp}).
+It is also interesting to note that for this medium/large size model, even at very short chain length, the parallel coding is always winning over the serial. Excluding the Metropolis from DYNARE execution (Figure \ref{fig:quest_partial_openclose}), we can see that the speed-up rate of running the posterior analysis in parallel on two cores reaches 1.6 (i.e. 38\% of time gain).
+\begin{figure}[!ht]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{quest_complete_openclose.pdf}
+  \caption{Computational Time (s) versus Metropolis length, running all the parallelized functions in DYNARE and the basic parallel implementation (the `Open/Close' strategy). \citep{Ratto_et_al_EconModel2009}.}\label{fig:quest_complete_openclose}
+\end{centering}
+\end{figure}
+\begin{figure}[!hb]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{quest_partial_openclose.pdf}
+  \caption{Computational Time (s) versus Metropolis length, loading previously performed MH runs and running \emph{only} the parallelized functions after Metropolis \citep{Ratto_et_al_EconModel2009}. Basic parallel implementation (the `Open/Close' strategy).}\label{fig:quest_partial_openclose}
+\end{centering}
+\end{figure}
+
+We also checked the efficacy of the `Always-open' approach with respect to the `Open/Close' (Figures \ref{fig:quest_complete_comp} and \ref{fig:quest_partial_comp}). We can see in Figure \ref{fig:quest_complete_comp} that, running the entire Bayesian analysis, no advantage can be appreciated from the more sophisticated `Always-open' approach.
+\begin{figure}[t]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{quest_complete_comp.pdf}
+  \caption{Comparison of the `Open/Close' strategy and the `Always-open' strategy. Computational Time (s) versus Metropolis length, running all the parallelized functions in DYNARE \citep{Ratto_et_al_EconModel2009}.}\label{fig:quest_complete_comp}
+\end{centering}
+\end{figure}
+\begin{figure}[!ht]
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=300pt \epsfbox{quest_partial_comp.pdf}
+  \caption{Comparison of the `Open/Close' strategy and the `Always-open' strategy. Computational Time (s) versus Metropolis length, running only the parallelized functions after Metropolis \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_partial_comp}
+\end{centering}
+\end{figure}
+
+On the other hand, in Figure \ref{fig:quest_partial_comp}, we can see that the `Always-open' approach still provides a small speed-up rate of about 1.03. These results confirm the previous comment that the gain of the `Always-open' strategy is specially visible when the computational time spent in a single parallel session is not too long, and therefore, the bigger the model size, the less the advantage of this strategy.
+
+
+\section{Conclusions}
+The methodology identified for parallelizing MATLAB codes within DYNARE proved to be effective in reducing the computational time of the most extensive loops. This methodology is suitable for `embarrassingly parallel' codes, requiring only a minimal communication flow between slave and master threads. The parallel DYNARE is built around a few `core' routines, that act as a sort of `parallel paradigm'. Based on those routines, parallelization of expensive loops is made quite simple for DYNARE developers. A basic message passing system is also provided, that allows the master thread to monitor the progress of slave threads. The test model \verb"ls2003.mod" is available in the folder \verb"\tests\parallel" of the DYNARE distribution, that allows running parallel examples.
+
+% ----------------------------------------------------------------
+\bibliographystyle{plainnat}
+%\bibliographystyle{amsplain}
+%\bibliographystyle{alpha}
+\bibliography{marco}
+
+\newpage
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors1Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp1}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors2Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp2}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors3Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp3}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors4Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp4}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors5Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp5}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors6Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp6}
+\end{centering}
+\end{figure}
+\begin{figure}
+\begin{centering}
+  % Requires \usepackage{graphicx}
+  \epsfxsize=250pt \epsfbox{RWMH_quest1_PriorsAndPosteriors7Comp.pdf}
+  \caption{Prior (grey lines) and posterior density of estimated parameters (black = 100,000 runs; red = 1,000,000 runs) using the RWMH algorithm \citep[QUEST III model][]{Ratto_et_al_EconModel2009}.}\label{fig:quest_RWMH_comp7}
+\end{centering}
+\end{figure}
+
+\clearpage
+\newpage
+
+\appendix
+\section{A tale on parallel computing}
+This is a general introduction to Parallel Computing. Readers can skip it, provided they have a basic knowledge of DYNARE and Computer Programming \citep{GoffeCreel_Grid_2008,Azzini_etal_DYNARE_2007,ParallelDYNARE}.
+There exists an ample scientific literature as well as an enormous quantity of information on the Web, about parallel computing. Sometimes, this amount of information may result ambiguous and confusing in the notation adopted and the description of technologies.  Then main the goal here is therefore to provide a very simple introduction to this subject, leaving the reader to \cite{Brookshear} for a more extensive and clear introduction to computer science.
+
+Modern computer systems (hardware and software) is conceptually identical to the first computer developed by J. Von Neumann. Nevertheless, over time, hardware, software, but most importantly \emph{hardware \& software together} have acquired an ever increasing ability to perform incredibly complex and intensive tasks. Given this complexity, we use to explain the modern computer systems as the ``avenue paradigm'', that we summarize in the next tale.
+
+Nowadays there is a small but lovely town called ``CompuTown''. In CompuTown there are many roads, which are all very similar to each other, and also many gardens. The most important road in CompuTown is the Von Neumann Avenue. The first building in Von Neumann Avenue has three floors (this is a \emph{computer system}: PC, workstation, etc.; see Figure \ref{fig:building} and \cite{Brookshear}). Floors communicate between them only with a single stair. In each floor there are people coming from the same country, with the same language, culture and uses. People living, moving and interacting with each other in the first and second floor are  the \emph{programs} or software agents or, more generally speaking, \emph{algorithms} (see chapters 3, 5, 6 and 7 in \cite{Brookshear}). Examples of the latter are the softwares MATLAB, Octave, and a particular program called the \emph{operating system} (Windows, Linux, Mac OS, etc.).
+
+\begin{figure}
+  % Requires \usepackage{graphicx}
+  \hspace{-15pt}
+  \epsfxsize=400pt \epsfbox{AvenueParadigm.pdf}
+  \caption{The first building in Von Neumann Avenue: a \emph{Computer System}}\label{fig:building}
+\end{figure}
+
+
+People at the \emph{ground floor} are the transistors, the RAM, the CPU, the hard disk, etc. (i.e. the \emph{Computer Architecture}, see chapters 1 and 2 in \citeauthor{Brookshear}).
+People at the \emph{second floor} communicate with people at the \emph{first floor} using the only existing scale (the \emph{pipe}). In these communications, people talk two different languages, and therefore do not understand each other. To remove this problem people define a set of words, fixed and understood by everybody: the \emph{Programming Languages}. More specifically, these languages are called \emph{high-level programming languages} (Java, C/C++, FORTRAN,MATLAB, etc.), because they are related to people living on the upper floors of the building! Sometimes people in the building use also pictures to communicate: \emph{the icons} and  \emph{graphical user interface}.
+
+In a similar way, people at the first floor communicate with people at the ground floor. Not surprisingly, in this case, people use \emph{low-level programming languages} to communicate to each other (assembler, binary code, machine language, etc.). More importantly, however, people at the first floor must also manage and coordinate the requests from people on the second floor to people at the ground floor, since there is no direct communication between ground and second floor. For example they need to translate high-level programming languages into binary code\footnote{The process to transform an high-level programming languages into binary code is called compilation process.}: the \emph{Operating System } performs this task.
+
+Sometimes, people at the second floor try to talk directly with people at the ground floor, via the \emph{system calls}. In the parallelizing software presented in this document, we will use frequently these system calls, to distribute the jobs between the available hardware resources, and to coordinate the overall parallel computational process.
+If only a single person without family lives on the ground floor, such as the porter, we have a CPU single core.
+In this case, the porter can only do one task at a time for the people in first or second floor (the main characteristic of the Von Neumann architecture). For example, in the morning he first collects and sorts the mail for the people in the building, and only after completing this task he can take care of the garden.
+If the porter has to do many jobs, he needs to write in a paper the list of things to do: the \emph{memory} and the \emph{CPU load}. Furthermore, to properly perform its tasks, sometimes the porter has to move some objects trough the passageways at the ground floor (the \emph{System Bus}). If the passageways have standard width, we will have a 32 bits CPU architecture (or bus). If the passageways are very large we will have, for example, a 64 bits CPU architecture (or bus).
+In this scenario, there will be very busy days where many tasks have to be done and many things have to be moved around: the porter will be very tired, although he will be able to `survive'. The most afflicted are always the people at the first floor. Every day they have a lot of new, complex requests from the people at the second floor. These requests must be translated in a correct way and passed to the porter.
+The people at the second floor (the highest floor) ``live in cloud cuckoo land''. These people want everything to be done easily and promptly: the artificial intelligence, robotics, etc.
+The activity in the building increases over time, so the porter decides to get helped in order to reduce the execution time for a single job. There are two ways to do this:
+\begin{itemize}
+\item the municipality of CompuTown interconnects all the buildings in the city using roads, so that the porter can share and distribute the jobs (the \emph{Computer Networks}): if the porters involved have the same nationality and language we have a \emph{Computer Cluster}, otherwise we have a \emph{Grid}. Nevertheless, in both cases, it is necessary to define a correct way in which porters can manage, share and complete a shared job: the \emph{communication protocol} (TCP/IP, internet protocol, etc.);
+\item the building administrator employs an additional porter, producing a \emph{Bi-Processor Computer}. In other case, the porter may get married, producing a \emph{dual-core CPU}. In this case, the wife can help the porter to perform his tasks or even take entirely some jobs for her (for example do the accounting, take care of the apartment, etc.). If the couple has a children, they can have a further little help: the \emph{thread} and then the \emph{Hyper-threading} technology.
+\end{itemize}
+
+Now a problem arises: who should coordinate the activities between the porters (and their family) and between the other buildings? Or, in other words, should we refurbish the first and second floors to take advantage of the innovations on the ground floor and of the new roads in CompuTown?
+First we can lodge new persons at the first floor: the operating systems with a set of network tools and multi-processors support, as well as new people at the second floor with new programming paradigms (MPI, OpenMP, Parrallel DYNARE, etc.). Second, a more complex communication scheme between first and ground floor is necessary, building a new set of stairs. So, for example, if we have two stairs between ground and first floor and two porters, using multi-processors and a new parallel programming paradigm, we can assign jobs to each porter directly and independently, and then coordinate the overall work. In parallel DYNARE we use this kind of `refurbishing' to reduce the computational time and to meet the request of people at the second floor.
+
+Unfortunately, this is only an idealized  scenario, where all the citizens in CompuTown live in peace and cooperate between them. In reality, some building occupants argue with each other and this can cause stopping their job: these kinds of conflicts may be linked to \emph{software and hardware compatibility} (between ground and first floor), or to different \emph{software versions} (between second and first floor). The  building administration or the municipality of CompuTown have to take care of these problems an fix them, to make the computer system operate properly.
+
+This tale (that can be also called \emph{The Programs's Society}) covered in a few pages the fundamental ideas of computer science.
+
+
+\end{document}
+% ----------------------------------------------------------------
diff --git a/doc/parallel/quest_complete_comp.pdf b/doc/parallel/quest_complete_comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..801c61c0c29c3af2c6f64d8de1733aa5b7f93202
Binary files /dev/null and b/doc/parallel/quest_complete_comp.pdf differ
diff --git a/doc/parallel/quest_complete_openclose.pdf b/doc/parallel/quest_complete_openclose.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a5fcfd5fe943e84f8d9f8937c5de26643c7b6722
Binary files /dev/null and b/doc/parallel/quest_complete_openclose.pdf differ
diff --git a/doc/parallel/quest_partial_comp.pdf b/doc/parallel/quest_partial_comp.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..fe18ffa0ab68790f86d287a53f4cb7840f3b3248
Binary files /dev/null and b/doc/parallel/quest_partial_comp.pdf differ
diff --git a/doc/parallel/quest_partial_openclose.pdf b/doc/parallel/quest_partial_openclose.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..5f756624fa80ebdecece4b75193edb38bc04e857
Binary files /dev/null and b/doc/parallel/quest_partial_openclose.pdf differ
diff --git a/doc/parallel/waitbars1.pdf b/doc/parallel/waitbars1.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..91b98bf2c5237ee1a890c10d5646a18e74b9f7ba
Binary files /dev/null and b/doc/parallel/waitbars1.pdf differ
diff --git a/doc/parallel/waitbars2.pdf b/doc/parallel/waitbars2.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..d38ec17a2c6d97b76fe13799acf1804d6a0a3909
Binary files /dev/null and b/doc/parallel/waitbars2.pdf differ
diff --git a/doc/parallel/waitbarsP.pdf b/doc/parallel/waitbarsP.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..2bbc70d9aa444bb2da01ca0bfda38eb67aee762a
Binary files /dev/null and b/doc/parallel/waitbarsP.pdf differ
diff --git a/license.txt b/license.txt
index 38da03773a78569a56c4826d8452318d2a89668e..4a229e49ca88213c0c9b4ec1a0ca7c2ef491830f 100644
--- a/license.txt
+++ b/license.txt
@@ -107,7 +107,7 @@ License: GPL-3+
  along with Octave; see the file COPYING.  If not, see
  <http://www.gnu.org/licenses/>.
 
-Files: doc/manual.xml, doc/*.tex, doc/*.svg, doc/*.dia
+Files: doc/manual.xml, doc/*.tex, doc/*.svg, doc/*.dia, doc/*.pdf, doc/*.bib
 Copyright: 1996-2010, Dynare Team
 License: GFDL-1.3+
  Permission is granted to copy, distribute and/or modify this document