Page 1 of 1
Dynare++ binary for Linux x86-64?
Posted:
Tue Dec 11, 2007 11:45 pm
by joachim
Hi there,
my laptop runs a 64bit Linux. By any chance, did anybody get the source code to compile or have a binary available?
I tried, for an hour or so, to change the makefiles to use icpc as the compiler and ifort as the linker and link dynamically against Intel MKL. However, after a while, the build stops with the last couple of lines of errors being reproduced below.
Thanks in advance for any suggestions.
Joachim
./korder_stoch.hweb(465): remark #981: operands are evaluated in unspecified order
bruno.calculate(Zstack<t> (),f,*res);
^
detected during instantiation of "void KOrderStoch::performStep<t>(int) [with t=0]" at line 210 of "./approximation.cweb"
./korder_stoch.hweb(516): remark #981: operands are evaluated in unspecified order
gs<t> ().insert(new _Ttensor(ypart.nstat,ypart.nys(),*g_sym));
^
detected during instantiation of "void KOrderStoch::performStep<t>(int) [with t=0]" at line 210 of "./approximation.cweb"
./korder_stoch.hweb(518): remark #981: operands are evaluated in unspecified order
Gstack<t> ().multAndAdd(1,h<t> (),*G_sym);
^
detected during instantiation of "void KOrderStoch::performStep<t>(int) [with t=0]" at line 210 of "./approximation.cweb"
compilation aborted for approximation.cpp (code 2)
make[1]: *** [approximation.o] Error 2
make[1]: Leaving directory `/home/joachim/Documents/dynare++-1.3.5/kord'
make: *** [../kord/approximation.o] Error 2
Got it to work on 64bit
Posted:
Thu Dec 13, 2007 12:38 am
by joachim
Ok, sorry for the lame self-reply, but it seems I got it to work using the GNU compilers and linking against Intel MKL version 10.0.1.014. The only essential change in the makefile is to set
LDFLAGS = -L${MKLPATH} -I${INCLUDE} -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lm -lstdc++ -lpthread
where MKLPATH=/path/to/mkl/lib/em64t and INCLUDE=/path/to/mkl/include
Thus far, I ran the asset.mod as a test. I attach the output files as a .tar.gz--if anybody is interested in verifying the results on a supported platform, I would very much appreciate a short reply if the results coincide.
Thanks!
Posted:
Fri Dec 14, 2007 10:12 am
by OndraKamenik
Joachim,
thanks for experimenting with dynare++, it is good to hear that it can be seamlessly compiled on 64bits.
Regarding to your first post:
The compiler erros you quote are not errors, just warnings. A compilation of approximation.o failed for some other reason, possibly some language problem? I do not have icpc.
Regarding to your second post:
I ran dynare++ version 1.3.5 and calculated relative errors of derivatives in two norms: these are the numbers from order=1 through order=6:
ans =
4.259961177295135e-16
ans =
5.687164796943692e-16
ans =
5.649407074428512e-16
ans =
1.122312736307596e-15
ans =
1.346587314633392e-15
ans =
3.347290070072144e-15
This means the solutions are very very close. Differences are probably caused by a different code for atlas and lapack.
Ondra K.
Does not compile with gcc
Posted:
Tue Aug 12, 2008 8:17 pm
by Ryan
The whole tree does build on Ubuntu Hardy 8.04 on amd64, but it does not link at the end:
- Code: Select all
dynare_model.o: In function `ogdyn::DynareParser::parse_glob(int, char const*)':
dynare_model.cpp:(.text+0x325): undefined reference to `dynglob__scan_buffer(char*, unsigned int)'
../parser/cc/parser.a(atom_assignings.o): In function `ogp::AtomAssignings::parse(int, char const*)':
atom_assignings.cpp:(.text+0x1a9): undefined reference to `asgn__scan_buffer(char*, unsigned int)'
../parser/cc/parser.a(formula_parser.o): In function `ogp::FormulaParser::parse(int, char const*)':
formula_parser.cpp:(.text+0x719): undefined reference to `fmla__scan_buffer(char*, unsigned int)'
../parser/cc/parser.a(matrix_parser.o): In function `ogp::MatrixParser::parse(int, char const*)':
matrix_parser.cpp:(.text+0x150): undefined reference to `matrix__scan_buffer(char*, unsigned int)'
collect2: ld returned 1 exit status
flex is creating the .cc files with those symbols which are found in parser.a, but the linker isn't finding them. The flex output is identical to that from a 32-bit Hardy machine.
- Code: Select all
dynare++-1.3.5/src$ nm ../parser/cc/parser.a | grep 'T .*__scan_buffer'
0000000000000620 T _Z17fmla__scan_bufferPcm
0000000000000610 T _Z19matrix__scan_bufferPcm
0000000000000610 T _Z17asgn__scan_bufferPcm
0000000000000610 T _Z21namelist__scan_bufferPcm
0000000000000610 T _Z16csv__scan_bufferPcm
Re: Does not compile with gcc
Posted:
Tue Aug 12, 2008 10:08 pm
by Ryan
Ryan wrote:The whole tree does build on Ubuntu Hardy 8.04 on amd64, but it does not link at the end:
- Code: Select all
dynare_model.o: In function `ogdyn::DynareParser::parse_glob(int, char const*)':
dynare_model.cpp:(.text+0x325): undefined reference to `dynglob__scan_buffer(char*, unsigned int)'
../parser/cc/parser.a(atom_assignings.o): In function `ogp::AtomAssignings::parse(int, char const*)':
atom_assignings.cpp:(.text+0x1a9): undefined reference to `asgn__scan_buffer(char*, unsigned int)'
../parser/cc/parser.a(formula_parser.o): In function `ogp::FormulaParser::parse(int, char const*)':
formula_parser.cpp:(.text+0x719): undefined reference to `fmla__scan_buffer(char*, unsigned int)'
../parser/cc/parser.a(matrix_parser.o): In function `ogp::MatrixParser::parse(int, char const*)':
matrix_parser.cpp:(.text+0x150): undefined reference to `matrix__scan_buffer(char*, unsigned int)'
collect2: ld returned 1 exit status
The problem was in the function declarations of *__scan_buffer. After changing "unsigned int" to "size_t" for each of the four functions, it compiled on x86_64. This matches what is in the flex output.
Posted:
Wed Aug 13, 2008 7:45 am
by OndraKamenik
Ryan,
many thanks.
I will fix the declaration of *__scan_buffer in the svn. It seems that your flex generates the the functions with int 64 and thus unsigned int is not compatible with that (on 64 machine unsigned int is still 32).
thanks again!
Ondra K.