mex source folder in Dynare 4 linux new release

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

mex source folder in Dynare 4 linux new release

Postby lombard » Sun Sep 21, 2008 7:43 am

Hi,

in the previous releases of Dynare v4 there was a source folder for compiling the mex functions (qz etc.)
I cannot see it in the new release. Is this supposed to be the case or is my installation of Dynare (Ubuntu) incomplete?

Best,

Gianni
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Postby SébastienVillemot » Mon Sep 22, 2008 8:23 am

For Ubuntu, you no longer need to recompile anything.
We now provide standard Ubuntu packages (.deb), via the package manager. These packages contain everything you need (M-files, binaries for the preprocessor and the MEX files). Also note that you will automatically get new Dynare releases if you use that mechanism.

Everything is explained there:
http://www.dynare.org/manual/ch02s02.html#id382132 *

Note that you have to install two packages: the package "dynare" for the M-files, the preprocessor (and also the MEX files compiled for Octave), and a package "dynare-matlab74" or "dynare-matlab75" for the MEX files compiled for Matlab, depending on your Matlab version.

If you really want to recompile the preprocessor and the MEX files, pick the ".tgz" source file in the download section.

Best

Sébastien

NB: * new url
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Postby lombard » Wed Sep 24, 2008 7:49 am

Hi Sébastien,

thanks for the update.

I tried to download the packages you mention, with the following problems:

1) not all packages could be retrieved (in particular http://www.dynare.org/ubuntu/pool/contr ... 0_i386.deb didn't seem to exist).
2) the other package was installed (i.e. 2007a shows the mex files, 2007b is empty)
4) running Dynare I could see that it was using the mex files. Nevertheless it crashed complaining that

worng mex file ..../2007a/mjgdgges.mexglx: undefined symbol
mxCreateDoublematrix_700


Notice that if I use the old source folder of the previous svn release of Dynare, everything works fine.

Best regards

Gianni

[PS: As an aside, it would be great to have the option to re-compile the mex functions on one own machine...]
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Postby SébastienVillemot » Wed Sep 24, 2008 8:45 am

Hi,

Concerning the availability of the dynare-matlab7.5 package, there is a typo in the URL you wrote. Note that you normally don't have to directly manipulate the URL; you should rather use your package manager as explained on the Wiki page. Note that yesterday I added the cryptographic key to get rid of security warnings. Everything is explained on:
http://www.dynare.org/manual/ch02s02.html#id382132 *

I have just reconfigured the package repository and uploaded dynare 4.0.1, so you should give it another try, by updating your package list with your package manager.

If this doesn't solve your problem, I need the following informations to help you solve it:
- did you use a package manager for downloading dynare packages ? if yes, what is your package manager (apt-get, aptitude, synaptic...) ?
- what is your Matlab version? (pkg dynare-matlab7.4 is for Matlab 7.4 aka R2007a, and pkg dynare-matlab7.5 is for Matlab 7.5 aka R2007b, and Matlab 7.6 aka R2008a; other versions are currently untested)
- are you using Ubuntu Hardy 8.04, or another distribution?

Note that I built the packages with a Ubuntu Hardy 8.04, so I don't see any reason why they should fail on another similar system, and other people reported successful installations on Ubuntu/Hardy. However, if you really need to recompile the package, this is perfectly possible. The procedure is explained at the bottom of the wiki page.

Best

Sébastien

NB: * new url
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Postby lombard » Wed Sep 24, 2008 9:01 am

Hi,
I don't think I changed anything.

I tried again with synaptic and it failed again. Indeed I use Matlab 2006a so the 2007b is no good for me on this machine. Still the 2007a is corrupted as Dynare crashes. The only way for Dynare to work fine is to compile the old scripts. This compilatio per se fails only on the simulation mex file with error

g++ -c -Isimulate -I../../preprocessor/include -I/opt/matlab2006/extern/include -I/opt/matlab2006/simulink/include -DMATLAB_MEX_FILE -fPIC -ansi -D_GNU_SOURCE -pthread -DNO_BLAS_H -DMWTYPES_NOT_DEFINED -DNO_BLAS_H -DMATLAB -O -DNDEBUG simulate/simulate.cc -o ../2007a/simulate.o

In file included from simulate/simulate.hh:35,
from simulate/simulate.cc:26:
simulate/Interpreter.hh:27:30: error: CodeInterpreter.hh: No such file or directory

mex: compile of 'simulate/simulate.cc' failed.

??? Error using ==> mex
Unable to complete successfully

Error in ==> build at 67
eval([ COMPILE_COMMAND ' -DMATLAB -Isimulate -I../../preprocessor/include simulate/simulate.cc simulate/Interpreter.cc simulate/Mem_Mngr.cc simulate/SparseMatrix.cc simulate/linbcg.cc']);



As for your questions

- did you use a package manager for downloading dynare packages ? if yes, what is your package manager (apt-get, aptitude, synaptic...) ?

synaptic
- what is your Matlab version? (pkg dynare-matlab7.4 is for Matlab 7.4 aka R2007a, and pkg dynare-matlab7.5 is for Matlab 7.5 aka R2007b, and Matlab 7.6 aka R2008a; other versions are currently untested)


I use 2006a
- are you using Ubuntu Hardy 8.04, or another distribution?


Hardy 8.04

Cheers

Gianni
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Postby SébastienVillemot » Wed Sep 24, 2008 9:17 am

Ok, this means that the binaries compiled with Matlab 7.4 (R2007a) don't work with Matlab R2006a. We may therefore consider providing them in the future.

In the meantime, I suggest the following:
- install only the "dynare" package from synaptic, and remove the dynare-matlab* packages, so that your /usr/lib/dynare/mex/2007a and mex/2007b directories are empty
- get the dynare source package (for example in /usr/src) with "apt-src install dynare"; this will create a "dynare-4.0.1" directory
- go the mex/sources subdirectory of the unpacked sources; from Matlab, run the "build_matlab.m" script, which should compile the DLLs in the mex/2007a directory
- manually copy the newly compiled DLLs (with mexglx extension) in /usr/lib/dynare/mex/2007a

Let me know if this works

Best

Sébastien
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Postby lombard » Wed Sep 24, 2008 9:22 am

Hi,

check out my other help message. When I tried to download the source file I got the same error regarding the non-existing URL. Did you fixed it in the last hour?

Gianni
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Postby SébastienVillemot » Wed Sep 24, 2008 9:28 am

See my reply your other post. In synaptic, you need to click on "Reload".

Sébastien
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Postby lombard » Wed Sep 24, 2008 9:45 am

Hi Sébastien,

you are great! Now the source files compile perfectly and Dynare works smoothly.

Thanks a million

Cheers

gianni
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests