matlab

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.

matlab

Postby ebjohnso » Thu Oct 29, 2009 2:20 am

I would like to run dynare on a remote machine which is running matlab. How can I run this from the command line?

I have tried the following:

Code: Select all
matlab -nodesktop < dynare ramsey.mod >! outfile &

and get
bash: dynare: No such file or directory


dynare is in the matlab path, however.

I also tried
Code: Select all
 matlab -nodesktop < /usr/share/dynare/matlab/dynare.m ramsey.mod >! outfile &

and the output is:
Configuring Dynare ...
[mex] Generalized QZ.
[m] Sylvester equation solution.
[m] Kronecker products.
[m] Sparse kronecker products.

>> >> ??? DYNARE: you must provide the name of the MOD file in argument



Any advice? I would really like to log out of the machine and let the program run in the background. Is there a better/feasible way to do this?
ebjohnso
 
Posts: 2
Joined: Thu Oct 29, 2009 2:12 am

Re: matlab

Postby martinkliem » Thu Oct 29, 2009 8:41 am

Maybe not the most elegant way but it works:

1: complie your dynare mod file as usual on you desktop pc: dynare file.mode

2: Afterwards, copy all generated files (file.m, file_dynamic.m etc.) on your remote desktop

3: Now you can start matlab in the shell: matlab -nodisplay <file.m >output.txt &

Best regards

martin
martinkliem
 
Posts: 2
Joined: Thu Oct 22, 2009 11:49 am

Re: matlab

Postby SébastienVillemot » Thu Oct 29, 2009 9:30 am

Hi,

The simplest way is to create a M-file (say "foo.m") containing only the call to dynare:
Code: Select all
dynare ramsey.mod
exit


and then launch that M-file from the command line:
Code: Select all
matlab -nodisplay -r foo


Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: matlab

Postby ebjohnso » Thu Oct 29, 2009 12:10 pm

That does it. Very simple indeed. Thanks.
ebjohnso
 
Posts: 2
Joined: Thu Oct 29, 2009 2:12 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests