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, version 1.36) -
   optional (for tree-based collectives)
4. R (The R Project for Statistical Computing, version 2.6.1) - optional
   (for estimation of the LMO threshold parameters)
5. Gnuplot (An Interactive Plotting Program) -
   optional (for performance diagrams)
6. Graphviz (Graph Visualization Software: dot) -
   optional (for tree visualization)
7. Doxygen (Source code documentation generator tool) and any TeX -
   optional (for reference manual)

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 the Graph library
   (default: all)
$ ./configure --prefix=DIR --with-libraries=graph
2. Default installation:
 - DIR/include/boost_version/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 developers
--------------

Required software:
1. Subversion
2. GNU autotools
3. Doxygen
4. Graphviz

$ svn co https://hcl.ucd.ie/repos/CPM/trunk CPM
$ cd CPM
$ svn log -v > ChangeLog
$ cd MPIBlib
$ svn log -v > ChangeLog
$ cd ..
$ autoreconf --install --force
$ mkdir build
$ cd build
$ ../configure --enable-debug
$ make all install check

To create a package:
$ make dist

For users
---------

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

$ mkdir build
$ cd build
$ ../configure
$ make all install check

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
