<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>CppAD Changes and Additions During 2012</title>
<meta name="description" id="description" content="CppAD Changes and Additions During 2012"/>
<meta name="keywords" id="keywords" content=" "/>
<style type='text/css'>
body { color : black }
body { background-color : white }
A:link { color : blue }
A:visited { color : purple }
A:active { color : purple }
</style>
<script type='text/javascript' language='JavaScript' src='_whats_new_12_xml.js'>
</script>
</head>
<body>
<table><tr>
<td>
<a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a>
</td>
<td><a href="whats_new.xml" target="_top">Prev</a>
</td><td><a href="whats_new_11.xml" target="_top">Next</a>
</td><td>
<select onchange='choose_across0(this)'>
<option>Index-&gt;</option>
<option>contents</option>
<option>reference</option>
<option>index</option>
<option>search</option>
<option>external</option>
</select>
</td>
<td>
<select onchange='choose_up0(this)'>
<option>Up-&gt;</option>
<option>CppAD</option>
<option>Appendix</option>
<option>whats_new</option>
<option>whats_new_12</option>
</select>
</td>
<td>
<select onchange='choose_down3(this)'>
<option>CppAD-&gt;</option>
<option>Install</option>
<option>Introduction</option>
<option>AD</option>
<option>ADFun</option>
<option>multi_thread</option>
<option>library</option>
<option>cppad_ipopt_nlp</option>
<option>Example</option>
<option>preprocessor</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>Appendix-&gt;</option>
<option>Faq</option>
<option>speed</option>
<option>Theory</option>
<option>glossary</option>
<option>Bib</option>
<option>Bugs</option>
<option>WishList</option>
<option>whats_new</option>
<option>deprecated</option>
<option>License</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>whats_new-&gt;</option>
<option>whats_new_12</option>
<option>whats_new_11</option>
<option>whats_new_10</option>
<option>whats_new_09</option>
<option>whats_new_08</option>
<option>whats_new_07</option>
<option>whats_new_06</option>
<option>whats_new_05</option>
<option>whats_new_04</option>
<option>whats_new_03</option>
</select>
</td>
<td>whats_new_12</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Introduction</option>
<option>05-24</option>
<option>04-19</option>
<option>04-18</option>
<option>04-17</option>
<option>04-10</option>
<option>04-06</option>
<option>04-05</option>
<option>04-01</option>
<option>03-27</option>
<option>03-26</option>
<option>03-23</option>
<option>03-21</option>
<option>03-17</option>
<option>03-11</option>
<option>03-03</option>
<option>03-02</option>
<option>02-11</option>
<option>02-10</option>
<option>02-09</option>
<option>01-30</option>
<option>01-27</option>
<option>01-24</option>
<option>01-23</option>
<option>01-20</option>
<option>01-19</option>
<option>01-16</option>
<option>01-15</option>
<option>01-12</option>
<option>01-07</option>
<option>01-02</option>
</select>
</td>
</tr></table><br/>




<center><b><big><big>CppAD Changes and Additions During 2012</big></big></b></center>
<br/>
<b><big><a name="Introduction" id="Introduction">Introduction</a></big></b>
<br/>
This section contains a list of the changes to CppAD during 2012
(in reverse order by date).
The purpose of this section is to
assist you in learning about changes between various versions of CppAD.

<br/>
<br/>
<b><big><a name="05-24" id="05-24">05-24</a></big></b>
<br/>
Merged in changes from <code><font color="blue">branches/sparse</font></code>:
<ol type="1"><li>
A new interface was added to
<a href="sparse_jacobian.xml" target="_top"><span style='white-space: nowrap'>sparse_jacobian</span></a>
 and <a href="sparse_hessian.xml" target="_top"><span style='white-space: nowrap'>sparse_hessian</span></a>
.
This interface
returns a sparse representation of the corresponding matrices
using row and column index vectors.
</li><li>

The examples
<a href="sparse_jacobian.cpp.xml" target="_top"><span style='white-space: nowrap'>sparse_jacobian.cpp</span></a>
 and
