[CppAD] Multithreading

Brad Bell bradbell at seanet.com
Tue Mar 20 09:36:42 EDT 2012


It seems to be a bug that occurs when global ADFun<double> objects get 
deleted at the end of a program (I will try to fix it soon).

The test script simple_ad_pthread.sh added at
     https://projects.coin-or.org/CppAD/changeset/2304
generates the following output on one my test machines:

[bradbell at brad-home bug]$ ./simple_ad_pthread.sh
./simple_ad_pthread.sh
create simple_ad_pthread.cpp
g++ -g simple_ad_pthread.cpp -I/home/bradbell/cppad/trunk -lpthread -o 
simple_ad_pthread
./simple_ad_pthread
thread_num = 1, y[0] = 0.841471
thread_num = 0, y[0] = 0.841471
OK = 1
cppad-20120313 error from unknown source
Error detected by false result for
     thread < num_threads()
at line 292 in the file
     /home/bradbell/cppad/trunk/cppad/thread_alloc.hpp
... snip ...

On 03/20/2012 02:58 AM, Dominik Skanda wrote:
> Hello,
... snip ...

> I have tried to change the example
>
> http://www.coin-or.org/CppAD/Doc/simple_ad_pthread.cpp.xml.
>
> But even so my changed file compiled, it gave me segmentation fault.
... snip ...
> Am Montag, den 19.03.2012, 15:39 -0700 schrieb Jey Kottalam:
>> Dominik, could you provide a standalone testcase that would allow us
>> to reproduce the problem you're experiencing?
>>
>> Brad,
>>
>>> 3. I am not sure I understand the discussion below. Are you trying
>> to use
>>> CppAD without calling parallel_setup ? Or have you found a bug in
>>



More information about the CppAD mailing list