How to Compile Kratos on the Acuario Cluster

From KratosWiki
Jump to: navigation, search

The following tutorial is intended to facilitate the compilation of the Kratos on CIMNE's cluster "Acuario".

In the following we will assume that the new_user is a member of the "kratos" group defined on the server, which will provide him with the access to all of the libraries which are needed for a standard compilation.


Contents

Customarization needed for the user account

Edit the file ".bashrc" and add at the end of it the following code:

  #OpenMPI use
  module load openmpi/1.6.2
  #adding kratos common libraries to the library path
  export LD_LIBRARY_PATH=/home/kratos_common/compiled_libraries/boost/lib:${LD_LIBRARY_PATH}
  export PYTHONPATH=/home/kratos_common/compiled_libraries/boost/lib:${PYTHONPATH}
  #Trilinos libs
  export LD_LIBRARY_PATH=/home/kratos_common/compiled_libraries/trilinos-10.6.4/lib/:${LD_LIBRARY_PATH}

Getting Kratos from repository

You can get the last version of kratos from repository using following command:

 svn checkout  https://svn.cimne.upc.edu/p/kratos/kratos

Configuration file to be used in the compilation

A standard configuration file, which compiles all of the applications in the Kratos can be found in

  /home/kratos_common/acuari_configure.sh

You should copy this to your cmake_build kratos directory and use it for compilation. Changing to the Kratos/cmake_build directory in your account and type the following command:

cp /home/kratos_common/acuari_configure.sh .

Running Examples

Scalar or OpenMP parallel-application examples can be run "on-line" using the standard compilation commands. For longer jobs it's mandatory to be submitted to the queue. Full details on how to do this are given on the Cluster's webpage http://hpc.cimne.upc.edu

The following example shows how to run (again in online mode) the MPI example "cantilever2d", which is contained in the directory

   kratos/applications/trilinos_application/test_examples/cantilever2d.gid

running 4 processes, distributed between 2 of the cluster nodes (pez001 and pez002) can be obtained as follows:

   mpirun --np 4 --host pez001,pez002 python cantilever_aztec.py

Cluster's Documentation

The documentation on how to run programs in Acuario can be found here:

http://hpc.cimne.upc.edu

There is a Quick Howto that explains how to prepare run scripts for OpenMP, MPI and Serial jobs.

Trilinos Compilation

The trilinos has been compiled and installed in

  /home/kratos_common/trilinos-9.0.0

in principle the users should NOT recompile it. In any case the script used in configuring it is:

  ../configure \
  --enable-mpi \
  --enable-shared \
  --with-mpi-compilers=/opt/openmpi/1.2.4/bin \
  --with-incdirs="-I/opt/openmpi/1.2.4/include -I/home/kratos_common/SuperLU_DIST_2.3/SRC" \
  --with-ldflags="-L/home/kratos_common/SuperLU_DIST_2.3/lib -L/home/kratos_common/ParMetis-3.1" \
  --with-libs="-lsuperlu_dist_2.3 -lmetis -lparmetis" \
  --prefix=/home/kratos_common/trilinos-9.0.0 \
  FFLAGS="-O5 -funroll-all-loops -fPIC" \
  CFLAGS="-O3 -fPIC -funroll-loops"  \
  CXXFLAGS="-O3 -fPIC -funroll-loops -ffast-math" \
  --enable-amesos --enable-anasazi --enable-aztecoo \
  --enable-epetra --enable-epetraext --enable-ifpack --enable-ml --enable-pytrilinos \
  --enable-teuchos --enable-triutils --enable-galeri \
  --enable-aztecoo-teuchos --enable-amesos-superludist
Personal tools
Categories