Hi all,
The latests commits change the filesystem layout of the files generated by the preprocessor.
Ultimately, the goal is to have Dynare create only two subdirectories inside the current directory, for storing all model representations and all output. One of these two directories begin with a plus ("+") sign, which is recognized by MATLAB/Octave as a “package” (equivalent to what C++ calls a “namespace” or Python and Julia call a “module”); this directory contains files directly usable by MATLAB (i.e. only M and MEX files).
Assuming the modfile is called example.mod, here is the correspondence between old and new filenames:
– example.m ⇒ +example/driver.m (callable from MATLAB as example.driver) – example_static.m ⇒ +example/static.m (callable as example.static) – example_dynamic.m ⇒ +example/dynamic.m (callable as example.dynamic) – example_steadystate2.m ⇒ +example/steadystate.m (note that this will not create a conflict with the user supplied example_steadystate.m, whose name is unchanged) – example_set_auxiliary_variables ⇒ +example/set_auxiliary_variables.m – example_objective_static ⇒ +example/+objective/static.m (callable as example.objective.static) – example/dynamic_NNN.m ⇒ +example/+block/dynamic_NNN.m (for block decomposition, callable as example.block.dynamic_NNN) – example_static.mex… ⇒ +example/static.mex… – example_static.c ⇒ example/model/src/static.c – example_static.{bin,cod} ⇒ example/model/bytecode/static.{bin,cod} – example.json ⇒ example/model/json/modfile.json – example_static.json ⇒ example/model/json/static.json
More similar changes are to come for all other Dynare outputs (MAT files, LaTeX, PDF, EPS, Julia representation…).
Of course this move will break some codes written by power-users, but we think it has become necessary because Dynare now generates so many files. It avoids cluttering the current directory, and organizes those files along a logical structure. Adapting existing codes should be easy (in most cases it’s just a matter of replacing a few underscores by dots).
Best,
-- Sébastien VillemotEconomist at CEPREMAP Dynare developer http://sebastien.villemot.name
One should make a conversion utility that helps power users to adapt to this change. Maybe a *.cmd file or a shell procedure that recreates the old filesystem organization.
Best
Michel
Sébastien Villemot writes:
Hi all,
The latests commits change the filesystem layout of the files generated by the preprocessor.
Ultimately, the goal is to have Dynare create only two subdirectories inside the current directory, for storing all model representations and all output. One of these two directories begin with a plus ("+") sign, which is recognized by MATLAB/Octave as a “package” (equivalent to what C++ calls a “namespace” or Python and Julia call a “module”); this directory contains files directly usable by MATLAB (i.e. only M and MEX files).
Assuming the modfile is called example.mod, here is the correspondence between old and new filenames:
– example.m ⇒ +example/driver.m (callable from MATLAB as example.driver) – example_static.m ⇒ +example/static.m (callable as example.static) – example_dynamic.m ⇒ +example/dynamic.m (callable as example.dynamic) – example_steadystate2.m ⇒ +example/steadystate.m (note that this will not create a conflict with the user supplied example_steadystate.m, whose name is unchanged) – example_set_auxiliary_variables ⇒ +example/set_auxiliary_variables.m – example_objective_static ⇒ +example/+objective/static.m (callable as example.objective.static) – example/dynamic_NNN.m ⇒ +example/+block/dynamic_NNN.m (for block decomposition, callable as example.block.dynamic_NNN) – example_static.mex… ⇒ +example/static.mex… – example_static.c ⇒ example/model/src/static.c – example_static.{bin,cod} ⇒ example/model/bytecode/static.{bin,cod} – example.json ⇒ example/model/json/modfile.json – example_static.json ⇒ example/model/json/static.json
More similar changes are to come for all other Dynare outputs (MAT files, LaTeX, PDF, EPS, Julia representation…).
Of course this move will break some codes written by power-users, but we think it has become necessary because Dynare now generates so many files. It avoids cluttering the current directory, and organizes those files along a logical structure. Adapting existing codes should be easy (in most cases it’s just a matter of replacing a few underscores by dots).
Best,
Hi Michel,
I plan to do what you suggest for the Dynare/matlab output files (plots, log, ...) we will move in subfolders. This can be done with a matlab routine. But I do not think that it would be possible to do the same with the output of the preprocessor, except for the main m file (ie ROOTFOLDER/+example.driver routine may have ROOTFOLDER/example.m a copy or symbolic link), because all the matlab routines are using the new namespace.
Another approach could be to provide a program (this can be done with a matlab routine) which translates power-user written codes (basically, as explained by Sébastien, we just have to replace some underscores by dots).
Best, Stéphane.
Michel Juillard writes:
One should make a conversion utility that helps power users to adapt to this change. Maybe a *.cmd file or a shell procedure that recreates the old filesystem organization.
Best
Michel
Sébastien Villemot writes:
Hi all,
The latests commits change the filesystem layout of the files generated by the preprocessor.
Ultimately, the goal is to have Dynare create only two subdirectories inside the current directory, for storing all model representations and all output. One of these two directories begin with a plus ("+") sign, which is recognized by MATLAB/Octave as a “package” (equivalent to what C++ calls a “namespace” or Python and Julia call a “module”); this directory contains files directly usable by MATLAB (i.e. only M and MEX files).
Assuming the modfile is called example.mod, here is the correspondence between old and new filenames:
– example.m ⇒ +example/driver.m (callable from MATLAB as example.driver) – example_static.m ⇒ +example/static.m (callable as example.static) – example_dynamic.m ⇒ +example/dynamic.m (callable as example.dynamic) – example_steadystate2.m ⇒ +example/steadystate.m (note that this will not create a conflict with the user supplied example_steadystate.m, whose name is unchanged) – example_set_auxiliary_variables ⇒ +example/set_auxiliary_variables.m – example_objective_static ⇒ +example/+objective/static.m (callable as example.objective.static) – example/dynamic_NNN.m ⇒ +example/+block/dynamic_NNN.m (for block decomposition, callable as example.block.dynamic_NNN) – example_static.mex… ⇒ +example/static.mex… – example_static.c ⇒ example/model/src/static.c – example_static.{bin,cod} ⇒ example/model/bytecode/static.{bin,cod} – example.json ⇒ example/model/json/modfile.json – example_static.json ⇒ example/model/json/static.json
More similar changes are to come for all other Dynare outputs (MAT files, LaTeX, PDF, EPS, Julia representation…).
Of course this move will break some codes written by power-users, but we think it has become necessary because Dynare now generates so many files. It avoids cluttering the current directory, and organizes those files along a logical structure. Adapting existing codes should be easy (in most cases it’s just a matter of replacing a few underscores by dots).
Best,
OK thanks
Michel
Stéphane Adjemian writes:
Hi Michel,
I plan to do what you suggest for the Dynare/matlab output files (plots, log, ...) we will move in subfolders. This can be done with a matlab routine. But I do not think that it would be possible to do the same with the output of the preprocessor, except for the main m file (ie ROOTFOLDER/+example.driver routine may have ROOTFOLDER/example.m a copy or symbolic link), because all the matlab routines are using the new namespace.
Another approach could be to provide a program (this can be done with a matlab routine) which translates power-user written codes (basically, as explained by Sébastien, we just have to replace some underscores by dots).
Best, Stéphane.
Michel Juillard writes:
One should make a conversion utility that helps power users to adapt to this change. Maybe a *.cmd file or a shell procedure that recreates the old filesystem organization.
Best
Michel
Sébastien Villemot writes:
Hi all,
The latests commits change the filesystem layout of the files generated by the preprocessor.
Ultimately, the goal is to have Dynare create only two subdirectories inside the current directory, for storing all model representations and all output. One of these two directories begin with a plus ("+") sign, which is recognized by MATLAB/Octave as a “package” (equivalent to what C++ calls a “namespace” or Python and Julia call a “module”); this directory contains files directly usable by MATLAB (i.e. only M and MEX files).
Assuming the modfile is called example.mod, here is the correspondence between old and new filenames:
– example.m ⇒ +example/driver.m (callable from MATLAB as example.driver) – example_static.m ⇒ +example/static.m (callable as example.static) – example_dynamic.m ⇒ +example/dynamic.m (callable as example.dynamic) – example_steadystate2.m ⇒ +example/steadystate.m (note that this will not create a conflict with the user supplied example_steadystate.m, whose name is unchanged) – example_set_auxiliary_variables ⇒ +example/set_auxiliary_variables.m – example_objective_static ⇒ +example/+objective/static.m (callable as example.objective.static) – example/dynamic_NNN.m ⇒ +example/+block/dynamic_NNN.m (for block decomposition, callable as example.block.dynamic_NNN) – example_static.mex… ⇒ +example/static.mex… – example_static.c ⇒ example/model/src/static.c – example_static.{bin,cod} ⇒ example/model/bytecode/static.{bin,cod} – example.json ⇒ example/model/json/modfile.json – example_static.json ⇒ example/model/json/static.json
More similar changes are to come for all other Dynare outputs (MAT files, LaTeX, PDF, EPS, Julia representation…).
Of course this move will break some codes written by power-users, but we think it has become necessary because Dynare now generates so many files. It avoids cluttering the current directory, and organizes those files along a logical structure. Adapting existing codes should be easy (in most cases it’s just a matter of replacing a few underscores by dots).
Best,
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev