How to Compile Kratos on the Acuario Cluster

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
(Getting Kratos from repository)
(Updated for cmake build)
Line 8: Line 8:
 
Edit the file ".bashrc" and add at the end of it the following code:
 
Edit the file ".bashrc" and add at the end of it the following code:
  
   #numpy includes
+
   #OpenMPI use
   export BASE_PATH=/home/kratos_common
+
   module load openmpi-x86_64
  export PYTHONPATH=${BASE_PATH}/numpy-1.2.1/lib64/python2.4/site-packages:$PYTHONPATH
+
   #adding kratos common libraries to the library path
 
+
   export LD_LIBRARY_PATH=/home/kratos_common/compiled_libraries/boost/lib:$LD_LIBRARY_PATH
   #BOOST LIBRARY
+
   export PYTHONPATH=/home/kratos_common/compiled_libraries/boost/lib:PYTHONPATH
   export LD_LIBRARY_PATH=${BASE_PATH}/boost_1_37_0/lib:$LD_LIBRARY_PATH
+
   #Trilinos libs
   export PYTHONPATH=${BASE_PATH}/boost_1_37_0/lib:$PYTHONPATH
+
   export LD_LIBRARY_PATH=/home/kratos_common/compiled_libraries/trilinos-10.6.4/lib/:$LD_LIBRARY_PATH
     
+
 
   #swig path
+
   export PATH=${BASE_PATH}/swig-1.3.36/bin:$PATH
+
 
+
  #path to the bjam executable
+
  export PATH=/${BASE_PATH}/Files/boost_1_37_0/tools/jam/src/bin.linuxx86_64:$PATH
+
  export BOOST_BUILD_PATH=${BASE_PATH}/Files/boost_1_37_0/tools/build/v2/
+
   
+
  #pytrilinos
+
  export LD_LIBRARY_PATH=${BASE_PATH}/trilinos-9.0.0/lib/:$LD_LIBRARY_PATH
+
 
+
  export LD_LIBRARY_PATH=/opt/intel/itac/7.1/bin/rtlib/:$LD_LIBRARY_PATH
+
  export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
+
  export PATH=/usr/lib64:$PATH
+
 
+
  source /opt/intel/Compiler/11.1/064/bin/iccvars.sh intel64
+
  
 
== Getting Kratos from repository ==
 
== Getting Kratos from repository ==
Line 41: Line 26:
 
{{warning|You have to pay attention to the '''DOT''' at the end of the path you have to copy!!!!}}
 
{{warning|You have to pay attention to the '''DOT''' at the end of the path you have to copy!!!!}}
  
== Jamroot file to be used in the compilation ==
+
== Configuration file to be used in the compilation ==
  
A standard configuration, which compiles all of the applications in the Kratos can be found in
+
A standard configuration file, which compiles all of the applications in the Kratos can be found in
   /home/kratos_common/Jamroot
+
   /home/kratos_common/acuari_configure.sh
  
You should copy this to your local kratos directory and use it for compilation. Changing to the Kratos directory in your account and type the following command:
+
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/Jamroot .
+
  cp /home/kratos_common/acuari_configure.sh
  
 
== Compilation Command ==
 
== Compilation Command ==

Revision as of 12:25, 20 April 2012

The following tutorial is intended to facilitate the compilation of the Kratos on CIMNE's cluser "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-x86_64
  #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  http://kratos.cimne.upc.es/svn/kratos/kratos


Warn_icon.gif Warning. Please, note that: You have to pay attention to the DOT at the end of the path you have to copy!!!!

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

Compilation Command

The compiler that comes with the system is a rather old version of the gcc. Please compile the Kratos using the intel compiler using the compilation command:

  bjam threading=multi intel -j4

Running Examples

Scalar or OpenMP parallel applications can be run "on-line" using the standard compilation commands. For longer jobs they have to be submitted to a queue. Full details on how to do this are given on the Cluster's wiki

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

A temporary wiki for the Cluster can be found on the web at the addess

  acuario.rmee.upc.es

updated information will be uploaded when available

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