Installation

Prerequisites

MESH comes with two versions: one has OpenMP support if the system has OpenMP libraries; one has MPI support. Both of them require the following prerequisites:

  • Lapack and blas (or blas mutants, such as openblas, atlas, or mkl). For MacOS this is not necessary.
  • Lua (optional) version >= 5.2 (version 5.3.x is preferred). Required for Lua versions of MESH.
  • Python (optional) currently only Python 2 is supported.

In order to have the MPI version of MESH installed, one needs to install MPI besides the above two libraries.

MESH can be downloaded by

git clone git@github.com:kfrancischen/MESH.git
cd MESH

Below are the instructions on install the Lua version:

Installation on Linux

installation of CPP openmp version (no Lua required)

The CPP-only version can be installed by

make -f Makefile.without_lua

This command line will generate static MESH library called libmesh.a in build/ folder, and can be used to compile along with C code.

installation of Lua vanilla version (no MPI required)

If the above libraries are installed on the system default directory, The vanilla version of MESH can be simply installed by

make mesh

Installing this version does not require MPI packages. The executable can be found in directory build/. The executable is called mesh.

installation of Lua MPI version (MPI required)

The MPI version can be installed by

make meshMPI

The executables can be found in directory build/. The executable is called meshMPI.

For a customized installation, please change the paths for compilers in Makefile.Linux. For OpenMP support, one can add (replace with the maximum number of cores supported by the computer)

export OMP_NUM_THREADS=4

to the .bashrc file.

installation of Python version (Python required)

To Install Python version, please modify gensetup.py.sh, and then

make meshPy

Installation on MacOS

Default clang compiler does not support OpenMP. One can either follow the same steps exactly the same as the installation on Linux machines (then no OpenMP is not supported), or installing gcc with OpenMP first by

brew install gcc --without-multilib

and then change the compiles from cc and c++ in Makefile.Darwin to corresponding GNU compilers, and add -fopenmp in the CFLAGS and CXXFLAGS. The installation options are exactly the same as the installation on Linux.

Installation on Windows

The easiest way to install mesh on windows is to download Ubuntu on Windows and follow the instructions in the Linux installation part. With Ubuntu on Windows, one can do sudo apt get for the required packages.

Location on Clusters

The mesh has been built on hera, comet and stampede. The executables are in the directory

/home/kfchen/MESH/build/

One can add this to one's own path by adding

export PATH="$PATH:/home/kfchen/MESH/build/"

in .bashrc (on stampede it is .profile for bash).

In addition, on hera, please add the following line to .bashrc

export LD_LIBRARY_PATH="LD_LIBRARY_PATH:/home/kfchen/mkl/mkl/lib/intel64"

On comet, please add the following to your job submission file

module purge
module load gnu
module load gnutools
module load mkl
module load openmpi_ib

and on stampede:

module purge
module load gcc
module load mvapich2
module load mkl

For a job that use more than cores for comet and cores for stampede, MPI version should be used. On hera, the OpenMP version is recommended.

(Update for stampede2, 09/27/2017):
For stampede2 please change module load mvapich2 to module load impi

If one wants to install MESH on his/her own directory, one hera please use

make -f Makefile.hera

On comet please install Lua at the same directory as MESH and type

module purge
module load gnu
module load gnutools
module load mkl
module load openmpi_ib
make -f Makefile.comet

On stampede please install Lua at the same directory as MESH and type

module purge
module load gcc
module load mvapich2
module load mkl
make -f Makefile.stampede

On clusters, both OpenMP version and MPI version will be generated.

Currently the Python version hasn't been tested on comet and stampede. For Python MPI support, one needs mpi4py