Slow Dynare on Ubuntu 15.04

Hi,

I have a problem with a very slow Dynare running on Ubuntu 15.04. I think there is a problem with the mex compilation. When I run ‘sudo dpkg-reconfigure dynare-matlab’ i get the following error:


Building with ‘g++’.
Warning: You are using gcc version ‘5.1.1’. The version of gcc is not
supported. The version currently supported with MEX is ‘4.7.x’. For a list of
currently supported compilers see:
mathworks.com/support/compil … nt_release.

In build_matlab at 91
Warning: You are using gcc version ‘5.1.1-4ubuntu12)’. The version of gcc is
not supported. The version currently supported with MEX is ‘4.7.x’. For a list
of currently supported compilers see:
mathworks.com/support/compil … nt_release.
In build_matlab at 91
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/matlab/gensylv.cpp -o /tmp/mex_1061975255672849_43703/gensylv.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/BlockDiagonal.cpp -o /tmp/mex_1061975255672849_43703/BlockDiagonal.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/SchurDecompEig.cpp -o /tmp/mex_1061975255672849_43703/SchurDecompEig.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/SimilarityDecomp.cpp -o /tmp/mex_1061975255672849_43703/SimilarityDecomp.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/SylvException.cpp -o /tmp/mex_1061975255672849_43703/SylvException.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/SylvMatrix.cpp -o /tmp/mex_1061975255672849_43703/SylvMatrix.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/SylvMemory.cpp -o /tmp/mex_1061975255672849_43703/SylvMemory.o
/usr/bin/g++ -c -DLAPACK_USE_MWSIGNEDINDEX -DMATLAB -D_GNU_SOURCE -DMATLAB_MEX_FILE -Igensylv/cc -I"/usr/local/MATLAB/R2014b/extern/include" -I"/usr/local/MATLAB/R2014b/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /usr/src/dynare-matlab/gensylv/cc/SylvParams.cpp -o /tmp/mex_1061975255672849_43703/SylvParams.o
Error using mex
/usr/src/dynare-matlab/gensylv/cc/SylvParams.cpp: In member function ‘mxArray*
SylvParams::DoubleParamItem::createMatlabArray() const’:
/usr/src/dynare-matlab/gensylv/cc/SylvParams.cpp:158:38: error:
‘mxCreateScalarDouble’ was not declared in this scope
return mxCreateScalarDouble(value);
^

Error in build_matlab (line 91)
eval( COMPILE_COMMAND ’ -DMATLAB -Igensylv/cc ’ …

Does anyone know how to solve this?

What version of Matlab do you have? Matlab supports older versions of GCC so you need to use the version of GCC that conforms with your version of Matlab

Also the dynare version available on Ubuntu is sevral years old because it just uses the Debian package. It would be better for you to compile from source. It’s rather simple:

apt-get build-dep dynare
git clone --recursive https://github.com/DynareTeam/dynare.git
cd dynare
git checkout -b 4.4
./configure --with-matlab=/usr/local/MATlAB/R20XX MATLAB_VERSION=R20XX
make

I currently run R2014b. I will try a newer version of Dynare.

Thanks.

I installed the the latest version of Dynare and it solved the problem. Thanks.