Wiki

Clone wiki

mofem-joseph / Installation on Red Hat Linux v02

Install MoFEM v 0.2 Cephas on Red Hat

The following procedure has been tested on Red Hat Enterprise Linux Workstation v. 6.4 & 6.5. If you have any problems, feedback or would like to suggest corrections, please email cmatgu@googlegroups.com.

(1) Open a terminal and login as root

su

(2) Download and install PETSc 3.5.2.

$ cd /opt/
$ wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.2.tar.gz
$ tar -xvvzf petsc-lite-3.5.2.tar.gz
$ cd petsc-3.5.2
$ ./configure --with-fc=/usr/lib64/openmpi/bin/mpif90 --with-cc=/usr/lib64/openmpi/bin/mpicc --with-cxx=/usr/lib64/openmpi/bin/mpicxx --download-superlu_dist=1 --download-metis=1 --download-parmetis=1 --download-hypre=1 --with-mumps=1 --download-mumps=1 --download-fblaslapack=1 --download-scalapack=1 --download-blacs=1  --with-debugging=0
$ make PETSC_DIR=/opt/petsc-3.5.2 PETSC_ARCH=arch-linux2-c-opt all
$ make PETSC_DIR=/opt/petsc-3.5.2 PETSC_ARCH=arch-linux2-c-opt test
$ make PETSC_DIR=/opt/petsc-3.5.2 PETSC_ARCH=arch-linux2-c-opt streams NPMAX=<number of processors>
$ cd ..

(3) Download and install MOAB 4.7.0.

First, we need to unstall the previous version of MOAB, then we can download the latest version and install

$ cd /opt/mofem/moab-4.6.0
$ make uninstall
$ wget http://ftp.mcs.anl.gov/pub/fathom/moab-4.7.0RC1.tar.gz
$ tar -xvvzf moab-4.7.0RC1.tar.gz
$ cd moab-4.7.0
$ ./configure  --with-mpi=/usr/lib64/openmpi/ --prefix=/opt/local-moab-4.7.0 --enable-optimize
$ make install
$ cd ..

(4) Download and install TetGen 1.5.0.

$ cd /opt
$ wget https://bitbucket.org/likask/mofem-joseph/downloads/tetgen1.5.0.tgz
$ tar -xvvzf tetgen1.5.0.tgz\Signature\=. . . 
$ cd tetgen1.5.0
Note, the file name of the downloaded TetGen tar contains a time-and-date specific identifier; press <tab> to complete the file name.
$ cmake tetgen1.5.0
$ make
$ cp libtet.a tetgen1.5.0/lib/
$ exit

Now PETSc, MOAB and TetGen are installed, we can install MoFEM Cephas.

(5) Download and install MoFEM Cephas

(5a) Open a new terminal

$ cd
$ git clone https://bitbucket.org/likask/mofem-cephas.git mofem-cephas

(5b) Here, we need to rename the old MoFEM Joseph installation, which will currently be called either 'build_mofem' or 'mofem_build' so please change accordingly

$ mv build_mofem build_mofem_old
$ mv local local_old

(5c) Create a new directory for MoFEM Cephas and install

$ mkdir mofem-build
$ cd mofem-build
$ cmake -DCMAKE_BUILD_TYPE=Release -DPETSC_DIR=/opt/petsc-3.5.2 -DPETSC_ARCH=arch-linux2-c-opt -DMOAB_DIR=/opt/local-moab-4.7.0/ -DTETGEN_DIR=/opt/tetgen1.5.0 -DCMAKE_CXX_FLAGS="-I/opt/mofem/boost_1_54_0" -DCMAKE_INSTALL_PREFIX=$HOME/mofem-cephas-user-modules ../mofem-cephas/mofem_v0.2/
$ make -j2
$ make install
$ cd

(5d) Install MoFEM user-modules

$ cd mofem-cephas-user-modules
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-I/opt/mofem/boost_1_54_0" users_modules

(5e) Modify the '.bashrc' file

$ cd
$ gedit .bashrc

Or you can use a different editor. Add the following lines at the end of the file:

PATH=$HOME/mofem-cephas-user-modules/bin:$PATH
export PATH
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:/opt/petsc-3.5.2/arch-linux2-c-opt/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
Save and exit the editor.

(5f) Open a new terminal and type

$ which mofem_update.sh
which, if the changes to '.bashrc' have worked, should return:
~/mofem-cephas-user-modules/bin/mofem_update.sh
If you do not get this, return to step (5e) and check the additional lines added to '.bashrc'.

(5g) Update MoFEM and test the code

$ mofem_update.sh
$ mofem_build.sh
$ mofem_fast_check.sh

(6) Installation complete

MoFEM Cephas is now ready to use. However, it is important to note that the file structure in version 0.2 is different from that in version 0.1. Files are now stored in 'mofem-cephas-user-modules'. For example, when running a fracture analysis file arc_length.sh:

  • in MoFEM version 0.1: examples/material_forces/arc_length.sh

  • in MoFEM version 0.2: mofem-cephas-user-modules/fracture_mechanics/arc_length.sh

and similar for other analyses. To go to the MoFEM Cephas webpage click here and use the links on the left to navigate.


  • Created by Ross Mackenzie
  • any difficulties or suggestions email cmatgu@googlegroups.com

Back to Home Page

Updated