[ADOL-C] Building ADOL-C with OpenMP-support
Wolfgang Lorenz
wl-chmw at gmx.de
Sat Jul 16 04:26:19 EDT 2011
Hi there,
Am Fri, 15 Jul 2011 09:59:12 +0200
schrieb Kshitij Kulshreshtha <kshitij at math.upb.de>:
> Hello,
>
> As on 2011-07-13 17:09, Wolfgang Lorenz did write:
> > Hello list readers,
> >
> >
> > I just wanted to test the last stable version (2.2.0) of ADOL-C with
> > OpenMP support. The manual stated to configure ADOL-C using the
> > option
> >
> > --with-openmp-flag=<flag>
> >
> > In case of gcc that's "-fopenmp", which is working fine with other
> > projects. However, the build process ends with:
> >
> > In file included from odedrivers.c:20:0:
> > ../../../ADOL-C/src/taping_p.h:297:2: error: #error nicht hier
> >
> > The compiler error is still present in the trunk of ADOL-C svn. The
> > context in taping_p.h reads:
> >
> > [...]
> > 296 #if defined(_OPENMP)
> > 297 #error nicht hier
> > [...]
> >
> > Is OpenMP currently not supported, is this a bug or did I miss
> > something?
>
> Going from ADOL-C versions 2.1.* to 2.2.* we incorporated a new
> internal memory manager. This has caused several things to break,
> including OpenMP. Unfortunately for us the new memory manager was
> written by a colleague who is not involved in actively developing
> ADOL-C, so this #error is a programming relic which went uncommented
> and undetected until now. After some testing I found that the
> parallel initialization functions have not been ported to the new
> memory manager, which is why it was disabled.
>
> Please fallback to ADOL-C 2.1.12 for using openMP for now. I'll work
> on getting it to run with the new version soon.
This is compiling all right, thank you. Just a short notice, though:
When you try to compile ADOL-C 2.1.12 with OpenMP-Support AND the
system doesn't provide the automake tools, compiling fails with:
[...]
Making all in test
make[3]: Entering directory `/tmp/adolc/ADOL-C-2.1.12/ADOL-C/test'
../../doltlibtool --tag=CXX --mode=link g++ -g -O2 -o powexam powexam.o ../src/libadolc.la -lm
libtool: link: g++ -g -O2 -o .libs/powexam powexam.o ../src/.libs/libadolc.so -lm -Wl,-rpath -Wl,/home/wolfgang/adolc_base/lib64
../src/.libs/libadolc.so: undefined reference to `omp_get_num_threads'
../src/.libs/libadolc.so: undefined reference to `omp_get_thread_num'
[...]
It helps to add the lines
AM_CFLAGS = @ac_adolc_cflags@
AM_CXXFLAGS = @ac_adolc_cxxflags@
to ADOL-C/test/Makefile.am before creating the configure script. (I
attached a patch against current SVN trunk.)
Cheers,
Wolfgang Lorenz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenMP-test.patch
Type: text/x-patch
Size: 528 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/adol-c/attachments/20110716/5aa8dae0/attachment.bin
More information about the ADOL-C
mailing list