                            ==================
                            INSTALLATION GUIDE
                            ==================

CONTENTS:
=========
* WHICH SOFTWARE WILL BE NEEDED
* HOW TO CONFIGURE THE SOFTWARE?
* HOW TO BUILD THE SOFTWARE?
* HOW TO INSTALL THE SOFTWARE?
* TROUBLESHOOTING


================================================================================
WHICH SOFTWARE WILL BE NEEDED?
==============================
The framework requires the following software:

* bash >= 3.0
* CMake >= 2.8 (http://www.cmake.org)
* GCC >= 4.8 (gcc.gnu.org)
* OpenMPI >= 1.6 (http://www.open-mpi.org)
* Boost >= 1.56.0 (http://www.boost.org)
* OTF2 1.4 (http://www.vi-hps.org/projects/score-p/)


================================================================================
HOW TO CONFIGURE THE SOFTWARE?
==============================
* Unpack the tarball using

    tar xvzf haec_sim-<version>.tar.gz

* Go into the root directory and create a build directory named "BUILD".
  Then, go into the directory "BUILD" and execute cmake:

    cd haec_sim-<version>
    mkdir BUILD
    cd BUILD
    cmake ..

  This should create a file named "CMakeCache.txt", containing the paths
  to the software required to build the simulator.
  To generate the documentation, add "-DBUILD_DOC=ON" to the call of cmake:

    cmake -DBUILD_DOC=ON -DCMAKE_INSTALL_PREFIX=<installdir>..


================================================================================
HOW TO BUILD THE SOFTWARE?
==========================
The HAEC simulator and different examples will be built using "make".
The build process can be done in parallel if the underlying system has more
than one core. Then, please use the make option '-j'.

    make


================================================================================
HOW TO INSTALL THE SOFTWARE?
============================
If everything went fine, the software can be installed to the directory
given during the call of the configure script.

    make install

In order to use the installed libraries and scripts the following
environment variables must be set (in ~/.bashrc, e.g.)
where <installdir> is the directory passed to the option "CMAKE_INSTALL_PREFIX".

    export PATH=$PATH:<installdir>/bin


================================================================================
TROUBLESHOOTING
===============
* If the call to "cmake" returns errors (such as not found paths to software
  upon which the simulator depends), one can manually write the configuration
  paths by executing on of the following commands from the folder "BUILD":

    # 1) This is the interactive cmake mode.
    cmake -i ..
    # 2) Please run it from the folder BUILD.
    ccmake .

* If the build fails due to non-standard paths for Boost,
  then set the cmake option

    BOOST_WORKAROUND=ON

  by running 'ccmake' in the folder "BUILD".

* For Mac OSX users: The OpenMPI port can be installed as follows:

    sudo port install openmpi +gcc48

 * For Mac OSX users : The Boost port can be installed as follows:

    sudo port install boost +no_single +no_static +openmpi +python33