<a href="sparse_hessian.cpp.xml" target="_top"><span style='white-space: nowrap'>sparse_hessian.cpp</span></a>
  were improved 
and extended to include the new interface.
</li><li>

The definition of an 
<a href="glossary.xml#AD Function" target="_top"><span style='white-space: nowrap'>AD&#xA0;function</span></a>
 was improved
to include definition of the corresponding 
<code><i><font color="black"><span style='white-space: nowrap'>n</span></font></i></code>
 and 
<code><i><font color="black"><span style='white-space: nowrap'>m</span></font></i></code>
.
</li></ol>



<br/>
<br/>
<b><big><a name="04-19" id="04-19">04-19</a></big></b>
<br/>
The <a href="installunix.xml#boost_dir" target="_top"><span style='white-space: nowrap'>BOOST_DIR</span></a>
 
configure command line value has been changed to be the corresponding
prefix during the installation of boost.
To be specific, it used to be that

<code><font color="blue"><span style='white-space: nowrap'>boost_dir</span></font><i><font color="black"><span style='white-space: nowrap'>/boost</span></font></i></code>
 was the boost include directory,
now 
<code><font color="blue"><span style='white-space: nowrap'>boost_dir</span></font><i><font color="black"><span style='white-space: nowrap'>/include</span></font></i></code>
 is the boost include directory.
This make it the same as the other directory arguments on the configure
command line.
In addition, it fixes some bugs in the detection of the boost
multi-threading library.


<br/>
<br/>
<b><big><a name="04-18" id="04-18">04-18</a></big></b>
<br/>
Add documentation and testing for not using <a href="ta_free_all.xml" target="_top"><span style='white-space: nowrap'>free_all</span></a>
 and 
<a href="user_atomic.xml#clear" target="_top"><span style='white-space: nowrap'>user_atomic&#xA0;clear</span></a>
 while in
<a href="ta_in_parallel.xml" target="_top"><span style='white-space: nowrap'>parallel</span></a>
 mode.

<br/>
<br/>
<b><big><a name="04-17" id="04-17">04-17</a></big></b>
<br/>
Fix bug when using <a href="user_atomic.xml" target="_top"><span style='white-space: nowrap'>user_atomic</span></a>
 functions with 
<a href="multi_thread.xml" target="_top"><span style='white-space: nowrap'>multi_threading</span></a>
.

<br/>
<br/>
<b><big><a name="04-10" id="04-10">04-10</a></big></b>
<br/>
Add control of the 
<a href="installunix.xml#max_num_threads" target="_top"><span style='white-space: nowrap'>max_num_threads</span></a>
 argument
to the unix 
<a href="installunix.xml#Configure" target="_top"><span style='white-space: nowrap'>configure</span></a>
 command.

<br/>
<br/>
<b><big><a name="04-06" id="04-06">04-06</a></big></b>

<ol type="1"><li>
A change was made to the way that the tapes were managed to reduce 
false sharing during <a href="multi_thread.xml" target="_top"><span style='white-space: nowrap'>multi-threading</span></a>
.
Because of this change, it is now suggest that the user call 
<a href="parallel_ad.xml" target="_top"><span style='white-space: nowrap'>parallel_ad</span></a>
 after the multi-threading section of the program.
</li><li>

The routine <a href="ta_free_all.xml" target="_top"><span style='white-space: nowrap'>ta_free_all</span></a>
 was created to make it easier 
to manage memory and the routine <a href="memory_leak.xml" target="_top"><span style='white-space: nowrap'>memory_leak</span></a>
 
was deprecated.
</li><li>

Add the <code><font color="blue">-lteuchos</font></code> flag to the link line for the
<a href="speed_sacado.xml" target="_top"><span style='white-space: nowrap'>speed_sacado</span></a>
 tests.
(This was not necessary for <code><font color="blue">trilinos-10.8.3</font></code>
but is necessary for <code><font color="blue">trilinos-10.10.1</font></code>)
</li></ol>


<br/>
<br/>
<b><big><a name="04-05" id="04-05">04-05</a></big></b>
<br/>
The restriction was added that
<a href="parallel_ad.xml" target="_top"><span style='white-space: nowrap'>parallel_ad</span></a>
 cannot be called while a tape is being recorded.
