https://github.com/CSCsw/LivarH
Raw File
Tip revision: 7d7a8897155e03fb9b9fb7ec73c576d918073384 authored by Mu Wang on 06 August 2015, 20:15:20 UTC
update README
Tip revision: 7d7a889
README
##ADOL-C 2.5.2 with LivarH.
When to use LivarH, include "adolc/hessian/edge_main.h" in the header file.
Then after tracing the objective function using ADOL-C trace_on()/trace_off(),
call the following function to evaluate the Hessian using LivarH.
For more information, refer to "src/hessian/edge_main.cpp".

int edge_hess( 
    short          tag,        /* tape identification                     */ 
    int            dep,        /* consistency chk on # of dependents      */ 
    int            indep,      /* number of independent variables         */ 
    const double  *basepoint,  /* independant variable values             */ 
    int           *nnz,        /* number of nonzeros                      */ 
    unsigned int **rind,       /* row index                               */
    unsigned int **cind,       /* column index                            */
    double       **values,     /* non-zero values                         */
    int           *options     /* control options                         */
                               /* options[0] = 0 (Default) LivarH         */
                               /*            = 1 LivarHAcc (preaccumulation) */
                               /* options[1] = 0 Deprecated               */
);

##A Simple installation guide (GNU toolchain required):
1. Installing ColPack
1.1: Download ColPack from https://github.com/CSCsw/ColPack, and go to the directory.
1.2: Run "autoreconf --install"
1.3: Run "automake"
1.4: Configure the ColPack with "./configure --prefix=$ColPackHome", where "$ColPackHome" is the directory you want to put ColPack at.
1.5: Run "make;make install"

2. Install ADOL-C with LivarH (Requires ColPack)
2.1: Download ADOL-C from https://github.com/CSCsw/LivarH, and go to the directory.
2.2: Run "autoreconf --install"
2.3: Run "automake"
2.4: Configure the ADOL-C with "./configure --prefix=$ADOLCHOME --enable-sparse --with-colpack=$ColPackHOME --enable-addexa"
2.5: Run "make;make install"
2.6: Check your installation: go to "./ADOL-C/examples/additional_examples/sparse", check if "sparse_jacobian" and "sparse_hessian" are functional. 
2.7: Note: computation hessian with preaccumulation is disabled with this configure.

3. Install ADOL-C with LivarHAcc enabled
3.1 - 3.3: Same as 2.1 - 2.3
3.4: Configure the ADOL-C with "./configure --prefix=$PREACCHOME --enable-preacc"
3.5: Run "make;make install"
3.6: Note: In 3.4, when configure preacc, there will be a warning message indicating that computing Hessian via preaccumulation with "asin/acos/atan/asinh/acosh/atanh" might give incorrect.

## ADOL-C (Native ADOL-C README)

This new version of ADOL-C features new library functions for

  - sparse Jacobians and sparse Hessians 
  - external differentiated functions
  - optimal checkpointing
  - adapted differentiation of fixed point iterations
  - parallel differentiation of OpenMP-parallel loops
    
and many bug fixes. 

Furthermore the source code was adapted to allow a compilation with
WINDOWS compilers. See file "INSTALL" for generic installation 
instructions and special instructions for the installation on a WINDOWS
platform.
 
The complete documentation can be found in the subdirectory "doc".



LOCAL INSTALLATION
==================

1. Run configure with possibly using one of these options:

  --prefix=PREFIX         install library and header files in PREFIX
                          (default: ${HOME}/adolc_base)
 
  --enable-sparse           build sparse drivers [default=no]

  --with-openmp-flag=FLAG use FLAG to enable OpenMP at compile time
                          [default=none]

  --enable-docexa           build documented examples [default=no]
  --enable-addexa           build additional examples [default=no]
  --enable-parexa           build parallel example [default=no], if yes
                          -with-openmp-flag=FLAG required

  --with-cflags=FLAGS     use CFLAGS=FLAGS (default: -O3 -Wall -ansi)
  --with-cxxflags=FLAGS   use CXXFLAGS=FLAGS (default: -O3 -Wall)

2. Type make 

3. Type make install

   By default, `make install' will install all the files in ${PREFIX}/lib and
   ${PREFIX}/include. You can specify another installation directory by using
   the --prefix-option in the configure call.

This procedure provides all makefiles required in the approporate directories.
Execute 'configure --help' for more details on other available option.



Nonlocal installation
=====================

As mentioned in INSTALL one can configure the adolc package to be installed
in a different directory than "${HOME}/adolc_base" by using the "--prefix=PATH"
configure option. This is typically used for global installations. Common PATHs
are "/usr" and "/usr/local/", and others are known to be used. Fine control
over the installation directories can be gained by supplying additional
configure options. See "./configure --help" for details.

Completing the installation by executing "make install" requires write
permissions for all target directories. Make sure to have them or the result
may be surprising otherwise.

A global installation can be helpfull if many users need the library. By adding
the library's path to "/etc/ld.so.conf" the usage of LD_LIBRARY_PATH and the
"-L" link switch becomes unnecessary. In many cases, for instance for
PATH=/usr/local, the use of the -I directive for compiling sources becomes 
unnecessary too.



Examples
========

Examples must be configured to build by using the configure switches 
   --enable-docexa or --enable-addexa.
They will never be installed by make install but can be found in the
appropriate example subdirectory.



Windows Compilation with Visual Studio
======================================

Please refer to the file windows/Readme_VC++.txt for building the library and 
ADOL-C/examples/Readme_VC++.txt for the documented examples. 



Enjoy this new version!

back to top