Running Dynare 4 on Mac OSX

As Dynare 4 is now the main version, this forum is now closed. Please, post
on the Dynare Help forum
Forum rules
As Dynare 4 is the current Dynare version, there forum is now close. Post new question in the Dynare Help Forum.

Running Dynare 4 on Mac OSX

Postby seb.mcmahon » Wed Mar 12, 2008 2:35 pm

Hi everyone

I've been using dynare on Mac OSX Leopard for a while now, using a snapshot downloaded in late 2007.

I tried to get an update today, and the snapshot from today doesn't include the "parser.src" folder. This means that I can't run "make" in it.

Also, I tried running "make" in a snapshot downloaded about a month ago and I get the following errors:

uname: illegal option -- o
usage: uname [-amnprsv]
g++ -Wall -O3 -MD -I include -c DynareFlex.cc
DynareFlex.ll: In function ‘yy::parser::token::yytokentype yylex(yy::parser::semantic_type*, yy::location*, ParsingDriver&)’:
DynareFlex.ll:117: error: ‘METHOD’ is not a member of ‘token’
DynareFlex.ll:232: error: ‘LU’ is not a member of ‘token’
DynareFlex.ll:233: error: ‘GAUSSIAN_ELIMINATION’ is not a member of ‘token’
DynareFlex.ll:234: error: ‘GMRES’ is not a member of ‘token’
DynareFlex.ll:235: error: ‘BICGSTAB’ is not a member of ‘token’
DynareFlex.ll:236: error: ‘SPARSE’ is not a member of ‘token’
make: *** [DynareFlex.o] Error 1


Can anyone help me, I run the most recent snapshot on a windows computer and would like to run the same version on my mac.

Thanks!

Sébastien
seb.mcmahon
 
Posts: 4
Joined: Wed Mar 12, 2008 1:46 pm

Postby MichelJuillard » Thu Mar 13, 2008 7:43 am

The parser.src directory has been renamed preprocessor

Please, post again the errors that you may encounter with the new snapshot.

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby seb.mcmahon » Fri Mar 14, 2008 11:34 am

Hi Michel

Thanks for the quick reply.

I ran "make" in the "preprocessor" folder and there was indded an error:

uname: illegal option -- o
usage: uname [-amnprsv]
uname: illegal option -- o
usage: uname [-amnprsv]
make -C macro
uname: illegal option -- o
usage: uname [-amnprsv]
g++ -Wall -O3 -MD -I include -c MacroFlex.cc
g++ -Wall -O3 -MD -I include -c MacroBison.cc
g++ -Wall -O3 -MD -I include -c MacroDriver.cc
g++ -Wall -O3 -MD -I include -c MacroValue.cc
ar crs libmacro.a MacroFlex.o MacroBison.o MacroDriver.o MacroValue.o
g++ -Wall -O3 -MD -I include -c DynareFlex.cc
g++ -Wall -O3 -MD -I include -c DynareBison.cc
g++ -Wall -O3 -MD -I include -c ComputingTasks.cc
g++ -Wall -O3 -MD -I include -c ModelTree.cc
ModelTree.cc: In member function ‘void
ModelTree::writeModelStaticEquationsOrdered_M(std::ostream&,
Model_Block*, const std::string&) const’:
ModelTree.cc:878: warning: ‘IM’ may be used uninitialized in this
function
g++ -Wall -O3 -MD -I include -c NumericalConstants.cc
g++ -Wall -O3 -MD -I include -c NumericalInitialization.cc
g++ -Wall -O3 -MD -I include -c Shocks.cc
g++ -Wall -O3 -MD -I include -c SigmaeInitialization.cc
SigmaeInitialization.cc: In member function ‘virtual void
SigmaeStatement::writeOutput(std::ostream&, const std::string&) const’:
SigmaeInitialization.cc:65: warning: ‘ir1’ may be used uninitialized
in this function
SigmaeInitialization.cc:64: warning: ‘ic1’ may be used uninitialized
in this function
g++ -Wall -O3 -MD -I include -c SymbolTable.cc
SymbolTable.cc: In member function ‘void SymbolTable::addSymbol(const
std::string&, Type, const std::string&)’:
SymbolTable.cc:41: warning: ‘id’ may be used uninitialized in this
function
g++ -Wall -O3 -MD -I include -c TmpSymbolTable.cc
g++ -Wall -O3 -MD -I include -c VariableTable.cc
g++ -Wall -O3 -MD -I include -c ParsingDriver.cc
g++ -Wall -O3 -MD -I include -c DataTree.cc
DataTree.cc: In member function ‘ExprNode*
DataTree::AddPlus(ExprNode*, ExprNode*)’:
DataTree.cc:75: warning: control may reach end of non-void function
‘ExprNode* DataTree::AddMinus(ExprNode*, ExprNode*)’ being inlined
g++ -Wall -O3 -MD -I include -c ModFile.cc
g++ -Wall -O3 -MD -I include -c Statement.cc
g++ -Wall -O3 -MD -I include -c ExprNode.cc
g++ -Wall -O3 -MD -I include -c ModelNormalization.cc
g++ -Wall -O3 -MD -I include -c ModelBlocks.cc
g++ -Wall -O3 -MD -I include -c BlockTriangular.cc
g++ -Wall -O3 -MD -I include -c Model_Graph.cc
Model_Graph.cc: In function ‘void IM_to_model_graph_new(List_IM*, int,
int, int*, int*, t_model_graph*, int*, int*, double**, int*)’:
Model_Graph.cc:749: warning: ‘u_count_per_period’ may be used
uninitialized in this function
g++ -Wall -O3 -MD -I include -c SymbolGaussElim.cc
g++ -Wall -O3 -MD -I include -c DynareMain.cc
g++ -Wall -O3 -MD -I include -c DynareMain2.cc
g++ -Wall -O3 -MD -I include -c InterfaceMatlab.cc
g++ -Wall -O3 -o dynare_m DynareFlex.o DynareBison.o ComputingTasks.o
ModelTree.o NumericalConstants.o NumericalInitialization.o Shocks.o
SigmaeInitialization.o SymbolTable.o TmpSymbolTable.o VariableTable.o
ParsingDriver.o DataTree.o ModFile.o Statement.o ExprNode.o
ModelNormalization.o ModelBlocks.o BlockTriangular.o Model_Graph.o
SymbolGaussElim.o DynareMain.o DynareMain2.o InterfaceMatlab.o -Lmacro
-lmacro
ld: warning in macro/libmacro.a, file is not of required architecture
Undefined symbols:
"MacroDriver::parse(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_ostream<char,
std::char_traits<char> >&)", referenced from:
_main in DynareMain.o
"MacroDriver::MacroDriver()", referenced from:
_main in DynareMain.o
"MacroDriver::~MacroDriver()", referenced from:
_main in DynareMain.o
_main in DynareMain.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [dynare_m] Error 1



