Windows Installation
Contents |
Preliminar components to use Kratos
Last visit for the links: 30 November 2007
CVS
- Go to the Download Section
- Take the Latest Recommended Release (you can download directly here the WinCvs 2.0.2.4 (released 2005-08-15)
- Ask for a username and password to the Kratos Administrator (directly here o by email)
Python
Python can be downloaded from here
C++ Compiler
For developers under Windows, we recommend to use Microsoft Visual Studio 2005
Boost Library
Kratos use the Boost library.
Boost provides free peer-reviewed portable C++ source libraries.
Step1 - Install the building system
The compilation of both the Kratos and the Boost-library is performed using bjam which is a portable "make" like system and manages the compilation. Bjam has configuration files for many different compilers. This configuration files are contained in the "boost-build".
The following steps are needed to install the build system:
- Downlodad precompiled bjam for windows (see www.boost.org -> getting started).
- Put the bjam.exe in a place in the "path" (Note that the executalble can be used only if it is in a location in the "PATH" or in the "current" directory)
- Downloaded the latest release of the boost-build from Download section and extract for example in the directory "c:\boost-build\"
- Configure the environment variable BOOST_BUILD_PATH=c:\boost-build (set it to the installation path you choosed for boost-build).
Step2 - Install the boost library
An easy way to install boost library under windows is installing the binaries.
You can get the setup file from Boost Consulting. The setup file ask you about the components you want to install and the compiler and path to install:
- Select the mirror you want. (the random mirror works fine for me)
- Select:
- the multithread dll
- (and optionally multithread debug dll)
- Select at least:
- the Boost header files
- Source and Documentation
- Tools (source and binary)
- Boost Python
- Introduce the installing path. (i.e C:\kratosR1\external_libraries\boost_1_34_1\)
These binaries are compiled for 32bit machines and for compiling 64bit code you need to recompile the boost python library by going to the boost directory and recompile the boost python using bjam:
bjam --toolset=msvc --libdir=lib python
Another option is to install the source code and compile it as follows:
- Go to the Download section
- Download the following libraries:
- boost (last release in this moment of edition: 1.34.1, July 24, 2007, boost_1_34_1.zip)
- to be extracted in \kratosR1\external_libraries once kratos source code is installed
- boost-build (last release in this moment of edition: 2.0-m12, September 30, 2007, boost-build-2.0-m12.zip)
- to be extracted in \kratosR1\bin once kratos source code is installed.
- Add the environment variable BOOST_BUILD_PATH=path where you installed boost-build
- boost (last release in this moment of edition: 1.34.1, July 24, 2007, boost_1_34_1.zip)
- compile and install the libraries
GiDpost External Library
We strongly recommend you to use GiD as a pre and post processor.
gidpost is a set of functions (library) for writing postprocess results for GiD in ASCII or binary format.
- Go to the library description
- Download the zip file
- Unzip the file
- Open a DOS console
- Change to the "gidpost\win" directory
- Run vcvars32.bat
- And depending on the version you want to compile (probably both of them) invoke:
- nmake -f Makefile.vc CFG="Release"
- nmake -f Makefile.vc CFG="Debug"
Kratos Source code
In this moment kratos source files can be downloaded using CVS. Using WinCvs the precedure consists of:
- open the Menu->Admin->Login and insert the following CVSROOT :
:pserver;username=user_name;hostname=kratos.cimne.upc.es;port=2401:/home/kratosR1
where user_name is your user name (which can be obtained contacting to Pooyan) or anonymous for readonly access.
- Login using your password (empty for anonymous username)
- Open the Menu->Remote->CheckoutModule
- Module name: KratosR1
- Local folder: the folder you want to copy your Kratos directory. (the default C:\ is fine)
- Choose the same CVSROOT as for login and press OK.
It's important to finish all these steps with ***** CVS exited normally with code 0 *****
Compiling Kratos
- Copying the Common_Jamroot to Jamroot
copy Common_Jamroot Jamroot
modify the highlighted parts of the Jamroot respecting to the installing path of libraries
using gcc ; using intel : : : <cxxflags>"-fPIC -ansi -funroll-loops -cxxlib-gcc -openmp -wd654" ; ## using intel : : : <cxxflags>"-fPIC -ansi -funroll-loops -cxxlib-gcc -openmp -diag-enable sv3 -wd10010 -wd654" ; ################################################################################# ## defining "common includes" and external libraries path-constant TOP : . ; project KratosProject : requirements <include>/usr/include/boost #to be customarized <include>/usr/include/python2.5/ #to be customarized <include>$(TOP)/kratos <include>$(TOP)/external_libraries ##omptl - necessary for parallelism <include>$(TOP)/external_libraries/omptl #basic configurations <threading>multi <define>NDEBUG #compiler settings - can be customarized by the user #WARNING -fPIC is NEEDED to compile on 64bit systems - it has to be specified here in order to include it in the #kratos "static" library <warnings>on #gcc settings <toolset>gcc:<cxxflags>"-fPIC -ansi -funroll-loops -ffast-math" #intel settings ## <toolset>intel:<cxxflags>"-fPIC -ansi -funroll-loops -ffast-math" : default-build release ; ################################################################################# ## defining "common external libraries" ## the user should adapt this depending on the installations directories on his system lib pythonlib : : <name>python2.5 ; #the name can be found int the python libs #directory and look for pythonXX.lib file lib boost_python_lib : : <name>boost_python-gcc-mt-1_33_1 ; #the name can be found int the boost lib #directory and look for boost_python-vc80-mt-XXXXXX.dll file #attention: this is configured for LINUX ... replace the directory for windows version lib gidpost : : <name>gidpost <search>$(TOP)/external_libraries/gidpost/unix/release ; #intel omp library... lib intelomp : : <name>guide ; #ATTENTION: "this requires adding threading=multi to the bjam call" alias libomp : intelomp : <toolset>intel ; alias libomp : : <toolset>gcc ; ################################################################################# # IN PRINCIPLE THIS SHOULD REQUIRE NO CUSTOMARIZATION .. apart for compiling new applications ## defining "ids" for the different projects use-project /kratos-prj : . ; ##kratos base library and python interfaces use-project /kratos-prj/kratos : kratos ; ##applications included in the compilation use-project /kratos-prj/PFEMapplication : $(TOP)/applications/PFEMapplication ; use-project /kratos-prj/incompressible_fluid_application : $(TOP)/applications/incompressible_fluid_application ; use-project /kratos-prj/structural_application : $(TOP)/applications/structural_application ; use-project /kratos-prj/convection_diffusion_application : $(TOP)/applications/convection_diffusion_application ; use-project /kratos-prj/ExternalSolversApplication : $(TOP)/applications/ExternalSolversApplication ; use-project /kratos-prj/ULFapplication : $(TOP)/applications/ULFapplication ; use-project /kratos-prj/ALEapplication : $(TOP)/applications/ALEapplication ; use-project /kratos-prj/FSIapplication : $(TOP)/applications/FSIapplication ; ################################################################################# ## installation alias install : /kratos-prj//kratos /kratos-prj/PFEMapplication//install /kratos-prj/incompressible_fluid_application//install /kratos-prj/structural_application//install /kratos-prj/convection_diffusion_application//install /kratos-prj/ExternalSolversApplication//install /kratos-prj/ULFapplication//install /kratos-prj/ALEapplication//install # /kratos-prj/FSIapplication//install ; ECHO $(TOP) ;
Finally compiling the Kratos using bjam
bjam msvc