This was necessary inorder to initialize some new statics in the tape.

<br/>
<br/>
<b><big><a name="04-01" id="04-01">04-01</a></big></b>
<br/>
Fixed a race condition when using CppAD with 
<a href="multi_thread.xml" target="_top"><span style='white-space: nowrap'>multi-threading</span></a>
. 
This has been fixed and the error message below no longer occurs.
Suppose that you ran the CppAD 
<a href="installunix.xml#Configure" target="_top"><span style='white-space: nowrap'>configure</span></a>
 command in the <code><font color="blue">work</font></code>
directory.
If you then edited the file <code><font color="blue">work/multi_thread/makefile</font></code>
and changed
<code><font color='blue'><pre style='display:inline'> 
	# AM_CXXFLAGS     = -g $(CXX_FLAGS)
	AM_CXXFLAGS = -DNDEBUG -O2 $(CXX_FLAGS)
</pre></font></code>

to
<code><font color='blue'><pre style='display:inline'> 
	AM_CXXFLAGS     = -g $(CXX_FLAGS)
	# AM_CXXFLAGS = -DNDEBUG -O2 $(CXX_FLAGS)
</pre></font></code>

and then executed the commands
<code><font color='blue'><pre style='display:inline'> 
	make clean
	make pthread_test
	valgrind --tool=helgrind ./pthread_test simple_ad
</pre></font></code>

The following error message would result:

<code><i><font color="black"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;...&#xA0;snip&#xA0;...</span></font></i><font color="blue"><span style='white-space: nowrap'><br/>
==7041==&#xA0;Possible&#xA0;data&#xA0;race&#xA0;during&#xA0;write&#xA0;of&#xA0;size&#xA0;4&#xA0;at&#xA0;0x8077460&#xA0;by&#xA0;thread&#xA0;#1<br/>
==7041==&#xA0;&#xA0;&#xA0;&#xA0;at&#xA0;0x804FE23:&#xA0;CppAD::AD&lt;double&gt;::tape_new()&#xA0;(tape_link.hpp:221)<br/>
</span></font><i><font color="black"><span style='white-space: nowrap'>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;...&#xA0;snip&#xA0;...<br/>
</span></font></i></code>
<br/>
<b><big><a name="03-27" id="03-27">03-27</a></big></b>
<br/>
Reduce the amount of memory allocation and copying of information during
a <a href="dependent.xml" target="_top"><span style='white-space: nowrap'>Dependent</span></a>
 operation or an <code><font color="blue">ADFun</font></code>
<a href="funconstruct.xml#Sequence Constructor" target="_top"><span style='white-space: nowrap'>sequence&#xA0;constructor</span></a>
.

<br/>
<br/>
<b><big><a name="03-26" id="03-26">03-26</a></big></b>
<br/>
Calling <code><font color="blue">taylor_capacity</font></code>, with to with capacity equal to zero,
	   was not
	   <a href="capacity_taylor.xml#c.Freeing Memory" target="_top"><span style='white-space: nowrap'>freeing&#xA0;memory</span></a>
.
	   This has been fixed.

	   <br/>
<br/>
<b><big><a name="03-23" id="03-23">03-23</a></big></b>

	   <ol type="1"><li>
	   Improve, the multi-threading examples
	   <a href="simple_ad_openmp.cpp.xml" target="_top"><span style='white-space: nowrap'>simple_ad_openmp.cpp</span></a>
,
	   <a href="simple_ad_bthread.cpp.xml" target="_top"><span style='white-space: nowrap'>simple_ad_bthread.cpp</span></a>
, and
	   <a href="simple_ad_pthread.cpp.xml" target="_top"><span style='white-space: nowrap'>simple_ad_pthread.cpp</span></a>
.
	   This includes separating generic code that can be used for all applications
	   from problem specific code.
	   </li><li>

	   Add initialization of statics in 
	   <a href="parallel_ad.xml#CheckSimpleVector" target="_top"><span style='white-space: nowrap'>CheckSimpleVector</span></a>
 
	   during <code><font color="blue">parallel_ad</font></code> call.
	   These statics are required to use 
	   <a href="cppad_vector.xml" target="_top"><span style='white-space: nowrap'>CppAD::vector</span></a>
