[CppAD] Multithreading
Brad Bell
bradbell at seanet.com
Mon Apr 2 07:29:48 EDT 2012
The helgrind warning below was in fact a race condition and it has been
fixed. See the heading 04-01 on
http://www.coin-or.org/CppAD/Doc/whats_new_12.xml
On 03/24/2012 11:13 AM, Brad Bell wrote:
> This bug,and some other things that Dominik found have been fixed. See
> the headings 03-21 and 03-23 on
> http://www.coin-or.org/CppAD/Doc/whats_new_12.htm
>
> There still are some error messages when running
> valgrind --tool=helgrind ./pthread_test simple_ad
> but they appear to be a problem with valgrind.
>
> To be specific, when in the makefile
> multi_thread/makefile
> I change
> # AM_CXXFLAGS = -g $(CXX_FLAGS)
> AM_CXXFLAGS = -DNDEBUG -O2 $(CXX_FLAGS)
> to
> AM_CXXFLAGS = -g $(CXX_FLAGS)
> # AM_CXXFLAGS = -DNDEBUG -O2 $(CXX_FLAGS)
> and run
> make pthread_test
> valgrind --tool=helgrind ./pthread_test simple_ad
> I get
> ... snip ...
> ==19568== Possible data race during write of size 4 at 0x80770c0 by
> thread #1
> ==19568== at 0x8050455: CppAD::AD<double>::tape_new()
> (tape_link.hpp:221)
> ... snip ...
> ==19568== This conflicts with a previous read of size 4 by thread #4
> ==19568== at 0x805450A: CppAD::AD<double>::id_handle(unsigned int)
> (tape_link.hpp:73)
> ... snip ...
>
>
More information about the CppAD
mailing list