Installing from a Freshly installed Ubuntu Linux

From KratosWiki
Revision as of 08:45, 12 May 2009 by Hurga (Talk | contribs)
Jump to: navigation, search

The objective of current tutorial is to "standardize" the installation of Kratos on a newly installed Ubuntu system. Please note that 90% of the operations described are necessary for the installation of libraries in the system rather than for the compilation of the Kratos itself.



set the download server to "main server". This cqan be done operning the Synaptic Package Manager and going to Settings-Repository : in the section Ubuntu Software change the option Download from: Main server

we detail here the installation of some basic packages. Note that not all of the packages are strictly needed however our advice is to install all of them if you are not sure of what you are doing

essential packages:

  sudo apt-get install build-essential
  sudo apt-get install subversion
  sudo apt-get install rapidsvn
  sudo apt-get install libblas3gf
  sudo apt-get install liblapack3gf
  sudo apt-get install libblas-dev
  sudo apt-get install liblapack-dev
  sudo apt-get install python-dev
  sudo apt-get install csh
  sudo apt-get install swig
  sudo apt-get install python-matplotlib

useful packages:

  sudo apt-get install emacs
  sudo apt-get install kate
  sudo apt-get install python-scipy
  sudo apt-get install python-numpy
  sudo apt-get install python-scientific

mpi packages:

  sudo apt-get install openmpi-bin
  sudo apt-get install openmpi-dev
  sudo apt-get install libparmetis3.1
  sudo apt-get install libparmetis-dev
  sudo apt-get install gfortran

Note for ubuntu 9.04: Due to a bug in the openmpi package, you need to manually compile openmpi. Download the latest release version and configure the compilation adding --enable-shared and --enable-static; then compile with make all and make install.


ATTENTION: Boost distro NEEDS to be installed manually to allow mpi support. DO NOT USE the boost that comes in the ubuntu repositories

download boost 1.38.0 from boost web page and decompress it on a "tempdir" directory. From such "tempdir" run


once the configure succeds edit the file "user-config.jam" and add the following line (take care to insert the space between "mpi" and ";")

 using mpi ;

just after the line that reads "using gcc ;" now run


and after success (do not worry about failures in the "iostream" library)

 sudo make install

to "inform" the system of the installation path edit the file ".bashrc" and add the two lines

 #path for boost mpi
 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
 export PYTHONPATH=/usr/local/lib:$PYTHONPATH

installing boost-build in the system

We need now to install the bjam and boost-build system. Full documentation can be found at the address [1] from the directory were we decompressed the boost we type

  sudo cp ./tools/jam/src/bin.linuxx86/bjam /usr/bin/bjam


  sudo mkdir /usr/share/boost-build
  sudo cp -r ./tools/build/v2/* /usr/share/boost-build/


Download the latest release of superlu_dist from [2]

from the root create a directory

 mkdir compiled_libraries

now extract the superlu_dist in there to obtain


the following file has to be put in such directory and works for a 32bit ubuntu with the packages installed in the standard directories.

launch the compilation using the command

 sudo make install

which installs the library in


As a first step connect to the site

and download the latest Trilinos Package. (At the moment of writing a tutorial 9.0.2) extract the downloaded file in


from such path type

 mkdir LINUX_MPI

save in there the file ""

and run it as


make and execute the tests

 make tests
 make runtests-mpi

and finally install if everything is correct (installation will be in /usr/local/trilinos-9.0.2

 sudo make install
Personal tools