How to compile the Boost if you want to use MPI
(→Trilinos 10) |
|||
Line 123: | Line 123: | ||
− | Go back to [[Installing kratos in Ubuntu Linux#IF YOU NEED | + | Go back to [[Installing kratos in Ubuntu Linux#IF YOU NEED MPI|Installing kratos in Ubuntu Linux]] and follow the last steps to install kratos. |
Revision as of 10:32, 25 October 2010
Contents |
BOOST with MPI SUPPORT
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
./configure
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
make
and after success (do not worry about failures in the "iostream" library)
sudo make install
If you have downloaded boost 1.43 or later, run following commands instead:
./bootstrap.sh
and after success
./bjam -j8 sudo ./bjam 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
ATTENTION : for a 64 bit system
sudo cp ./tools/jam/src/bin.linuxx86_64/bjam /usr/bin/bjam
and
sudo mkdir /usr/share/boost-build sudo cp -r ./tools/build/v2/* /usr/share/boost-build/
SuperLU_DIST install
Download the latest release of superlu_dist from [2]
from your home folder create a directory
mkdir compiled_libraries
now extract the superlu_dist in there to obtain
~/compiled_libraries/SuperLU_DIST_2.3
the following make.inc file has to be put in such directory and works for a 32bit ubuntu with the packages installed in the standard directories.
Please be noted that for the version other than 2.3 (2.4 for example), the following two lines must be amended to reflect the version changes:
DSuperLUroot = ~/compiled_libraries/SuperLU_DIST_2.4
DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist_2.4.a
launch the compilation using the command
make sudo make install
which installs the library in
~/compiled_libraries/SuperLU_DIST_2.3/lib
Trilinos install
We recommend installing the latest Trilinos version (right now the Trilinos 10 series) but you will also find instructions for Trilinos 9 version.
Trilinos 9
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
scratch/trilinos9
from such path type
mkdir LINUX_MPI cd LINUX_MPI
save in there the file "StandardTrilinosCompilation.sh"
media:StandardTrilinosCompilation.sh.zip
and run it as
sh StandardTrilinosCompilation.sh make
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
Trilinos 10
The installation of the newer versions of Trilinos is different and requires CMake, which can be obtained from http://www.cmake.org or from the Ubuntu repositories. Note that you will need at least version 2.8, so when installing from repository use the Synaptic package manager and check which version you are getting.
If you intend to use PyTrillinos, or if you you are new to Kratos and are just following the instructions on this page, you'll need swig version 1.3.38 or later. Unfortunately, the swig version that you can obtain from the repositories for Ubuntu 9.10 is 1.3.36 (Ubuntu 10.4 has 1.3.40, which should be enough). You can get the current swig release from http://www.swig.org/. Extract it and go to the extracted folder. From there, run
./configure make sudo make install
Now you can download Trilinos from http://trilinos.sandia.gov/index.html (they will probably ask you to fill a form). Extract the contents of the downloaded file to a temporary folder. Create another folder to temporarily store the Trilinos installation files using
mkdir trilinos-build cd trilinos-bulid
Copy and extract this file Media:do-configure.zip to that folder and open it using a text editor. Its first line reads
TRILINOS_HOME="~/Downloads/trilinos-10.2.0-Source"
Change it to point to the folder where you extracted the Trilinos files. You may also want to change the path where Trilinos will be installed -- do this by modifying the line
-D CMAKE_INSTALL_PREFIX:PATH=/usr/local/trilinos-10.2.0 \
to suit your tastes. Now run
./do-configure make
You can run some tests to check that everything works fine using
ctest
but be warned that these can take a long time. Then install Trilinos using
sudo make install
Finally, add the trilinos path to your .basrc file. From your home folder (go there by typing 'cd' without arguments) type
gedit .bashrc
scroll to the end of the file and paste the following
#path for trilinos export LD_LIBRARY_PATH=/usr/local/trilinos-10.2.0/lib:$LD_LIBRARY_PATH
Or, if you installed trilinos somewhere else, change the path accordingly.
Go back to Installing kratos in Ubuntu Linux and follow the last steps to install kratos.