Windows Installation

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
(Visual Studio Project)
(Kratos Source code)
 
(49 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Preliminar components to use Kratos ==
+
== Preliminaries: Components needed to install the Kratos==
  
 
'''Last visit''' for the links: ''30 November 2007''
 
'''Last visit''' for the links: ''30 November 2007''
  
=== CVS ===
 
  
{|
+
=== SVN ===
It is recommended to use this: [http://www.wincvs.org/'''Concurrent Versioning System''']
+
[[Image:Cvs.png]]
+
|}
+
  
# Go to the [http://www.wincvs.org/download.html| Download Section]
+
It is recommended to use [http://www.rapidsvn.org/ RapidSVN]
# Take the Latest Recommended Release (you can download directly here the [[Media:WinCvs2_0_2-4.zip‎| '''WinCvs 2.0.2.4''' (released 2005-08-15)]]
+
 
# Ask for a username and password to the Kratos Administrator ([[User:Pooyan|directly here]] o [mailto:pooyan@cimne.upc.edu| by email])
+
Download: http://www.rapidsvn.org/download/release/0.9.6/
 +
 
 +
ATTENTION!! Do not use TARTOISE but only rapidSVN for the update of your Kratos !!!!
  
 
=== Python ===
 
=== Python ===
[http://www.python.org/ Python] can be downloaded from [http://www.python.org/download/ here]
+
[http://www.python.org/ Python] can be downloaded from [http://www.python.org/download/ here]. At this moment the python 2.5 is supported.
 +
 
 +
After install it is needed to include the installation directory in the system path:
 +
control panel -> system -> advanced
 +
 
 +
 
 +
Before installing Python, consider if you want to use it to [[How to plot graphs |plot graphics]]. In that case, you should check packages ([http://www.pythonxy.com/foreword.php python(x,y)], for example) which include [http://matplotlib.sourceforge.net matplotlib] or other equivalent graphic tools.
  
 
=== C++ Compiler ===
 
=== C++ Compiler ===
  
For developers under Windows, we recommend to use [http://msdn2.microsoft.com/en-us/library/bb964526.aspx| '''Microsoft Visual Studio 2005''']
+
For developers using Windows, we recommend to use [http://msdn2.microsoft.com/en-us/library/bb964526.aspx/'''Microsoft Visual Studio 2005''']
 +
 
 +
Limited testing has been performed with [http://www.microsoft.com/express/ '''Microsoft Visual Studio 2008 Express Edition'''] freely available from Microsoft. To use Microsoft Visual Studio 2008 Express Edition, you must download Boost 1.35.0 sources, Boost build and bjam executable. You should compile Boost sources with the command:
 +
 
 +
<tt> bjam toolset=msvc --build-type=complete stage</tt>
 +
 
 +
and correct the paths in Jamroot file.
 +
 
 +
Also, in Jamroot, the last lines should look like this:
 +
 
 +
<tt>## 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) ;
 +
</tt>
  
 
=== Boost Library ===
 
=== Boost Library ===
  
Kratos use the [http://www.boost.org/ '''Boost library'''].
+
Kratos uses the [http://www.boost.org/ '''Boost library'''].
  
 
Boost provides free peer-reviewed portable C++ source libraries.
 
Boost provides free peer-reviewed portable C++ source libraries.
Line 32: Line 60:
 
The following steps are needed to install the build system:
 
The following steps are needed to install the build system:
 
* Downlodad precompiled bjam for windows (see www.boost.org -> getting started).  
 
* 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)
+
* Put the bjam.exe in c:\kratosR1 (from now on we will assume that the Kratos is installed in c:\kratosR1 ... do not change this unless you know what you do)
* Downloaded the latest release of the boost-build  from [http://sourceforge.net/project/showfiles.php?group_id=7586| '''Download section'''] and extract for example in the directory "c:\boost-build\"
+
* Download the latest release of the boost-build  from [http://sourceforge.net/project/showfiles.php?group_id=7586 '''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).  
+
* Configure the environment variable (Control Panel->System->Advanced)  '''BOOST_BUILD_PATH=c:\boost-build''' (set it to the installation path you choosed for boost-build).
  
 
==== Step2 - Install the boost library ====
 
==== Step2 - Install the boost library ====
Line 44: Line 72:
 
# Select the mirror you want. (the random mirror works fine for me)
 
# Select the mirror you want. (the random mirror works fine for me)
 
# Select:
 
# Select:
## the multithread dll AND multithread debug dll
+
## the multithread DLL and multithread debug DLL
# Select at least: (full install is suggested)
+
# do a FULL install. Verify that everything is marked!
## the Boost header files
+
# Introduce the installing path. (i.e <tt>C:\kratosR1\external_libraries\boost_1_34_1\</tt>) DO NOT change this path unless you know what you do
## Source and Documentation
+
# include the installation path for the compiled dlls in the system path: (control panel->system->advanced ...................)
## Tools (source and binary)
+
## Boost Python
+
# Introduce the installing path. (i.e <tt>C:\kratosR1\external_libraries\boost_1_34_1\</tt>)
+
  
 
'''NOTE:''' These binaries are compiled for 32bit machines. In order to compile 64bit code (on windows 64bit) you MUST recompile the boost python library by going to the boost directory and recompile the boost python using '''bjam''':
 
'''NOTE:''' These binaries are compiled for 32bit machines. In order to compile 64bit code (on windows 64bit) you MUST recompile the boost python library by going to the boost directory and recompile the boost python using '''bjam''':
 
     bjam --toolset=msvc --libdir=lib python
 
     bjam --toolset=msvc --libdir=lib python
  
 
+
Another option for the installation of the boost library is to install the source code and compile it as follows: (do this as an extreme resource ... the only way we can support is the first)
Another option for the installation of the boost library is to install the source code and compile it as follows:
+
# Go to the [http://sourceforge.net/project/showfiles.php?group_id=7586 '''Download section''']
# Go to the [http://sourceforge.net/project/showfiles.php?group_id=7586| '''Download section''']
+
 
# Download the following libraries:
 
# Download the following libraries:
 
## boost (last release in this moment of edition: 1.34.1, July 24, 2007, boost_1_34_1.zip)
 
## 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
 
##* to be extracted in '''''\kratosR1\external_libraries'''''  once kratos source code is installed
 
# compile and install the libraries
 
# compile and install the libraries
 
=== GiDpost External Library ===
 
 
We strongly recommend you to use [http://www.gidhome.com  '''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 [http://www.gidhome.com/support_team/gidpost.html  library description]
 
# [ftp://gid.cimne.upc.es/pub/gid/Tools/gidpost1.70.zip  '''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 ==
 
== Kratos Source code ==
Line 85: Line 93:
 
# open the <tt> Menu->Admin->Login </tt> and insert the following <tt> CVSROOT </tt>:
 
# open the <tt> Menu->Admin->Login </tt> and insert the following <tt> CVSROOT </tt>:
  
   :pserver;username=user_name;hostname=kratos.cimne.upc.es;port=2401:/home/kratosR1
+
   :pserver:user_name@kratos.cimne.upc.es:2401:/home/kratosR1
  
where <tt> user_name </tt> is your user name (which can be obtained contacting to [[Pooyan]]) or anonymous for readonly access.
+
where <tt> user_name </tt> is your user name (which can be obtained contacting to [[User:Pooyan | Pooyan]]) or anonymous for readonly access.
  
 
# Login using your password (empty for anonymous username)
 
# Login using your password (empty for anonymous username)
 
 
# Open the <tt> Menu->Remote->CheckoutModule </tt>
 
# Open the <tt> Menu->Remote->CheckoutModule </tt>
 
+
## Module name: <tt> kratosR1 </tt>
## Module name: <tt> KratosR1 </tt>
+
 
## Local folder: the folder you want to copy your Kratos directory. (the default <tt> C:\ </tt> is fine)
 
## Local folder: the folder you want to copy your Kratos directory. (the default <tt> C:\ </tt> is fine)
 
## Choose the same CVSROOT as for login and press OK.
 
## Choose the same CVSROOT as for login and press OK.
Line 99: Line 105:
 
It's important to finish all these steps with <tt> ***** CVS exited normally with code 0 ***** </tt>
 
It's important to finish all these steps with <tt> ***** CVS exited normally with code 0 ***** </tt>
  
== Compiling Kratos ==
+
=== GiDpost External Library ===
# Copying the <tt> Common_Jamroot </tt> to <tt> Jamroot </tt>
+
    copy Common_Jamroot Jamroot
+
  
modify the highlighted parts of the Jamroot respecting to the installing path of libraries
+
We strongly recommend you to use [http://www.gidhome.com  '''GiD'''] as a pre and post processor.
  
    using gcc ;
+
'''gidpost''' is a set of functions (library) for writing postprocess results for GiD in ASCII or binary format.
    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><font color=red>/usr/include/boost </font>  #to be customarized
+
        <include><font color=red>/usr/include/python2.5/</font>  #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><font color=red>python2.5</font> ;          <font color=blue>#the name can be found int the python libs
+
                                                #directory and look for '''pythonXX.lib''' file</font>
+
    lib boost_python_lib : : <name><font color=red>boost_python-gcc-mt-1_33_1</font> ;  <font color=blue>#the name can be found int the boost lib
+
                                                                  #directory and look for '''boost_python-vc80-mt-XXXXXX.dll''' file</font>
+
   
+
    #attention: this is configured for LINUX ... replace the directory for windows version
+
    lib gidpost : : <name>gidpost <search>$(TOP)<font color=red>/external_libraries/gidpost/unix/release</font> ;
+
   
+
    #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) ;
+
  
 +
# Go to the [http://www.gidhome.com/support_team/gidpost.html  library description]
 +
# [ftp://gid.cimne.upc.es/pub/gid/Tools/gidpost1.70.zip  '''Download''' the zip file]
 +
# Unzip the file in <TT> your_kratos_path\external_libraries\ </tt>
 +
# 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"
 +
 +
== Compiling Kratos ==
 +
# Copy the <tt> Common_Jamroot </tt> to <tt> Jamroot </tt>
 +
# In the folder KratosR1 copy Common_Jamroot to Jamroot and then open it with a text editor: select and customize the parts marked as WINDOWS INSTALLATION
  
 
Finally compiling the Kratos using bjam
 
Finally compiling the Kratos using bjam
Line 203: Line 132:
 
A simple interface for the compilation using Microsoft Visual Studio 2005 is provided at the link:
 
A simple interface for the compilation using Microsoft Visual Studio 2005 is provided at the link:
  
[[Visual Studio 2005 ide.zip]]
+
[[Media:Visual Studio 2005 ide.zip | ProjectFile]]
  
 
To use it simply download the file and unpack it in the directory "kratosR1".
 
To use it simply download the file and unpack it in the directory "kratosR1".
 
The file treats the bjam as a makefile and allows compiling inside the visual studio environment
 
The file treats the bjam as a makefile and allows compiling inside the visual studio environment
 +
 +
 +
[[Category:Installation]]

Latest revision as of 10:25, 17 May 2012

Contents

Preliminaries: Components needed to install the Kratos

Last visit for the links: 30 November 2007


SVN

It is recommended to use RapidSVN

Download: http://www.rapidsvn.org/download/release/0.9.6/

ATTENTION!! Do not use TARTOISE but only rapidSVN for the update of your Kratos !!!!

Python

Python can be downloaded from here. At this moment the python 2.5 is supported.

After install it is needed to include the installation directory in the system path: control panel -> system -> advanced


Before installing Python, consider if you want to use it to plot graphics. In that case, you should check packages (python(x,y), for example) which include matplotlib or other equivalent graphic tools.

C++ Compiler

For developers using Windows, we recommend to use Microsoft Visual Studio 2005

Limited testing has been performed with Microsoft Visual Studio 2008 Express Edition freely available from Microsoft. To use Microsoft Visual Studio 2008 Express Edition, you must download Boost 1.35.0 sources, Boost build and bjam executable. You should compile Boost sources with the command:

 bjam toolset=msvc --build-type=complete stage

and correct the paths in Jamroot file.

Also, in Jamroot, the last lines should look like this:

## 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) ;

Boost Library

Kratos uses 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 c:\kratosR1 (from now on we will assume that the Kratos is installed in c:\kratosR1 ... do not change this unless you know what you do)
  • Download the latest release of the boost-build from Download section and extract for example in the directory "c:\boost-build\"
  • Configure the environment variable (Control Panel->System->Advanced) BOOST_BUILD_PATH=c:\boost-build (set it to the installation path you choosed for boost-build).

Step2 - Install the boost library

The Kratos needs the boost library to be installed in the system. This implies that both the source files and the compiled libraries should be available on the system.

An "easy" way exists to install boost library under windows 32bit:

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:

  1. Select the mirror you want. (the random mirror works fine for me)
  2. Select:
    1. the multithread DLL and multithread debug DLL
  3. do a FULL install. Verify that everything is marked!
  4. Introduce the installing path. (i.e C:\kratosR1\external_libraries\boost_1_34_1\) DO NOT change this path unless you know what you do
  5. include the installation path for the compiled dlls in the system path: (control panel->system->advanced ...................)

NOTE: These binaries are compiled for 32bit machines. In order to compile 64bit code (on windows 64bit) you MUST 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 for the installation of the boost library is to install the source code and compile it as follows: (do this as an extreme resource ... the only way we can support is the first)

  1. Go to the Download section
  2. Download the following libraries:
    1. 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
  3. compile and install the libraries

Kratos Source code

In this moment kratos source files can be downloaded using CVS. Using WinCvs the precedure consists of:

  1. open the Menu->Admin->Login and insert the following CVSROOT :
 :pserver:user_name@kratos.cimne.upc.es:2401:/home/kratosR1

where user_name is your user name (which can be obtained contacting to Pooyan) or anonymous for readonly access.

  1. Login using your password (empty for anonymous username)
  2. Open the Menu->Remote->CheckoutModule
    1. Module name: kratosR1
    2. Local folder: the folder you want to copy your Kratos directory. (the default C:\ is fine)
    3. 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 *****

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.

  1. Go to the library description
  2. Download the zip file
  3. Unzip the file in your_kratos_path\external_libraries\
  4. Open a DOS console
  5. Change to the "gidpost\win" directory
  6. Run vcvars32.bat
  7. 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"

Compiling Kratos

  1. Copy the Common_Jamroot to Jamroot
  2. In the folder KratosR1 copy Common_Jamroot to Jamroot and then open it with a text editor: select and customize the parts marked as WINDOWS INSTALLATION

Finally compiling the Kratos using bjam

   bjam toolset=msvc threading=multi -j2

the "-j2" flag is to compile using 2 processors. Omitting it implies compiling with a single processor. "-jN" to compile with N processors

Visual Studio Project

A simple interface for the compilation using Microsoft Visual Studio 2005 is provided at the link:

ProjectFile

To use it simply download the file and unpack it in the directory "kratosR1". The file treats the bjam as a makefile and allows compiling inside the visual studio environment

Personal tools
Categories