Page 1 of 1

matlab

PostPosted: Thu Oct 29, 2009 2:20 am
by ebjohnso
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?

Re: matlab

PostPosted: Thu Oct 29, 2009 8:41 am
by martinkliem
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

Re: matlab

PostPosted: Thu Oct 29, 2009 9:30 am
by SébastienVillemot
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,

Re: matlab

PostPosted: Thu Oct 29, 2009 12:10 pm
by ebjohnso
That does it. Very simple indeed. Thanks.