Linux Installation
(→Troubleshooting) |
|||
Line 52: | Line 52: | ||
* library missing (check the requirements) | * library missing (check the requirements) | ||
* wrong installation path (see Jamroot) for the boost library header files | * wrong installation path (see Jamroot) for the boost library header files | ||
+ | * If there are two versions of gcc in your machine and the default version is not compatible you can change to desire version by changing the following line of Jamroot: | ||
+ | using gcc ; | ||
+ | |||
+ | to (for example changing to gcc 4.2.x) | ||
+ | using gcc : 4.2 : g++-4.2 ; | ||
If the compilations appears to be correct but the program does not run satisfactorely, one should check that all the shared libraries are present in the system. To do so use the command "ldd" on the shared libraries in the directory (/kratosR1/libs/ ) | If the compilations appears to be correct but the program does not run satisfactorely, one should check that all the shared libraries are present in the system. To do so use the command "ldd" on the shared libraries in the directory (/kratosR1/libs/ ) |
Revision as of 11:57, 15 December 2008
How To install Kratos in Linux:
Contents |
System Requirements
No special system requirements are required, however a sustancial amount of RAM is typically needed during the compilation. 1Gb RAM is advisable to be able to run the compilation is a reasonably short time
A number of programs/libraries should be available on the system prior to the installation. The user should verify the existance (and the installation path) of the following items:
- Python (2.4 or greater is advisable)
- g++ (NOTE: installing gcc is not enough!)
- make
Libraries
The kratos is built on the top of the boost library both for the compilation framework and for the python interface. The following items are normally available for download from the system repositories or can be downloaded from [www.boost.org] which also includes an installation tutorial
- "boost-build"
- bjam
- libboost_python.so
The library "SuperLU3.0" (that you find inside the kratosR1/applications/ExternalSolverApplicatio/custom_external_libraries ) has to be compiled (or downloaded precomplied) to allow the compilation of the ExternalSolversApplication.
Finally a number of external libraries are included in the Kratos distribution and should be compiled prior to installation (please verify the copyright notice in case of applications of commercial interest) This libraries are
- gidpost library -- directory: "/external_libraries/gidpost/unix" -- compilation command: make
- ann library -- directory: "/applications/FSIapplication/custom_external_libraries/ann_1.1" -- compilation command: "make linux-g++ -->NOTE: BEFORE the compilation the user should create a directory "lib" as this is not automatically done by the makefile
Configuring and Installing
Once all of the prerequisite are correctly installed the kratos is ready for its first compilation.
Step1: save the "Common_Jamroot" as "Jamroot" and edit it to customize the installation directories and the names of the directories to be included (this may vary depending on the Linux distribution) for example a compile error could be
cannot find -lboost_python-gcc-mt-1_34_1 or warning: no toolsets are configured. warning: you won't be able to build C++ programs. warning: please consult the documentation at warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html error: no Jamfile in current directory found, and no target references specified.
because the jamfile haven't the appropriate name
Step2: compilation: from the directory kratosR1 type: "bjam threading=multi" for a compilation in release
Useful compilation options:
- -a recompile all
- -jN compiler using N processors
- debug compile in debug
- -d2 give details of the compilation process
Troubleshooting
Common reasons of failure for the compilation are the following:
- library missing (check the requirements)
- wrong installation path (see Jamroot) for the boost library header files
- If there are two versions of gcc in your machine and the default version is not compatible you can change to desire version by changing the following line of Jamroot:
using gcc ;
to (for example changing to gcc 4.2.x)
using gcc : 4.2 : g++-4.2 ;
If the compilations appears to be correct but the program does not run satisfactorely, one should check that all the shared libraries are present in the system. To do so use the command "ldd" on the shared libraries in the directory (/kratosR1/libs/ )