Getting Started

Prerequisites

Before installation you need to ensure that your machine is equiped with the following:

Python

Please note that in order to install mapp you should have write privilages over the python that you are using. If not you can follow these instruction:

Download the latest version of python and unpack it, enter the directory of source code and configure the source code. You might need to specify the location of installation to a place where you have write privilages. For example:

$ ./configure --prefix=$HOME/MyPython

if the configuration finishes with out any problem you can compile the code by executing

$ make

and to finalize the installation execute

$ make install

NumPy

Easiest way to install numpy is by executing

$ $HOME/MyPython/bin/pip install numpy

Please note that pip does not come with python installation by default. If your python is not equipped with pip you can follow the instruction here

$ wget https://bootstrap.pypa.io/get-pip.py
$ $HOME/MyPython/bin/python get-pip.py
$ rm get-pip.py
$ $HOME/MyPython/bin/pip install numpy

Download

MAPP can be downloaded directly from github or simply execute the following in terminal

$ git clone http://github.com/sinamoeini/mapp4py

Installation

There are two ways that mapp can be installed, outlined below. My personal favorite is using Makefile due to its capability of compilation in parallel.

setup.py

Couple of the samples of setup.py are provided in the source code, choose the one that is more appropriate and edit it. The variables that need modifying are: mpi_lib, mpi_lib_dir, and mpi_include_dir. If your cluster//computer is equiped with mpi compilers you can deduce these variables by executing

$ mpic++ -show

If your default compilers are not equipped with C++11, you need to modify os.environ["CC"] and os.environ["CXX"]. Once the setup.py is ready execute:

$ $HOME/MyPython/bin/python setup.py install

Makefile

Couple of the samples of Makefile are provided in the source code, choose the one that is more appropriate and edit it according to your cluster settings. To compile execute

$ make py

If you want to compile in parallel instead you can execute:

$ make py -j

to finallize installation:

$ make install

Execution

Onc you are done with installation and you have created an input script, mapp can be executed like regular python scripts. For example if you want to use 4 processors execute:

$ mpiexec -n 4 $HOME/MyPython/bin/python input.py