![]() |
Prev | Next | InstallUnix |
20071016.0
is the
year, month, and date corresponding to the current version of CppAD.
Download either the CPL or GPL licensed version from:
tar -xvzf cppad-20071016.0.
license.tgz
(where license is cpl
or gpl
)
to decompress and extract the unix format version
into the distribution directory
cppad-20071016.0
All of the commands below are to be executed starting from this
directory.
doc
sub-directory of the distribution directory
contains user documentation for CppAD.
The files doc/
*.htm
are in HTML format.
If your browser supports XHTML+MATHML format,
an easier to read copy is available in the files
doc/
*.xml
.
dev
sub-directory of the distribution directory
contains developer documentation for CppAD.
./configure \
--prefix=
PrefixDir \
--with-Documentation \
--with-Introduction \
--with-Example \
--with-TestMore \
--with-Speed \
--with-PrintFor \
--with-SpeedExample \
--with-profiling \
--with-stdvector \
POSTFIX_DIR=
PostfixDir \
ADOLC_DIR=
AdolcDir \
FADBAD_DIR=
FadbadDir \
BOOST_DIR=
BoostDir \
CPP_ERROR_WARN=
CppErrorsAndWarnings \
where only the configure
command need appear.
The entries one each of the other lines are optional
and the text in italic is replaced values that you choose.
$HOME
i.e., by default the CppAD include files
will install in $HOME
.
If you want to install elsewhere, you will have to use this option.
As an example of using just the --prefix
option,
if you have permission to write into the directory
/usr/local/include
./configure --prefix=/usr/local
will set up for installing the CppAD include files in the directory
/usr/local/include/cppad
This is the standard location for such files on many systems.
In this case, PrefixDir is /usr/local
.
--with-Documentation
is specified,
the CppAD documentation HTML and XML files are copied to the directory
PrefixDir/share/doc/cppad-
version/*
In this case, the top of the CppAD HTML documentation tree
(with mathematics displayed as LaTex command) will be located at
PrefixDir/share/doc/cppad-
version/cppad.htm
and the top of the XML documentation tree
(with mathematics displayed as MathML) will be located at
PrefixDir/share/doc/cppad-
version/cppad.xml
--with-Introduction
is specified,
the get_started.cpp
example will be built.
Once the make
command
has been executed, you can run this example by executing the command
introduction/get_started/get_started
--with-Introduction
is specified,
the exp_apx_main.cpp
program
(verifies calculations in the Introduction
exp_apx
example)
will be built.
Once the make
command
has been executed, you can run these examples by executing the command
introduction/exp_apx/exp_apx
--with-Example
is specified,
the Example.cpp
program
(an extensive set of examples and correctness tests) will be built.
Once the make
command
has been executed, you can run these examples by executing the command
example/example
--with-TestMore
is specified,
another extensive set of correctness tests will be compiled by the
make
command. Once the make
command
has been executed, you can run these tests by executing the command
test_more/test_more
--with-Speed
is specified,
the speed/cppad/speed_cppad_run/
program
(a set of CppAD speed tests) will built.
After you execute the make
command,
you can compile and run the speed_cppad
tests.
--with-PrintFor
is specified,
the PrintFor.cpp
example will be built.
Once the make
command
has been executed, you can run this example by executing the command
print_for/print_for
--with-SpeedExample
is specified,
the speed test examples will be built.
Once the make
command
has been executed, you can run this example by executing the command
speed/example/example
--with-profiling
is specified
(in addition to the argument --with-Speed
)
a program called speed/profile/profile
is generated.
In this case, the following commands will profile the speed tests:
speed/profile/profile
option
gprof -b speed/profile/profile
Running the speed/profile/profile
program is documented in
speed_main
.
If you are using a windows operating system with Cygwin or MinGW,
you may have to replace profile
by profile.exe
in the gprof
command above; i.e.,
gprof -b speed/profile/profile.exe
In C++, template parameters and argument types become part of a
routines's name.
This can make the gprof
output hard to read
(the routine names can be very long).
You can remove the template parameters and argument types from the
routine names by executing the following command
gprof -b speed/profile/profile | sed -f speed/profile/gprof.sed
If you are using a windows operating system with Cygwin or MinGW,
you would need to use
gprof -b speed/profile/profile.exe | sed -f speed/profile/gprof.sed
--with-stdvector
is specified,
the default definition this template class is replaced by
std::vector
(In this case BoostDir must not also be specified.)
By default, there is no postfix directory.
As an example of using both the
--prefix
and POSTFIX_DIR
options,
./configure --prefix=/usr POSTFIX_DIR=test
will set up for installing the CppAD include files in the directory
/usr/include/test/cppad
AdolcDir/include/adolc/adouble.h
is a valid way to reference adouble.h
.
In this case,
after you execute the make
command,
you can compile and run the speed_adolc
tests.
If you are using Cygwin,
you will have to add to following lines to the file
.profile
in your home directory:
PATH=
AdolcDir/bin:${PATH}
export PATH
in order for Adolc to run properly.
If AdolcDir begins with a disk specification,
you must use the Cygwin format for the disk specification.
For example,
if d:/adolc_base
is the proper directory,
/cygdrive/d/adolc_base
should be used for AdolcDir.
FadbadDir/FADBAD++/badiff.h
is a valid reference to badiff.h
.
In this case,
after you execute the make
command,
you can compile and run the speed_fadbad
tests.
CPPAD_TEST_VECTOR
is
CppAD::vector
.
If the command line argument
BOOST_DIR=
BoostDir
is present, it must be such that
BoostDir/boost/numeric/ublas/vector.hpp
is a valid reference to the file vector.hpp
.
In this case, the default definition of CPPAD_TEST_VECTOR
is replaced by
boost::numeric::ublas::vector
(see boost
).
If BoostDir is present, the argument --with-stdvector
must not be present.
CPP_ERROR_AND_WARN="-Wall -ansi"
would specify that error and warning flags -Wall
and -ansi
should be included
in all the C++ compile commands.
The error and warning flags chosen must be valid options
for the C++ compiler.
The default value for CppErrorsAndWarnings is the
empty string.
make
will compile all of the examples and tests.
An extensive set of examples and tests can be run as described under
the headings
--with-Introduction
,
--with-Example
,
--with-TestMore
,
--with-Speed
,
--with-PrintFor
,
AdolcDir
, and
FadbadDir
above.
make install
This will install CppAD in the location specified by
PrefixDir
and
PostfixDir
.