Installation
============

Included software (configured, built and installed together with CPM):
1. MPIBlib (MPI Benchmark library) - required (for benchmarking MPI communication operations)
2. logp_mpi (The MPI LogP Benchmark, version 1.4) - required (for the PLogP model)

Required software:
1. any C/C++ and MPI (MPICH-1 does not support shared libraries)
2. GSL (GNU Scientific Library, version 1.11)
3. Boost (The Boost C++ libraries: Graph, MPI)

Optional software:
1. R (The R Project for Statistical Computing, version 2.6.1) - optional
   (for estimation of the LMO threshold parameters)
2. Gnuplot (An Interactive Plotting Program) -
   optional (for performance diagrams)
3. Graphviz (Graph Visualization Software: dot) -
   optional (for tree visualization)

GSL
If GSL is installed in a non-default directory
$ export LD_LIBRARY_PATH=DIR/lib:$LD_LIBRARY_PATH

Boost
1. Boost should be configured with at least Graph, MPI and Serialization library.
   bjam is the configuration script used for Boost. 
2.   The default is no component to be built. You can do:
$ ./bjam --with-<component> ... install
  to configure, compile and install the specified components.
3. Default installation directory is DIR=/usr/local
4. Default installation:
 - DIR/include/boost
 - DIR/lib/libboost_library_versions.*
Create symbolic links:
$ cd DIR/include; ln -s boost_version/boost
$ cd DIR/lib; ln -s libboost_[library]_[version].[a/so] libboost_[library].[a/so]
$ export LD_LIBRARY_PATH=DIR/lib:$LD_LIBRARY_PATH

R
1. R should be configured as a shared library
$ ./configure --prefix=DIR --enable-R-shlib=yes
$ make install
2. Set up environment
$ export R_HOME=DIR/lib/R
3. Install required packages
$ DIR/bin/R
> install.packages(c(”sandwich”, ”strucchange”, ”zoo”))
4. If R is installed in a non-default directory
$ export LD_LIBRARY_PATH=$R_HOME/lib:$LD_LIBRARY_PATH

For users
---------

Download the latest package from http://hcl.ucd.ie/project/cpm

$ tar -zxvf cpm-X.X.X.tar.gz
$ cd cpm-X.X.X
$ ./configure
$ make all install

Configuration
-------------

Packages:
  --with-gsl-dir=DIR      GNU Scientific Library directory
  --with-boost-dir=DIR    The Boost C++ libraries directory
  --with-r-dir=DIR        The R Project for Statistical Computing directory

Check configure options:
$ ./configure -h

For developers
--------------

Required software:
1. Subversion
2. GNU autotools
3. Doxygen, Graphviz and any TeX - optional (for reference manual)

$ svn co https://hcl.ucd.ie/repos/CPM/trunk CPM
$ cd CPM
$ autoreconf -i
$ ./configure --enable-debug
$ make all

To create a package:
$ svn log -v > ChangeLog
$ make dist
