Here is the fork of Dynare 4.0.2 that I've been using for a parallelised version of Dynare 4.0.2 running on an 8-core Xeon machine. I don't have any hard figures but it seems to deliver a speedup of roughly 6ish for Bayesian estimation.
You install this by dumping these files in your dynare\4.0.2\matlab folder. (You may want to make sure that you've got the original Dynare files saved somewhere safe first...)
The code uses Matlab's Parallel Computing Toolbox; for running two chains at once, it uses the Multicore package by Markus Buehren. You'll need to install that yourself.
Here's what's new in the attached zip file:
- The numerical gradient and hessian routines are parallelised in a pretty obvious way.
- The newrat optimiser (mode_compute=5) now uses four different Hessian updates each time, and picks the best one. That's an idea suggested by Phua et al.
- For the MCMC part, I implemented Ingvar Strid's prefetching mechanism. I've hard-coded an optimal prefetching routine on the assumption that there are 4 cores per MCMC chain, and that the acceptation ratio is less than 0.6ish. That means that each chain runs about 2.25 -- 2.5 times faster than normal.
- The rest of the changes involve ugly workarounds for Matlab's reluctance to use global variables in a parallel context.
Just thought I'd post it in case anyone else was interested in this sort of thing. Comments / questions / suggestions would be very welcome.
All the best,
Jamie