.
	   </li><li>

	   Add a debugging check to make sure <a href="checksimplevector.xml" target="_top"><span style='white-space: nowrap'>CheckSimpleVector</span></a>

	   is initialized in sequential mode.
	   </li></ol>


	   <br/>
<br/>
<b><big><a name="03-21" id="03-21">03-21</a></big></b>
<br/>
Fix an incorrect error check in <code><font color="blue">thread_alloc</font></code>
	   that did not allow <a href="ta_return_memory.xml" target="_top"><span style='white-space: nowrap'>ta_return_memory</span></a>
 
	   to return memory in sequential execution mode that was allocated by a 
	   different thread during parallel execution.

	   <br/>
<br/>
<b><big><a name="03-17" id="03-17">03-17</a></big></b>
<br/>
Debian recently converted the default shell from <code><font color="blue">bash</font></code> to <code><font color="blue">dash</font></code>
	   (which caused <code><font color="blue">multi_thread/test.sh</font></code> to fail).
	   This has been fixed.
	   In general, Debian's policy is that <code><font color="blue">bin/sh</font></code> will be a 
	   <a href="http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html" target="_top"><span style='white-space: nowrap'>Posix&#xA0;Shell</span></a>
.

	   <br/>
<br/>
<b><big><a name="03-11" id="03-11">03-11</a></big></b>
<br/>
There was a bug in <a href="thread_alloc.xml" target="_top"><span style='white-space: nowrap'>thread_alloc</span></a>
 where extra memory was held
	   onto even if <a href="ta_hold_memory.xml" target="_top"><span style='white-space: nowrap'>hold_memory</span></a>
 was never called
	   and only one thread was used by the program.  This caused 
	   
<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;valgrind&#xA0;--leak-check=full&#xA0;--show-reachable=yes<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font></code>

	   to generate an error message.
	   If <a href="multi_thread.xml" target="_top"><span style='white-space: nowrap'>multiple&#xA0;threads</span></a>
 are used,
	   one should free this 
	   <a href="ta_free_available.xml#Purpose.Extra Memory" target="_top"><span style='white-space: nowrap'>extra&#xA0;memory</span></a>

	   for threads other than thread zero.
	   If <code><font color="blue">hold_memory</font></code> is used,
	   one should call <a href="ta_free_available.xml" target="_top"><span style='white-space: nowrap'>free_available</span></a>
 for all threads. 


	   <br/>
<br/>
<b><big><a name="03-03" id="03-03">03-03</a></big></b>

	   <ol type="1"><li>
	   Add the examples 
	   <a href="simple_ad_openmp.cpp.xml" target="_top"><span style='white-space: nowrap'>simple_ad_openmp.cpp</span></a>
,
	   <a href="simple_ad_bthread.cpp.xml" target="_top"><span style='white-space: nowrap'>simple_ad_bthread.cpp</span></a>

	   and <a href="simple_ad_pthread.cpp.xml" target="_top"><span style='white-space: nowrap'>simple_ad_pthread.cpp</span></a>
.
	   </li><li>

	   Fix bug in finding boost multi-threading library
	   (due to fact that <a href="installunix.xml#boost_dir" target="_top"><span style='white-space: nowrap'>boost_dir</span></a>
 
	    is not the prefix during the boost installation).
	   </li></ol>


	   <br/>
