How to compile the Boost if you want to use MPI

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
(BOOST with MPI SUPPORT)
 
(One intermediate revision by one user not shown)
Line 7: Line 7:
 
From such "tempdir" run
 
From such "tempdir" run
 
   ./boostrap.sh
 
   ./boostrap.sh
once the configure succeds edit the file "user-config.jam" and add the following line (take care to insert the space between "mpi" and ";")
+
once the configure succeds edit the file "project-config.jam" and add the following line (take care to insert the space between "mpi" and ";")
 
   using mpi ;
 
   using mpi ;
 
at the end of the file
 
at the end of the file
Line 25: Line 25:
 
   export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
 
   export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
 
   export PYTHONPATH=/usr/local/lib:$PYTHONPATH
 
   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
 
[http://www.boost.org/doc/tools/build/doc/html/index.html]
 
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 ===
 
=== SuperLU_DIST install ===

Latest revision as of 16:39, 14 January 2017

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.

ATTENTION: MPI modules are only compatible with python3 with version 1.55 or later.

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

 ./boostrap.sh

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

 using mpi ;

at the end of the file

and after success

 ./b2 --target=shared,static

if your machine have multiple cores you can specify the flag -jN

 ./b2 -j2 -target=shared,static
 sudo ./b2 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

SuperLU_DIST install

Download the latest release of superlu_dist from [1]

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.

Media:Make.inc.zip

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.

Personal tools
Categories