I hope this helps.

Sébastien
seb.mcmahon
 
Posts: 4
Joined: Wed Mar 12, 2008 1:46 pm

Postby MichelJuillard » Fri Mar 14, 2008 1:10 pm

Dear Sebastien,

this is weird. Could it be possible that some of the utilities (uname and ar) are old on your computer?

Try the following change in Makefile:
replace -Lmacro -l macro
by
macro/MacroBison.o macro/MacroDriver.o macro/MacroFlex.o macro/MacroValue.o

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby seb.mcmahon » Fri Mar 14, 2008 1:20 pm

Thanks, I'll try it later today.

I run OSX Leopard, all up to date, so I don't think the utilities are old. Maybe they are compared to a linux distribution though.

Sébastien
seb.mcmahon
 
Posts: 4
Joined: Wed Mar 12, 2008 1:46 pm

Postby seb.mcmahon » Mon Mar 17, 2008 12:12 pm

Hi again Michel

your solution seems to have fixed the problem. I'll run further tests this week and keep you posted if anything comes up.

Merci beaucoup!

Sébastien
seb.mcmahon
 
Posts: 4
Joined: Wed Mar 12, 2008 1:46 pm

Re: Running Dynare 4 on Mac OSX

Postby joe » Wed Feb 18, 2009 8:03 pm

I had the same problem. I made the changes suggested above. Then, I opened matlab to test dynare. I ran example1 and everything worked fine. But then when running example2 i got this output:

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Fast model evaluation.

Starting Dynare ...
Starting preprocessing of the model file ...
WARNING: example2.mod:5.11-25: Symbol beta declared twice.
ERROR: example2.mod:43.12-20: dr_algo=1 option is no longer supported

??? Error using ==> dynare at 96
DYNARE: preprocessing failed

I am new to dynare so I have no clue where to look. I tried writing my own mod file, and running others in the test folder and got the same error on a majority (but not all of them).

Any help would be appreciated.

-Joe
joe
 
Posts: 1
Joined: Wed Feb 18, 2009 7:57 pm

Re: Running Dynare 4 on Mac OSX

Postby SébastienVillemot » Mon Feb 23, 2009 9:54 am

Hi,

The "dr_algo" option has been removed in recent versions of Dynare, because it used an incorrect solution method. Remove "dr_algo=1" and rerun your file.

Best,

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


Return to Dynare version 4

Who is online

Users browsing this forum: No registered users and 1 guest