Codebase list cppad / upstream/2015.00.00.7 doc / adolc_prefix.xml
upstream/2015.00.00.7

Tree @upstream/2015.00.00.7 (Download .tar.gz)

adolc_prefix.xml @upstream/2015.00.00.7raw · history · blame

<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>Including the ADOL-C Examples and Tests</title>
<meta http-equiv='Content-Type' content='text/html' charset='utf-8'/>
<meta name="description" id="description" content="Including the ADOL-C Examples and Tests"/>
<meta name="keywords" id="keywords" content=" including the adol-c examples and tests adolc example test purpose adolc_prefix prefix speed unix cygwin get_adolc get "/>
<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='_adolc_prefix_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="cmake.xml" target="_top">Prev</a>
</td><td><a href="get_adolc.sh.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>Install</option>
<option>cmake</option>
<option>adolc_prefix</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>preprocessor</option>
<option>multi_thread</option>
<option>library</option>
<option>ipopt_solve</option>
<option>Example</option>
<option>speed</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>Install-&gt;</option>
<option>download</option>
<option>cmake</option>
<option>cmake_check</option>
<option>pkgconfig</option>
<option>InstallUnix</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>cmake-&gt;</option>
<option>adolc_prefix</option>
<option>colpack_prefix</option>
<option>eigen_prefix</option>
<option>fadbad_prefix</option>
<option>ipopt_prefix</option>
<option>sacado_prefix</option>
<option>cppad_testvector</option>
</select>
</td>
<td>
<select onchange='choose_down0(this)'>
<option>adolc_prefix-&gt;</option>
<option>get_adolc.sh</option>
</select>
</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Purpose</option>
<option>adolc_prefix</option>
<option>Examples</option>
<option>Speed Tests</option>
<option>Unix</option>
<option>Cygwin</option>
<option>get_adolc</option>
</select>
</td>
</tr></table><br/>




<center><b><big><big>Including the ADOL-C Examples and Tests</big></big></b></center>
<br/>
<b><big><a name="Purpose" id="Purpose">Purpose</a></big></b>
<br/>
CppAD includes examples and tests that can use the AD package
<a href="https://projects.coin-or.org/ADOL-C" target="_top"><span style='white-space: nowrap'>ADOL-C</span></a>
.
The includes speed comparison with other AD packages; see
<a href="speed_adolc.xml" target="_top"><span style='white-space: nowrap'>speed_adolc</span></a>
.
It also includes examples that combine ADOL-C with
CppAD; see 
<table><tr><td align='left'  valign='top'>

<a href="base_adolc.hpp.xml" target="_top">base_adolc.hpp</a></td><td>
Enable use of AD&lt;Base&gt; where Base is Adolc's adouble Type</td></tr>
<tr><td>

<a href="mul_level_adolc.cpp.xml" target="_top">mul_level_adolc.cpp</a></td><td>
Using Adolc with Multiple Levels of Taping: Example and Test</td></tr>
<tr><td>
 
<a href="mul_level_adolc_ode.cpp.xml" target="_top">mul_level_adolc_ode.cpp</a></td><td>
Using Adolc with Taylor's Ode Solver: An Example and Test</td></tr>
<tr><td>

</td></tr>
</table>
<br/>
<b><big><a name="adolc_prefix" id="adolc_prefix">adolc_prefix</a></big></b>


<br/>
If ADOL-C is installed on your system, you can 
specify a value for its install 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 on the
<a href="cmake.xml" target="_top"><span style='white-space: nowrap'>cmake</span></a>
 command line.
The value of 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 must be such that,
for one of the directories 
<code><i><font color="black"><span style='white-space: nowrap'>dir</span></font></i></code>
 in
