Number of Metropolis Hasting file per block

Hi.

How dynare determines number of metropolis hasting files per block ??

For example in my model I set two blocks in the model ( number of blocks in the model ) but Dynare generates 3 metropolis hasting files per block or per chain and therefore generates 6 metropolis hasting files.

Why Dynare generates 3 files per block ??

Dear Eisa,

When we first implemented estimation in Dynare, the amount of RAM in computers was limited. To avoid storing all the MCMC draws in the RAM we decided to save them in files (for each block) on the hard drive. There is an option somewhere (only in the matlab code) to determine the maximum size of those files. So depending on the size of your model (the number of estimated parameters) and the number of simulations the user requires, Dynare will generate a different number of such files. Nowdays, RAM is cheap, so we should probably increase the maximum size of these files (hence reduce the number of files). This may accelerate post MCMC operations (as convergence diagnostics, posterior IRFS or moments, …).

To sum-up, as a Dynare user you should not worry about the number of generated files.

Best,
Stéphane

Thanks for your response.
As I understand Dynare generates these files for each block based on the number of parameters and number of simulations in the model.

It should be governed by options_.MaxNumberOfBytes. The more parameters and draws you have, the more files of that size will be generated.

Hi Stephane I’m interested in hearing more about this, and if the Dynare team plans to change the way Dynare handles parallel computations.

I imagine that over the last decade as CPU core counts (and L3 cache) have sky rocketed, and as DRAM has become more of a commodity (and with RAM bandwidth increasing significantly over the period), there is room for a lot of optimisation and performance improvements for Dynare, especially when it comes to model estimation.

We have started working on using the Parallel Computing Toolbox for estimation: Refactored version of !2371 Parallel posterior sampler (!2376) · Merge requests · Dynare / dynare · GitLab
It will be supported in Dynare 7. You could already test it in the unstable version. If an open parpool is detected at runtime, estimation will use it. Note that this way of triggering the PCT may still change.

1 Like