how to specify intermediary files directory

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.

how to specify intermediary files directory

Postby charles82 » Fri Dec 30, 2011 8:58 am

how to specify intermediary files directory
Filename.m
Filename_dynamic.m
Filename_static.m

I want all output file to my specify directory
charles82
 
Posts: 12
Joined: Fri Dec 30, 2011 8:41 am

Re: how to specify intermediary files directory

Postby charles82 » Sat Dec 31, 2011 1:54 pm

who can help me, thank you!
charles82
 
Posts: 12
Joined: Fri Dec 30, 2011 8:41 am

Re: how to specify intermediary files directory

Postby HoutanBastani » Mon Jan 02, 2012 11:23 am

There's no internal Dynare way to do this, but you could make a little Matlab function like this:

Code: Select all
function chngdir(basename, newdir)

movefile([basename '.m'], newdir);
movefile([basename '_static.m'], newdir);
movefile([basename '_dynamic.m'], newdir);
cd(newdir);

end


Then call this script from within the mod file before the statements that start actual processing, like this:

Code: Select all
chngdir('example1', 'myExample1Dir');
stoch_simul;
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: how to specify intermediary files directory

Postby charles82 » Mon Jan 02, 2012 1:22 pm

I want use matlabpool.
but parfor not support cd directory... so dynare can not execute in different directory.
and spmd not support array in Composite's style.

thank you all the same.
charles82
 
Posts: 12
Joined: Fri Dec 30, 2011 8:41 am

Re: how to specify intermediary files directory

Postby charles82 » Tue Jan 03, 2012 2:09 pm

dynare_m.exe create 3 file "deco.m,deco_dynamic.m,deco_static.m"
where find source file about dynare_m.exe? I want to edit and compile.
charles82
 
Posts: 12
Joined: Fri Dec 30, 2011 8:41 am

Re: how to specify intermediary files directory

Postby HoutanBastani » Wed Jan 04, 2012 2:45 pm

It's available from in two forms
git: http://www.dynare.org/git/dynare.git/
source snapshot: http://www.dynare.org/snapshot/source/

The code you're looking for is in the preprocessor subdirectory.
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: how to specify intermediary files directory

Postby SébastienVillemot » Wed Jan 04, 2012 2:45 pm

We (Dynare developers) do not use matlabpool, so we did not design Dynare with this issue in mind. This might not work at all.

If you find a solution to your problem, please let us know, this can be interesting. You can find Dynare source code and build instructions at: http://www.dynare.org/download/dynare-4.2/source
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: how to specify intermediary files directory

Postby charles82 » Thu Jan 05, 2012 2:15 am

matlabpool not support global Variables.
dynare use global M_ oo_ ... for performance reason?

I hope find some version which dynare support parfor or spmd.
charles82
 
Posts: 12
Joined: Fri Dec 30, 2011 8:41 am

Re: how to specify intermediary files directory

Postby SébastienVillemot » Thu Jan 05, 2012 11:29 am

We are in the process of removing many global variables, but it is unlikely that we remove all of them.

So I don't really expect Dynare to be compatible with matlabpool in the forseeable future.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: how to specify intermediary files directory

Postby charles82 » Fri Jan 06, 2012 4:41 am

thanks for your reply
charles82
 
Posts: 12
Joined: Fri Dec 30, 2011 8:41 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests