[ADOL-C] Issue with OpenMP
Kshitij Kulshreshtha
kshitij at math.upb.de
Mon Sep 19 14:48:43 EDT 2011
Hello, yes this is a known problem. The fix is already on svn trunk but requires testing before it can be released.
--
Dr. Kshitij Kulshreshtha
Sent via Mobile Phone.
Brad Bell <bradbell at seanet.com> wrote:
When I try to
make install
ADOL-C-2.2.0 with the configure flag
--with-openmp-flag=-fopenmp
(which is the OpenMP flag for g++) I get the messages
Making install in ADOL-C
Making install in src
Making install in drivers
CC drivers.o
CC driversf.o
CC odedrivers.o
In file included from odedrivers.c:20:
../../../ADOL-C/src/taping_p.h:297:2: error: #error nicht hier
make[4]: *** [odedrivers.lo] Error 1
On 9/17/2011 1:15 PM, Ingrid Hallen wrote:
Hi everyone! I've been experimenting a bit with adol-c and OpenMP (not differentiating OpenMP code, just trying to paralellize some code that uses adoubles). Anyway, I have a piece of code that looks something like this: "adouble t1, t2; adouble t0, tf; t0.setValue(0.0); tf.setValue(1.0); double nn[] = {1.0,2.0,3.0,4.0,5.0}; int i; #pragma omp parallel shared(t0,tf,nn) private(i,t1,t2) { #pragma omp for nowait for (i=0;i<4;i++) { t1 = (t0+tf)*nn[i]; t2 = (t0+tf)*nn[i+1]; std::cout << i << i+1 << t1.value() << t2.value(); } }" Now if I run the loop using just one thread everything works fine, but for more than one I get some weird results, like, say, the following output: 0 1 1.000 2.000 2 3 3.000 2.000 3 4 4.000 4.000 1 2 2.000 3.000 Here I think the second line should read "2 3 3.000 4.000" and the third "3 4 4.000 5.000". Anyone have an idea why this strange behavior occurs? cheers ingrid
_______________________________________________ ADOL-C mailing list ADOL-C at list.coin-or.org http://list.coin-or.org/mailman/listinfo/adol-c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20110919/a01c95d0/attachment.html>
More information about the ADOL-C
mailing list