Building best version for Fedora/Centos

Hi Folks,

I’m neither a MATLAB nor a Dynare user, but am a sysadmin for a powerful server with both, and would like to know what I might have done wrong when compiling Dynare 4.5.1 for Centos 7. I used the command below to compile and then ‘make’ and ‘make install’ yet my faculty member says it runs slower on our server than on her laptop. I’m guessing there are more compile arguments I should include to build the most powerful Dynare version.

sudo ./configure --with-matlab=/usr/local/MATLAB/R2016a MATLAB_VERSION=R2016a

Our R2016a MATLAB has these toolboxes:

Curve Fitting Toolbox
Optimization Toolbox
Parallel Computing Toolbox
Statistics and Machine Learning Toolbox
Symbolic Math Toolbox

Our server has two Intel Xeon e5-2699v4 (2.20 GHz) and 88 cores.

Any tips or suggestions most appreciated! Thanks in advance for your ideas.

Dan

Dear Dan,
I would usually not expect Dynare to be faster on your server than on a standard laptop. According to today’s standards, a 2.2 GHz processor is really slow. Performance gains from a server come from parallelization, but most computations in Dynare are rather sequential in nature (e.g. sequential Monte Carlo methods). You may gain something from Matlab’s built-in functions making use of the many cores, but for standard stuff, I expect the speed-up to be rather minor. Things are of course different if you set up Dynare’s estimation routines to make use of parallel features like running several Markov Chains in parallel. But that requires effort from the side of the user. See e.g. Section 5 of the Reference manual

Okay thanks for that info. What made me suspect there may be a configure flag to add was the following in the configure process, even though I’m building this for MATLAB and not Octave:

Dynare is now configured for building the following components…

Binaries (with “make”):
MEX files for Octave (except those listed below): no (missing mkoctfile)
MS-SBVAR MEX files for Octave: no (missing GSL or MatIO library)
Kalman Steady State MEX file for Octave: no (missing SLICOT)
k-order and dynare_simul MEX for Octave: no (missing MatIO library)
Linsolve for Octave: no (Octave >= 3.8)
Ordschur for Octave: no (Octave >= 4.0)

You could have passed the --disable-octave flag (see the bottom part of https://github.com/DynareTeam/dynare). But that does not affect Matlab.

Hi,

For second order approximation (simulation or estimation with particle filters) a large number of cores makes a difference if you compile Dynare by passing the flag --enable-openmp to the configure script. This flag will compile some of the mex files with openmp. With this option, we can use parallelization when computing Kronecker products on large sparse matrices (needed to obtain the solution of models approximated at order two) and iterating on the the reduced form model with particles (for nonlinear estimation). To set the number of cores, see this page on our wiki (the page is outdated but it should work). The official Dynare binaries distributed do not come with multithreaded mex files. Users have to recompile Dynare to have this feature.

Best,
Stéphane.