I’ve installed Dynare_v4 on Linux (Kubuntu feisty). Unfortunatly it is way too slow in computing second order soulutions compared to the Windows version.
I guess this is due to the missing mex functions (see Michel’s message on installing Dynare_v4 on Linux)
It would be great to have scripts (instructions) that can be executed (followed) to compile the mex functions on Matlab for Linux. Is this possible?
HI,
I’m trying to generate the mexglx file using the instructions given by Michel.
It does not seem to work on my installation of Linux.
First I had problems with the mxSize type. Then I changed it to int (just to bypass the problem. I had to do this both in SylvParams.cpp and in gensylv.cpp.
I got the following (after apparently compiling some stuff
Could it be possible to have Michel’s mexopts.sh file??
-I believe that the MxSize problem comes from the fact that you have an older verson of Matlab
-my mexopt.sh is the standard one provided my Matlab on Linux for compiling with gcc
-the problem with you libm library seems to me to be related to your installation. I interpret the error message as your lim\bm.so isn’t in sync with your ld loader
On Debian, libm.so is provided by package libc6-dev. Be careful, when I tried Ubuntu a while ago, I wasn’t able to update gcc and libc without making a complete mess of the system. Since then, I stick to Debian.
I think I solved the problem(for now). My last message about the lm libraries was due to an incompatibility of some libraries on my 64bit machine with those required by the makefile.
I have tried on my 32Bit laptop and everything seems to work after a few changes to the .cpp files. This is a workaround that might bring up problems in the future, though…
In any case, for those that want to try:
I replaced mwSize with int in SylvParams.cpp and gensylv.cpp (this might generate problems with some Dynare functions I have not yet used)
Then I ran make in the gensylv/matlab directory and the mexglx file was created.
I moved it into dynare_v4/matlab and… second order solutions seem to work fine.
Maybe last question: does anybody know if replacing mwSize with int cause any problem?
the lm incompatibility is between gcc and libc6 files installed on your 64 bit machine, not with the Makefile
mwSize seems to have been introduced in Matlab version 7.3 for 64 bit Matlab, it is defined as size_t, for 32 bit Matlab and before 7.3, mwSize should be set to int. So changing it to int won’t create problem. I will try to get a fix, so that users don’t have to change it in the future