Estimation performance sccalling across cpu cores

Dear Dynare users,

I have been using Dynare on MATLAB with Windows to estimate some large-scale macroeconomic models. I noticed that the estimation performance improves as the model size (number of observables and shocks) increases. For instance, when I estimate the Smets-Wouters model (7 observables and shocks), an eight-core CPU is only about 50% utilized. However, larger models can fully utilize the CPU. This seems to be the case regardless of the mode-finding algorithm or the MCMC method.

I am considering buying a high-end desktop CPU like Threadripper, which has many cores (more than 16). I wonder if anyone has tested how well Dynare scales to these CPUs. Any feedback or suggestions would be appreciated.

Thank you.

Try to benchmark the models that you are planning to use.
There is an optimal number of threads. Past that number the basic operations may be split among too many CPUs and performance decreases. Look at effective computing time rather than CPU utilization rate. Please report your findings.

Thank you for your suggestion. I have also observed that SMT (hyperthreading for Intel) can negatively affect the performance of Dynare, especially for models that are not highly parallelizable. Is there a way to specify the number of threads you want to use? I am pretty sure you can do it with software like Process Lasso, or with windows task manager, but it could be useful to do it with a Dynare command.

I will happily benchmark the models that I plan to use. However, I was hoping to hear from someone who has used Dynare with HEDT CPU (like Threadripper) before I make the purchase, to make sure that it scales well for large models.


My personal experince with a laptop with 20 threads core i7 13700H indicates that estimation of a DSGE model is time consuming.In total MCMC algorithms are time consuming.In some cases it takes tens of hours for computation.

This issue depens on to the number of blocks, number of RWMH algorithm chains , number of parameters you estimate , and so on.

You can use parallel computation method in Dynare to use different cores of a CPU for estimation of a model.

Thanks. What do you mean by “parallel computation method in Dynare”? My experience was that by default, Dynare estimation procedures used more than one core, depending on the complexity of the model

You can see parallel computation method in Dynare manual PDF document.

In parallel computation you use different cores of a CPU to estimate a model.

Altough I employed this method, but in some cases model estimation is time consuming despite of parallel computation.

In total MCMC algorithms are time consuming in spite of development of CPU technology in recent decade. In some fields of science it takes one month or 30 days to compute a problem.

Thank you for your reply. I might be misunderstanding something. As I mentioned, my observation is that most procedures utilized multiple cores. I believe I followed the guide you referred to, and I understood that it was useful for running multiple MCMC chains, which can be very efficient, assuming a single chain does not already exploit all of the available cores (which would be the case if the model is not very large).

Matlab uses multiple cores for basic linear operations. That is what you observe currently.
If you want to run MCMC chains in parallel, you may consider limiting the number of threads used for basic linear operations. See Control maximum number of computational threads - MATLAB maxNumCompThreads - MathWorks France

1 Like