How to install Moose: Difference between revisions
| (4 intermediate revisions by the same user not shown) | |||
| Line 135: | Line 135: | ||
If you download the data and open them by Peacock, you expect to observe the 3D grain structures similar to what shown below. |
If you download the data and open them by Peacock, you expect to observe the 3D grain structures similar to what shown below. |
||
[[Image: Grain_structure_moose.png | Grain structure]] |
[[Image: Grain_structure_moose.png | Grain structure]] |
||
== MOOSE Installation on Mac == |
|||
Installing MOOSE on Mac is straightforward. You can simply follow the below instructions online. |
|||
http://mooseframework.org/getting-started/osx/ |
|||
== MOOSE GUI == |
|||
Unfortunately, there are some issues about using Peacock on a cluster, but you are still able to use it to visualize your data or do some simple tests locally (e.g. on your Macbook). Assuming you are using a Mac OS, you can add the following line in your '''~/.bash_profile''' to add Peacock to your PATH. |
|||
export PATH=~/projects/moose/gui:$PATH |
|||
Notice that you need to open Peacock in a directory that has your application's executable. |
|||
cd ~/projects/<your application directory> |
|||
peacock |
|||
And you can run a simulation with it from there. |
|||
cd ~/projects/trunk/<your application directory>/<your test directory> |
|||
peacock -i your_input_file.i |
|||
For detailed instructions, please refer to http://mooseframework.org/wiki/Peacock/. |
|||
Latest revision as of 21:50, 13 June 2017
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`
At the end of the configure step, the system will print out messages on your terminal window. The last printed section contains the make command you will need to enter on your terminal window. At the end of the make step, there will be another message about the make install commands. Just follow them to complete the setup. An example is the following. The specific folder you will need to enter will be different. Just copy and paste the printed out message.
make PETSC_DIR=/tmp/cluster_temp.wowSIm/petsc-3.6.4 PETSC_ARCH=arch-linux2-c-debug all make PETSC_DIR=/tmp/cluster_temp.wowSIm/petsc-3.6.4 PETSC_ARCH=arch-linux2-c-debug install
Clone MOOSE
You can do exactly the same as suggested by their official tutorial.
mkdir ~/projects cd ~/projects git clone https://github.com/idaholab/moose.git cd ~/projects/moose git checkout master
Compile libMesh
This step is straight forward, but you may need some patience. The compilation may take up to an hour.
cd ~/projects/moose scripts/update_and_rebuild_libmesh.sh
Test
cd ~/projects/moose/test make -j8 ./run_tests -j8
The test results should look like
Ran 1329 tests in 191.7 seconds 1328 passed, 51 skipped, 0 pending, 1 FAILED
You may receive one message regarding the failed item,
preconditioners/pbp.lots_of_variables....................................................... FAILED (TIMEOUT)
Don't worry about it. This is a timed test, which most likely indicates that the computer is running slow (or the machine is overburdened).
Phase field module
By default, MOOSE contains several modules, including one for phase field simulations. You can go to the corresponding folder and compile the code there
cd ~/projects/moose/modules/phase_field make
If the compilation is successful, you expect to get the executable phase_field-opt. You can do a simple 3D grain growth simulation interactively.
cd ~/projects/moose/modules/phase_field/examples/grain_growth ../../phase_field-opt -i grain_growth_3D.i
Alternatively, you can submit the job to Certainty using this sample pbs script phasefield_test_Moose.pbs.
cd ~/projects/moose/modules/phase_field/examples/grain_growth qsub phasefield_test_Moose.pbs
The results are saved in a series of files in .exodus format, which can be opened by Paraview, or Peacock (a GUI provided by MOOSE but not compatible with Certainty).
If you download the data and open them by Peacock, you expect to observe the 3D grain structures similar to what shown below.
MOOSE Installation on Mac
Installing MOOSE on Mac is straightforward. You can simply follow the below instructions online. http://mooseframework.org/getting-started/osx/
MOOSE GUI
Unfortunately, there are some issues about using Peacock on a cluster, but you are still able to use it to visualize your data or do some simple tests locally (e.g. on your Macbook). Assuming you are using a Mac OS, you can add the following line in your ~/.bash_profile to add Peacock to your PATH.
export PATH=~/projects/moose/gui:$PATH
Notice that you need to open Peacock in a directory that has your application's executable.
cd ~/projects/<your application directory> peacock
And you can run a simulation with it from there.
cd ~/projects/trunk/<your application directory>/<your test directory> peacock -i your_input_file.i
For detailed instructions, please refer to http://mooseframework.org/wiki/Peacock/.