How to install Moose

From Micro and Nano Mechanics Group
Revision as of 18:22, 6 June 2017 by Yanmingw (talk | contribs)
Jump to navigation Jump to search

How to install MOOSE

Yanming Wang

June, 2017



MOOSE, short for Multiphysics Object-Oriented Simulation Environment, is a finite-element multi-physics framework developed by Idaho National Laboratory. Here we briefly describe how to install MOOSE on the Certainty cluster.

System requirements

The installation of MOOSE requires Compiler: C++11 Compliant GCC 4.8.4, Clang 3.4.0, Intel20130607, and Python 2.7+. On Certainty, they are provided as modules, so you can simply type the following commands to load them,

module load gnu/4.7.2
module load clang/3.5.2
module load gnu/5.2
module load openmpi/1.10.2-gnu-5.2
module load cmake/2.8.12.2

Or you can copy and paste them in your ~/.bashrc file, which will load the modules automatically when you login to Certainty. Notice that on Certainty clang requires some libraries from gnu/4.7.2, so that you have to load gnu/4.7.2 first and update it later (to gnu/5.2 in this case) to satisfy the MOOSE requirement. Also, the version of openmpi compiler should be compatible with the gcc compiler.

Installation

The procedures of MOOSE installation is given in details on their official website.

PETSc

First, you need to install PETSc following the following steps. (mostly follow the official tutorial)

PREFIX Setup

export CLUSTER_TEMP=`mktemp -d /tmp/cluster_temp.XXXXXX`
export PACKAGES_DIR=$HOME/moose-compilers

Download Software

cd $CLUSTER_TEMP
curl -L -O http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.6.4.tar.gz

Extract Software

cd $CLUSTER_TEMP
tar -xf petsc-3.6.4.tar.gz

Create MOOSE Profile

Make note of your $PACKAGES_DIR:

echo $PACKAGES_DIR

Edit the following file:

$HOME/.moose-profile

Add the following content to that file:

export PACKAGES_DIR=INSERT-PACKAGES-DIR-HERE!!!!
export CC=mpicc
export CXX=mpicxx
export F90=mpif90
export F77=mpif77
export FC=mpif90

export ARCH=gcc
export PETSC_DIR=$PACKAGES_DIR/petsc/petsc-3.6.4/$ARCH-opt

And run,

source ~/.moose-profile

Build and Install PETSc

cd $CLUSTER_TEMP/petsc-3.6.4
./configure \
--prefix=$PETSC_DIR \
--download-hypre=1 \
--with-ssl=0 \
--with-debugging=yes \
--with-pic=1 \
--with-shared-libraries=1 \
--with-cc=mpicc \
--with-cxx=mpicxx \
--with-fc=mpif90 \
--download-fblaslapack=1 \
--download-metis=1 \
--download-parmetis=1 \
--download-superlu_dist=1 \
--download-scalapack=1 \
--download-mumps=1 \
CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif77 F90=mpif90 \
CFLAGS='-fPIC -fopenmp' \
CXXFLAGS='-fPIC -fopenmp' \
FFLAGS='-fPIC -fopenmp' \
FCFLAGS='-fPIC -fopenmp' \
F90FLAGS='-fPIC -fopenmp' \
F77FLAGS='-fPIC -fopenmp' \
PETSC_DIR=`pwd`

During the installation, the system will pop up messages on your terminal window, suggesting make / make install commands. Just follow them to complete the setup.