<br/>
<b><big><a name="03-02" id="03-02">03-02</a></big></b>

	   <ol type="1"><li>
	   Change the name <code><font color="blue">simple_ad.cpp</font></code> to <a href="team_example.cpp.xml" target="_top"><span style='white-space: nowrap'>team_example.cpp</span></a>

	   </li><li>

	   The multi-threading <code><font color="blue">team_example.cpp</font></code> example was changed to use 
	   
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>f</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>x</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">=</mo>
<msqrt><mrow><msup><mi mathvariant='italic'>x</mi>
<mn>2</mn>
</msup>
</mrow>
</msqrt>
</mrow></math>

 instead of the function
	   
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mrow><mstyle mathvariant='normal'><mi mathvariant='normal'>atan</mi>
<mn>2</mn>
</mstyle></mrow>
<mo stretchy="false">[</mo>
<mi>sin</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>x</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">,</mo>
<mi>cos</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>x</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">]</mo>
</mrow></math>


	   (both functions should behave like the identity function 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>f</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>x</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">=</mo>
<mi mathvariant='italic'>x</mi>
</mrow></math>

).
	   This enabled the removal of <code><font color="blue">multi_thread/arc_tan.cpp</font></code>.
	   </li><li>

	   In <a href="team_example.cpp.xml" target="_top"><span style='white-space: nowrap'>team_example.cpp</span></a>
 check that all of the threads
	   pass their individual test; i.e. 
<code><font color="blue"><span style='white-space: nowrap'>work_all_[</span></font><i><font color="black"><span style='white-space: nowrap'>thread_num</span></font></i><font color="blue"><span style='white-space: nowrap'>]</span></font><i><font color="black"><span style='white-space: nowrap'>.ok</span></font></i></code>

	   is true for all 
<code><i><font color="black"><span style='white-space: nowrap'>thread_num</span></font></i></code>
.
	   </li></ol>


	   <br/>
<br/>
<b><big><a name="02-11" id="02-11">02-11</a></big></b>

	   <ol type="1"><li>
	   The requirements in 
	   <a href="base_member.xml" target="_top"><span style='white-space: nowrap'>base_member</span></a>
 were missing from the <a href="base_require.xml" target="_top"><span style='white-space: nowrap'>base_require</span></a>
 documentation.
	   In addition,
	   the <a href="base_require.cpp.xml" target="_top"><span style='white-space: nowrap'>base_require.cpp</span></a>
 example has been added.
	   </li></ol>

	   The specifications for <a href="memory_leak.xml" target="_top"><span style='white-space: nowrap'>memory_leak</span></a>
 where changes so that
	   calling routine specifies the amount of static memory to add.
	   In addition,
	   it is now possible to call 
	   <code><font color="blue">memory_leak</font></code> when <a href="ta_num_threads.xml" target="_top"><span style='white-space: nowrap'>num_threads</span></a>
 
	   is greater than one
	   (still can't be in parallel mode).

	   <br/>
<br/>
<b><big><a name="02-10" id="02-10">02-10</a></big></b>

	   <ol type="1"><li>
	   Add the missing Base class requirements in
	   the entire <a href="base_member.xml" target="_top"><span style='white-space: nowrap'>base_member</span></a>
 section
	   and under the <a href="base_require.xml#Output Operator" target="_top"><span style='white-space: nowrap'>Output&#xA0;Operator</span></a>

	   in the <a href="base_require.xml" target="_top"><span style='white-space: nowrap'>base_require</span></a>
 section.
	   </li><li>

	   Add the <a href="base_alloc.hpp.xml" target="_top"><span style='white-space: nowrap'>base_alloc.hpp</span></a>
 example.
	   </li></ol>



	   <br/>
<br/>
<b><big><a name="02-09" id="02-09">02-09</a></big></b>

	   <ol type="1"><li>
	   Add the 
<code><i><font color="black"><span style='white-space: nowrap'>set_static</span></font></i></code>
 to <a href="memory_leak.xml" target="_top"><span style='white-space: nowrap'>memory_leak</span></a>
.
	   This is necessary for testing base types that allocate memory
	   for each element.
	   </li><li>

	   Fix memory allocation bug in <code><font color="blue">cppad/local/pod_vector.hpp</font></code>
	   when each element of the <a href="base_require.xml" target="_top"><span style='white-space: nowrap'>Base</span></a>
 type allocated memory.
	   </li></ol>


	   <br/>
<br/>
<b><big><a name="01-30" id="01-30">01-30</a></big></b>
<br/>
Make another attempt to fix linking with boost threads where the wrong
	   version of the library is in the system include directory; i.e.,
	   to have <a href="installunix.xml#boost_dir" target="_top"><span style='white-space: nowrap'>boost_dir</span></a>
 override the default
	   library.

	   <br/>
<br/>
<b><big><a name="01-27" id="01-27">01-27</a></big></b>
<br/>
There were some problems with 
	   <a href="installunix.xml#Configure" target="_top"><span style='white-space: nowrap'>configure's</span></a>
 automatic detection of
	   the boost multi-threading library. 
	   These have been fixed.

	   <br/>
<br/>
<b><big><a name="01-24" id="01-24">01-24</a></big></b>
<br/>
It used to be that <a href="thread_alloc.xml" target="_top"><span style='white-space: nowrap'>thread_alloc</span></a>
 did not hold onto memory
	   when 
<code><i><font color="black"><span style='white-space: nowrap'>num_threads</span></font></i></code>
 was one in the previous call to
	   <a href="ta_parallel_setup.xml" target="_top"><span style='white-space: nowrap'>parallel_setup</span></a>
.
	   Holding onto memory is now controlled by the separate routine
	   <a href="ta_hold_memory.xml" target="_top"><span style='white-space: nowrap'>hold_memory</span></a>
.
	   This give the user more control over the memory allocator
	   and the ability to obtain a speed up even 
	   when there is only one thread.
	   To convert old code to the new interface, after each call to
	   
<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;thread_alloc::parallel_setup(</span></font><i><font color="black"><span style='white-space: nowrap'>num_threads</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>in_parallel</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>thread_num</span></font></i><font color="blue"><span style='white-space: nowrap'>);<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font></code>

	   put the following call
	   
<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;thread_alloc::hold_memory(</span></font><i><font color="black"><span style='white-space: nowrap'>num_threads</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&gt;&#xA0;1);<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font></code>


	   <br/>
<b><big><a name="01-23" id="01-23">01-23</a></big></b>
<br/>
Change variable notation and use <a href="optimize.xml" target="_top"><span style='white-space: nowrap'>optimize</span></a>
 in
	   <a href="mul_level.cpp.xml" target="_top"><span style='white-space: nowrap'>mul_level.cpp</span></a>
.

	   <br/>
<br/>
<b><big><a name="01-20" id="01-20">01-20</a></big></b>

	   <ol type="1"><li>
	   Add the example <a href="change_const.cpp.xml" target="_top"><span style='white-space: nowrap'>change_const.cpp</span></a>

	   which shows how to compute derivatives of functions that have
	   parameters that can change (but derivatives are not computed 
				    with respect to these parameters).
	   </li><li>

	   The documentation for machine <a href="epsilon.xml" target="_top"><span style='white-space: nowrap'>epsilon</span></a>

	   has been improved.
(The fact that it can be used for 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 types was missing.)
	   </li></ol>


	   <br/>
<br/>
<b><big><a name="01-19" id="01-19">01-19</a></big></b>

	   <ol type="1"><li>
	   In cases where <code><font color="blue">test.sh</font></code> is trivial,
	   put its operations in corresponding makefile.
	   </li><li>

	   Fix problem compiling <code><font color="blue">cppad/speed/sparse_evaluate.hpp</font></code>
	   under gcc on Fedora 17.
	   </li><li>

	   Run <code><font color="blue">multi_thread/test.sh</font></code> from source directory
	   (no need to copy to build directory).
	   </li></ol>


	   <br/>
<br/>
<b><big><a name="01-16" id="01-16">01-16</a></big></b>
<br/>
The test program <code><font color="blue">multi_thread/test.sh</font></code> failed if the 
	   <a href="installunix.xml#openmp_flags" target="_top"><span style='white-space: nowrap'>openmp_flags</span></a>
 not present in the
	   <code><font color="blue">configure</font></code> command.
	   This has been fixed.
	   In addition, this <code><font color="blue">test.sh</font></code> has been made faster by cycling through
	   the available threading systems instead of doing every system for every
	   test. 

	   <br/>
<br/>
<b><big><a name="01-15" id="01-15">01-15</a></big></b>
<br/>
Fix <code><font color="blue">make test</font></code> so it works when 
	   <a href="installunix.xml#Configure" target="_top"><span style='white-space: nowrap'>configure</span></a>
 is run in the distribution directory
	   
<code><font color="blue"><span style='white-space: nowrap'>cppad-</span></font><i><font color="black"><span style='white-space: nowrap'>yyyymmdd</span></font></i></code>

	   (not just when it is run in a different directory).


	   <br/>
<br/>
<b><big><a name="01-12" id="01-12">01-12</a></big></b>
<br/>
The <code><font color="blue">-lpthread</font></code> library was missing from the 
	   <a href="multi_thread.xml" target="_top"><span style='white-space: nowrap'>multi_thread</span></a>
 test program linker command.
	   This has been fixed.

	   <br/>
<br/>
<b><big><a name="01-07" id="01-07">01-07</a></big></b>

	   <ol type="1"><li>
	   A duplicated code block beginning with
	   <code><font color='blue'><pre style='display:inline'> 
if( fabs( fcur ) &lt;= epsilon_ )
</pre></font></code>

	   was removed from the routine <code><font color="blue">multi_newton_worker</font></code>, in the file
	   <a href="multi_newton_work.cpp.xml" target="_top"><span style='white-space: nowrap'>multi_newton_work.cpp</span></a>
.

	   </li><li>

	   The distance between solutions that are joined to one solution
	   has been corrected from 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>b</mi>
<mo stretchy="false">-</mo>
<mi mathvariant='italic'>a</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">/</mo>
<mo stretchy="false">(</mo>
<mn>2</mn>
<mi mathvariant='italic'>n</mi>
<mo stretchy="false">)</mo>
</mrow></math>

 to
	   
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>b</mi>
<mo stretchy="false">-</mo>
<mi mathvariant='italic'>a</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">/</mo>
<mi mathvariant='italic'>n</mi>
</mrow></math>

; see
	   <a href="multi_newton.cpp.xml#xout" target="_top"><span style='white-space: nowrap'>xout</span></a>
.
	   The correction was in the file <a href="multi_newton_work.cpp.xml" target="_top"><span style='white-space: nowrap'>multi_newton_work.cpp</span></a>
 where
	   <code><font color="blue">sub_length_ / 2</font></code> was change to <code><font color="blue">sub_length_</font></code>.

	   </li></ol>


	   <br/>
<br/>
<b><big><a name="01-02" id="01-02">01-02</a></big></b>

	   <ol type="1"><li>
	   The <a href="thread_alloc.xml" target="_top"><span style='white-space: nowrap'>thread_alloc</span></a>
 memory allocator was changed to avoid
	   certain false sharing situations
	   (cases where two different thread were changing and using memory
	    that is on the same page of cache).
	   On one tests machine, the execution time for the 32 thread case for the test
	   <code><font color='blue'><pre style='display:inline'> 
	   ./openmp_test multi_newton 1 32 1000 4800 10 true
</pre></font></code>

	   improved from  0.0302 seconds to 0.0135 seconds.

	   </li><li>

	   There was a problem with the correctness test section of the
	   <a href="multi_newton_time.cpp.xml" target="_top"><span style='white-space: nowrap'>multi_newton_time.cpp</span></a>
 test.
	   The convergence criteria, and correctness criteria,
	   needed to be scaled by the largest argument values.
	   This was a problem with over a hundred zeros were included in the test
	   (and the largest argument value was 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mn>100</mn>
<mi mathvariant='normal'>&#x003C0;</mi>
</mrow></math>

 or more).

	   </li><li>

	   There was a problem with the way that
	   <a href="multi_newton_work.cpp.xml#multi_newton_combine" target="_top"><span style='white-space: nowrap'>multi_newton_combine</span></a>

	   joined two solutions into one.
	   It is possible that one of the solutions that needs to be joined is on 
the  boundary and very close to a solution in the next (or previous interval)
	   that is not on the  boundary. In this case,
	   the one with the smaller function value is chosen.

	   </li></ol>

	   for the previous 

	   
<hr/>Input File: omh/whats_new_12.omh

</body>
</html>