<a href="cmake.xml#cmake_install_includedirs" target="_top"><span style='white-space: nowrap'>cmake_install_includedirs</span></a>
,

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i><font color="blue"><span style='white-space: nowrap'>/</span></font><i><font color="black"><span style='white-space: nowrap'>dir</span></font></i><font color="blue"><span style='white-space: nowrap'>/adolc/adouble.h<br/>
</span></font></code>
is a valid way to reference to the include file <code><font color="blue">adouble.h</font></code>; 
Note that CppAD assumes ADOL-C has been configured with
its sparse matrix computations enabled; i.e, using

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;--with-colpack=</span></font><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i><font color="blue"><span style='white-space: nowrap'><br/>
</span></font></code>
In other words ColPack is installed and
with the same prefix as ACOL-C; see
<a href="get_colpack.sh.xml" target="_top"><span style='white-space: nowrap'>get_colpack.sh</span></a>
.

<br/>
<br/>
<b><big><a name="Examples" id="Examples">Examples</a></big></b>


<br/>
If you include 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 on the <a href="cmake.xml" target="_top"><span style='white-space: nowrap'>cmake</span></a>
 command line,
you will be able to run the ADOL-C examples listed above
by executing the following commands starting in the
<a href="download.xml#Distribution Directory" target="_top"><span style='white-space: nowrap'>distribution&#xA0;directory</span></a>
:

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;cd&#xA0;build/example<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;make&#xA0;check_example<br/>
</span></font></code>
If you do this,
you will see an indication that the examples
<code><font color="blue">mul_level_adolc</font></code> and <code><font color="blue">mul_level_adolc_ode</font></code>
have passed their correctness check.

<br/>
<br/>
<b><big><a name="Speed Tests" id="Speed Tests">Speed Tests</a></big></b>


<br/>
If you include 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 on the <a href="cmake.xml" target="_top"><span style='white-space: nowrap'>cmake</span></a>
 command line,
you will be able to run the ADOL-C speed correctness tests 
by executing the following commands starting in the
<a href="download.xml#Distribution Directory" target="_top"><span style='white-space: nowrap'>distribution&#xA0;directory</span></a>
:

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;cd&#xA0;build/speed/adolc<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;make&#xA0;check_speed_adolc<br/>
</span></font></code>
After executing <code><font color="blue">make check_speed_adolc</font></code>, 
you can run a specific ADOL-C speed tests 
by executing the command <code><font color="blue">./speed_adolc</font></code>;
see <a href="speed_main.xml" target="_top"><span style='white-space: nowrap'>speed_main</span></a>
 for the meaning of the command line
options to this program.

<br/>
<br/>
<b><big><a name="Unix" id="Unix">Unix</a></big></b>


<br/>
If you are using Unix, 
you may have to add 

<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 to <code><font color="blue">LD_LIBRARY_PATH</font></code>.
For example, if you use the <code><font color="blue">bash</font></code> shell to run your programs,
you could include

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;LD_LIBRARY_PATH=</span></font><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i><font color="blue"><span style='white-space: nowrap'>/lib:${LD_LIBRARY_PATH}<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;export&#xA0;LD_LIBRARY_PATH<br/>
</span></font></code>
in your <code><font color="blue">$HOME/.bashrc</font></code> file.

<br/>
<br/>
<b><big><a name="Cygwin" id="Cygwin">Cygwin</a></big></b>


<br/>
If you are using Cygwin, 
you may have to add to following lines to the file
<code><font color="blue">.bashrc</font></code> in your home directory:

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;PATH=</span></font><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i><font color="blue"><span style='white-space: nowrap'>/bin:${PATH}<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;export&#xA0;PATH<br/>
</span></font></code>
in order for ADOL-C to run properly.
If 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 begins with a disk specification,
you must use the Cygwin format for the disk specification.
For example, 
if <code><font color="blue">d:/adolc_base</font></code> is the proper directory,
<code><font color="blue">/cygdrive/d/adolc_base</font></code> should be used for 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
.


<br/>
<br/>
<b><big><a name="get_adolc" id="get_adolc">get_adolc</a></big></b>


<br/>
If you are using Unix, you can download and install
a copy of Adolc using <a href="get_adolc.sh.xml" target="_top"><span style='white-space: nowrap'>get_adolc.sh</span></a>
.
The corresponding 
<code><i><font color="black"><span style='white-space: nowrap'>adolc_prefix</span></font></i></code>
 would be
<code><font color="blue">build/prefix</font></code>.


<hr/>Input File: omh/install/adolc_prefix.omh

</body>
</html>