Windows 7 Download and Installation

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
(Creation of the Microsoft Visual Studio 2008 Kratos Project)
(Replaced content with "The information in this page was moved to GitHub: https://github.com/KratosMultiphysics/Kratos/wiki/Windows-Install")
 
(268 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== Preliminaries: Components needed to install the Kratos==
+
The information in this page was moved to GitHub: https://github.com/KratosMultiphysics/Kratos/wiki/Windows-Install
 
+
::::'''Last visit''' for the links: ''28 March 2010''
+
 
+
::Note that this is a specific case of possible installation of Kratos in a '''64 bits computer''' under '''Windows 7''', and all the different components are not compulsory for the successful use of Kratos. You can select other equivalent C++ compilers, svn, etc. or other versions of those we are presenting.
+
 
+
::Two examples of organization of files are provided. Of course, you should select only one of them.
+
 
+
=== C++ compiler. Microsoft Visual Studio 2008 ===
+
 
+
::For developers using Windows, we recommend to use [http://msdn.microsoft.com/en-gb/express/default.aspx Microsoft Visual Studio 2005 or 2008]. If you are working with a 64 bits machine, be sure that you include the 64 bits tools in your MSVS installation.
+
 
+
=== SVN ===
+
 
+
::It is recommended to use [http://www.rapidsvn.org/ RapidSVN]
+
 
+
::The latest released version: 0.12, October 2009, RapidSVN-0.12.0-8051.exe
+
 
+
::Download and run the file:
+
 
+
::[[Image:RapidSVN.1.jpg]][[Image:RapidSVN.2.jpg]]
+
 
+
=== Kratos Source Code ===
+
 
+
::By using RapidSVN, the kratos source files can be downloaded by taking the following steps:
+
::* Go to <tt> Repository->Checkout </tt> and enter the following path to the kratos repository:
+
        http://kratos.cimne.upc.es/svn/kratos/
+
 
+
::[[Image:RapidSVN.3.jpg]][[Image:RapidSVN.4.jpg]]
+
 
+
::* Choose  a working directory where module: <tt>kratos</tt> will be created in your pc
+
::** example A: "'''C:\Kratos2010'''"
+
::** example B: "'''D:\Kratos2010'''"
+
::::'''Warning!''' Avoid using the '''root directory''' if you need to commit files to the SVN.
+
::* "recursive" option have to be signed
+
::* this will create a folder "C:\Kratos2010\kratos" or "D:\Kratos2010\kratos" with all the required Kratos files.
+
 
+
::[[Image:RapidSVN.5.jpg]]
+
 
+
=== Pre and Post Processor. GiD ===
+
 
+
::We use [http://www.gidhome.com '''GiD'''] as our favourite pre and post-processor.
+
 
+
::Download and install the latest version of [http://www.gidhome.com/download/do07.html '''GiD''']. Here we use the latest beta version for 64 bits (GiD9.2.9b-win-x64-Install.exe)
+
 
+
::[[Image:GiDInstall.1.jpg]][[Image:GiDInstall.2.jpg]]
+
 
+
::[[Image:GiDInstall.3.jpg]][[Image:GiDInstall.4.jpg]]
+
 
+
::You should have to install the '''GiDpost External Library''' too (latest version, March 2010, ::ftp://gid.cimne.upc.es/pub/gid/Tools/gidpost1.70.zip).
+
 
+
::Unzip the file in your kratos external libraries.
+
::* example A: "C:\Kratos2010\kratos\external_libraries\gidpost" (already existing folder, the one by default)
+
::* example B: "D:\external_libraries\gidpost" (independent folder outside kratos' directory tree)
+
 
+
::To build the GiD postprocess libray:
+
::* Open a DOS console (from Start - Programs - Microsoft Visual Studio 2008 - Visual Studio Tools - System Console
+
::* Run vcvarsall.bat
+
::[[Image:GiDInstall.5.jpg]]
+
::[[Image:GiDInstall.6.jpg]]
+
::* Change to the VC Common7\Tools directory (cd ..; cd Common7; cd Tools)
+
::* Run vcvars32.bat
+
::[[Image:GiDInstall.7.jpg]]
+
::* change to the "gidpost\win" directory (remember, "C:\Kratos2010\kratos\external_libraries\gidpost" or "D:\external_libraries\gidpost")
+
::* 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"
+
::[[Image:GiDInstall.9.jpg]]
+
::[[Image:GiDInstall.8.jpg]]
+
::* This will create two new folders "gidpost\win\Debug" and "gidpost\win\Release" with the file gidpost.lib for the Debug or Release compilation
+
::[[Image:GiDInstall.10.jpg]]
+
::* '''Very important!''' Finally and only if you have selected a different directory to the default one (example B), copy the existing '''Jamfile''' file from the default folder ('''D:\Kratos2010\kratos\external_libraries\gidpost''') to the one you are using for the libraries ('''D:\external_libraries\gidpost''')
+
 
+
=== Scripting Language Python. Python(x,y) ===
+
 
+
::[http://www.python.org/ Python] can be downloaded from [http://www.python.org/download/ here]. At this moment the python 2.6 is supported.
+
 
+
::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.
+
 
+
::For this example, we will describe the full package Python(x,y) installation.
+
 
+
::Download and run the installation file from http://www.pythonxy.com/ (latest version 2.6.2.0, March 2010, 426 MB, http://ftp.ntua.gr/pub/devel/pythonxy/Python(x,y)-2.6.2.0.exe)
+
 
+
::[[Image:Python_xy_Install.1.jpg]]
+
 
+
::Everything by default, but it is recommended to:
+
::* select installation for all the users
+
::* select the destination folders (to check the full installation process)
+
::* select all the components to be installed
+
::* folders:
+
::** example A:
+
::::::{|
+
|-
+
| general destination:
+
| C:\Program Files (x86)\pythonxy
+
|-
+
| python(x,y) documentation:
+
| C:\Program Files (x86)\pythonxy\doc
+
|-
+
| python kernel:
+
| '''C:\Python26'''
+
|-
+
| eclipse:
+
| C:\Program Files (x86)\pythonxy\eclipse
+
|-
+
| eclipse workspace:
+
| C:\Documents\Python
+
|-
+
| mingw:
+
| C:\Program Files (x86)\pythonxy\mingw
+
|}
+
::** example B:
+
::::::{|
+
|-
+
| general destination:
+
| D:\pythonxy
+
|-
+
| python(x,y) documentation:
+
| D:\pythonxy\doc
+
|-
+
| python kernel:
+
| '''D:\Python26'''
+
|-
+
| eclipse:
+
| D:\pythonxy\eclipse
+
|-
+
| eclipse workspace:
+
| D:\Simulations\Python
+
|-
+
| mingw:
+
| D:\pythonxy\mingw
+
|}
+
 
+
::[[Image:Python_xy_Install.2.jpg]][[Image:Python_xy_Install.3.jpg]][[Image:Python_xy_Install.4.jpg]]
+
::[[Image:Python_xy_Install.5.jpg]][[Image:Python_xy_Install.6.jpg]][[Image:Python_xy_Install.7.jpg]]
+
::[[Image:Python_xy_Install.8.jpg]][[Image:Python_xy_Install.9.jpg]][[Image:Python_xy_Install.10.jpg]]
+
::[[Image:Python_xy_Install.11.jpg]]
+
 
+
::After the installation, you should check that Python has created a folder called "'''C:\Python26\libs'''" or "'''D:\Python26\libs'''".
+
 
+
=== Boost Library ===
+
 
+
::Kratos uses the [http://www.boost.org/ 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 ((http://www.boost.org/doc/tools/build/index.html, latest version 2007) and unzip it in the external libraries folder: "'''C:\Kratos2010\kratos\external_libraries\boost\boost-build'''" or "'''D:\external_libraries\boost\boost-build'''").
+
::* Open a DOS console and change to the boost-build\jam_src folder
+
::* Run '''build.bat'''
+
::[[Image:Boost-Build_Install.1.jpg]]
+
 
+
::[[Image:Boost-Build_Install.2.jpg]]
+
::* A new folder bin.ntx86 will have been created with a bjam.exe file in it.
+
::* Copy the bjam.exe in the kratos root ("C:\Kratos2010\kratos\external_libraries\boost\boost-build\jam_src\bin.ntx86" to "C:\Kratos2010\kratos", in the example A; "D:\external_libraries\boost\boost-build\jam_src\bin.ntx86" to "D:\Kratos2010\kratos", in the example B;)
+
 
+
==== Step2 - Install the boost library ====
+
 
+
::You can install and build manually the boost library or you can directly use an installer. As said in the [http://www.boost.org/doc/libs/1_42_0/more/getting_started/windows.html boost] webpage: "''The easiest way to get a copy of Boost is to use an installer. The Boost website version of this Getting Started guide will have undated information on installers as they become available, or see Boost downloads or the installer provided by BoostPro Computing. We especially recommend using an installer if you use Microsoft Visual Studio, because the installer can download and install precompiled library binaries, saving you the trouble of building them yourself.''"
+
 
+
::Download and run [http://www.boostpro.com/download BoostPro Installer] (latest version 1.42.0, 190K, boost_1_42_setup.exe, March 2010). You should register to freely download the file.
+
 
+
::* select Visual C++ 9.0 (Microsoft Visual Studio 2008) and all the variants
+
::[[Image:BoostInstall.1.jpg]][[Image:BoostInstall.2.jpg]]
+
::* select all the components for VC9.0
+
::[[Image:BoostInstall.3.jpg]][[Image:BoostInstall.4.jpg]]
+
::* select "'''C:\Kratos2010\kratos\external_libraries\boost\boost_1_42'''" (example A) or "'''D:\external_libraries\boost\boost_1_42'''" (example B) as Destination Folder
+
::[[Image:BoostInstall.6.jpg]][[Image:BoostInstall.9.jpg|294 px]]
+
 
+
::[[Image:BoostInstall.7.jpg]][[Image:BoostInstall.8.jpg]]
+
::* check that the following specific folders have been created: '''\external_libraries\boost\boost_1_42\lib''' and '''\external_libraries\boost\boost_1_42\bin'''
+
 
+
::[[Image:BoostInstall.10.jpg|400 px]][[Image:BoostInstall.11.jpg|400 px]]
+
 
+
==== Step3 - Environment variables ====
+
 
+
::* Check your environment variables (Control Panel->System and Security->System->Advanced System Settings)
+
::[[Image:Boost-Build_Install.3.jpg]]
+
::* Define the following variable:
+
::** example A: BOOST_BUILD_PATH = C:\Kratos2010\kratos\external_libraries\boost\boost-build
+
::** example B: BOOST_BUILD_PATH = D:\external_libraries\boost\boost-build
+
::[[Image:Boost-Build_Install.4.jpg]][[Image:Boost-Build_Install.5.jpg]]
+
::* check your path. In this moment, you probably have got something like (example A):
+
          %CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Python26;C:\Python26\DLLs;C:\Python26\Scripts;C:\Python26\Lib\site-packages\PyQt4;C:\Python26\gnuplot\bin;C:\Python26\Lib\site-packages\vtk;C:\Python26\OpenCV\bin;C:\Program Files (x86)\pythonxy\console;C:\Program Files (x86)\pythonxy\SciTE-2.01;C:\Program Files (x86)\pythonxy\mingw\bin
+
::* you should add the following boost directories (\external_libraries\boost\boost_1_42; \external_libraries\boost\boost_1_42\lib; \kratos\external_libraries\boost\boost_1_42\bin; \external_libraries\boost\boost-build)
+
          %CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Python26;C:\Python26\DLLs;C:\Python26\Scripts;C:\Python26\Lib\site-packages\PyQt4;C:\Python26\gnuplot\bin;C:\Python26\Lib\site-packages\vtk;C:\Python26\OpenCV\bin;C:\Program Files (x86)\pythonxy\console;C:\Program Files (x86)\pythonxy\SciTE-2.01;C:\Program Files (x86)\pythonxy\mingw\bin;C:\Kratos2010\kratos\external_libraries\boost\boost_1_42; C:\Kratos2010\kratos\external_libraries\boost\boost_1_42\lib; C:\Kratos2010\kratos\external_libraries\boost\boost_1_42\bin; C:\Kratos2010\kratos\external_libraries\boost\boost-build
+
 
+
== Compiling Kratos ==
+
 
+
=== Customize Kratos Jamroot, the Kratos' main guide to compile ===
+
::[[Image:Modify_jamroot.1.jpg]]
+
::* In the Kratos root folder ("'''C:\Kratos2010\kratos'''" or "'''D:\kratos'''") copy the <tt> Common_Jamroot </tt> to <tt> Jamroot </tt> and then open it with a text editor: select and customize the parts marked as WINDOWS INSTALLATION, as follows (parts in red bold are those that should be modified, parts in green bold are those that probably shouldn't need be modified, but you have to take care of them):
+
::** example A (C:\Kratos2010\kratos; C:\Kratos2010\kratos\external_libraries)
+
          using gcc ;
+
          using intel : : : <cxxflags>"-fPIC -ansi -funroll-loops -cxxlib-gcc -openmp -wd654 -wd10010" <cflags>"-fPIC -funroll-loops -cxxlib-gcc -openmp -wd654 -wd10010" ;
+
          using sun : : : <cflags>" -w  -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0"  <cxxflags>" -w  -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0" <linkflags>" -w  -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0" ;
+
          <span style="color:Red; background:Yellow">'''using msvc ;'''</span>
+
          using python ;
+
         
+
          # uncomment and specify compiler to use MPI
+
          ##using mpi : /opt/openmpi/1.2.4/bin/mpiCC ;
+
         
+
          #################################################################################
+
          ## defining "common includes" and external libraries
+
          path-constant TOP : . ;
+
         
+
          #path to the boost library -- FUNDAMENTAL --- ATTENTION: it is IMPORTANT to set to the directory FROM WHICH the boost was installed
+
          path-constant BOOST_LIB_DIR :  /usr/lib/ ;
+
          path-constant BOOST_INCLUDE_DIR :  /usr/include/ ;
+
         
+
          ##blas/lapack lib dir
+
          path-constant BLAS_LIB_DIR : /usr/lib/ ;
+
          path-constant LAPACK_LIB_DIR : /usr/lib/ ;
+
         
+
          # Path to CUDA - required to compile and use GPU solvers - strictly optional
+
          ##path-constant CUDA_LIB_DIR :  /usr/local/cuda/lib ;
+
          ##path-constant CUDA_INCLUDE_DIR :  /usr/local/cuda/include ;
+
          ##path-constant LAPACKPP_LIB_DIR :  /usr/local/lapackpp/lib ; #directory in which we installed the LAPACK++ lib
+
          ##path-constant LAPACKPP_INCLUDE_DIR :  /usr/local/lapackpp/include/lapackpp ; #directory in which we installed the LAPACK++ lib
+
         
+
          ##decomment and modify for parallel
+
          ##path-constant MPI_LIB_DIR : /usr/lib/openmpi/lib/ ;
+
          ##path-constant MPI_INCLUDE_DIR : /usr/lib/openmpi/include/ ;
+
          ##path-constant TRILINOS_LIB_DIR : /compiled_libraries/trilinos-9.0.1/lib/ ;
+
          ##path-constant TRILINOS_INCLUDE_DIR : /compiled_libraries/trilinos-9.0.1/include/ ;
+
          ##path-constant METIS_LIB_DIR : /usr/lib/ ;
+
          ##path-constant METIS_INCLUDE_DIR : /usr/include/ ;
+
         
+
          ##path to the mkl library (STRICTLY OPTIONAL)
+
          ##path-constant MKL_INCLUDE_DIR : /opt/intel/mkl/10.0.1.014/include/ ;
+
          ##path-constant MKL_LIB_DIR : /opt/intel/mkl/10.0.1.014/lib/ ;
+
         
+
          project KratosProject
+
                :
+
                #############################################################################
+
                ############### TO BE CUSTOMIZED -- LINUX VERSION EXAMPLE!! #################
+
                <span style="color:Red; background:Yellow">'''##'''</span> requirements      <include>$(BOOST_INCLUDE_DIR)              #to be CUSTOMIZED
+
                <span style="color:Red; background:Yellow">'''##'''</span>          <include>/usr/include/python2.5/                    #to be CUSTOMIZED
+
                <span style="color:Red; background:Yellow">'''##'''</span>          <include>$(TOP)/kratos
+
                <span style="color:Red; background:Yellow">'''##'''</span>          <include>$(TOP)/external_libraries
+
                #############################################################################
+
         
+
                <span style="color:Green; background:White">'''#############################################################################'''
+
                '''############### TO BE CUSTOMIZED -- WINDOWS VERSION EXAMPLE!! ###############'''</span>
+
                requirements <include><span style="color:Red; background:Yellow">'''"C:\Kratos2010\kratos\external_libraries\boost\boost_1_42"'''</span>    #to be CUSTOMIZED
+
                          <include><span style="color:Red; background:Yellow">'''"C:\Python26\include"'''</span>                                  #to be CUSTOMIZED
+
                          <span style="color:Green; background:White">'''<include>$(TOP)/kratos'''
+
                          '''<include>$(TOP)/external_libraries    #############################################################################'''</span>   
+
         
+
                          ##omptl - necessary for parallelism
+
                          <include>$(TOP)/external_libraries/omptl
+
                         
+
                          #basic configurations
+
                          <threading>multi
+
                          <define>NDEBUG
+
          ###              <toolset>intel:<define>_GCC_LIMITS_H_
+
         
+
                          #compiler settings - can be CUSTOMIZED by the user
+
                          #WARNING -fPIC is NEEDED to compile on 64 bit systems - it has to be specified here in order to include it in the
+
                          #kratos "static" library
+
                          <warnings>on
+
         
+
                          #gcc settings
+
                          <toolset>gcc:<cflags>"-fPIC -funroll-loops" ##settings for external libraries
+
                          <toolset>gcc:<cxxflags>"-fPIC -ansi -funroll-loops -ffast-math -Wno-unknown-pragmas"
+
         
+
                          #msvc settings
+
                          <toolset>msvc:<linkflags>"/NODEFAULTLIB:libcmt"
+
                          <toolset>msvc:<cxxflags>"/D_SCL_SECURE_NO_DEPRECATE  /wd4335"
+
         
+
                          #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
+
         
+
          #############################################################################
+
          ############### TO BE CUSTOMIZED -- LINUX VERSION EXAMPLE!! #################
+
          <span style="color:Red; background:Yellow">'''##'''</span>lib pythonlib : : <name>python2.5 ;
+
          <span style="color:Red; background:Yellow">'''##'''</span>lib boost_python_lib : : <variant>debug <name>boost_python-mt-d <search>$(BOOST_LIB_DIR) ;   
+
          <span style="color:Red; background:Yellow">'''##'''</span>lib boost_python_lib : : <variant>release <name>boost_python-mt <search>$(BOOST_LIB_DIR) ;   
+
          #############################################################################
+
         
+
          <span style="color:Green; background:White">'''#############################################################################'''
+
          '''############### TO BE CUSTOMIZED -- WINDOWS                #################'''</span>
+
          lib pythonlib : : <name><span style="color:Red; background:Yellow">'''python26'''</span> <search><span style="color:Red; background:Yellow">'''"C:/Python26/libs "'''</span> ;
+
          lib boost_python_lib : : <variant>debug <name><span style="color:Red; background:Yellow">'''boost_python-vc90-mt-gd-1_42'''</span> <search><span style="color:Red; background:Yellow">'''"C:/Kratos2010/kratos/external_libraries/boost/boost_1_42/lib"'''</span> 
+
          ;   
+
          lib boost_python_lib : : <variant>release <name><span style="color:Red; background:Yellow">'''boost_python-vc90-mt-1_42'''</span> <search><span style="color:Red; background:Yellow">'''"C:/Kratos2010/kratos/external_libraries/boost/boost_1_42/lib"'''</span> ; 
+
             
+
          #############################################################################
+
          #blas and lapack libraries
+
          lib blaslibrary : : <name>blas <search>$(BLAS_LIB_DIR) <link>shared ;
+
          lib lapacklibrary : : <name>lapack <search>$(LAPACK_LIB_DIR) <link>shared ;
+
         
+
          #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 ;
+
          alias libomp : : <toolset>msvc ;
+
          alias libomp : : <toolset>sun ;
+
         
+
          ## MPI LIBRARIES - comment out if using mpi is not required
+
          ##lib mpilibrary : : <name>mpi <search>$(MPI_LIB_DIR) ;
+
          ##lib mpilibrary_cpp : : <name>mpi_cxx <search>$(MPI_LIB_DIR) ;
+
         
+
          #################################################################################
+
          # IN PRINCIPLE THIS SHOULD REQUIRE NO CUSTOMARIZATION .. apart for compiling new applications
+
          ## defining "ids" for the different projects
+
          use-project /kratos-prj : . ;
+
         
+
          ##gid post library
+
          use-project /kratos-prj/gidpost : <span style="color:Green; background:White">'''$(TOP)/external_libraries/gidpost'''</span> ;
+
         
+
          ##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 ;
+
          use-project /kratos-prj/MeshingApplication : $(TOP)/applications/MeshingApplication ;
+
          ##use-project /kratos-prj/Qcompressible_fluid_application : $(TOP)/applications/Qcompressible_fluid_application ;
+
         
+
          ## REQUIRES METIS TO BE INSTALLED
+
          ##use-project /kratos-prj/MetisApplication : $(TOP)/applications/metis_application ;
+
         
+
          ## REQUIRES TRILINOS TO BE INSTALLED
+
          ##use-project /kratos-prj/TrilinosApplication : $(TOP)/applications/trilinos_application ;
+
         
+
          ## MKL solvers: will not be compiled by default ###################################################
+
          ## this requires intel MKL library (v. 10.0.1.014) installed properly on your system ##############
+
          #use-project /kratos-prj/mkl_solvers_application : $(TOP)/applications/mkl_solvers_application ;
+
         
+
          # GPU Solvers: needs CUDA to be installed and appropriate environment variable set, a GT200 series GPU card (GTX260, GTX 280, etc.) with the *latest* driver installed
+
          # Before trying to compile this application, go to "~/kratos/applications/gpu_solvers_application/custom_external_libraries" and issue a "./build.sh" to build the "gpu_sparse.a" library
+
          use-project /kratos-prj/gpu_solvers_application : $(TOP)/applications/gpu_solvers_application ;
+
         
+
          ###################################################################################################
+
         
+
          alias libkratos_static : /kratos-prj/kratos//libkratos/<link>static ;
+
          alias gidpost : /kratos-prj/gidpost//gidpost/<link>static ;
+
         
+
          #################################################################################
+
          ## 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/MeshingApplication//install
+
          #          /kratos-prj/FSIapplication//install
+
          #          /kratos-prj/mkl_solvers_application//install
+
          #          /kratos-prj/Qcompressible_fluid_application//install
+
          #          /kratos-prj/MetisApplication//install
+
          #          /kratos-prj/TrilinosApplication//install
+
          #          /kratos-prj/gpu_solvers_application//install
+
                    ;
+
           
+
          ECHO $(TOP) ;
+
         
+
::** example B (D:\kratos; D:\external_libraries)
+
          using gcc ;
+
          using intel : : : <cxxflags>"-fPIC -ansi -funroll-loops -cxxlib-gcc -openmp -wd654 -wd10010" <cflags>"-fPIC -funroll-loops -cxxlib-gcc -openmp -wd654 -wd10010" ;
+
          using sun : : : <cflags>" -w  -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0"  <cxxflags>" -w  -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0" <linkflags>" -w  -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0" ;
+
          <span style="color:Red; background:Yellow">'''using msvc ;'''</span>
+
          using python ;
+
         
+
          # uncomment and specify compiler to use MPI
+
          ##using mpi : /opt/openmpi/1.2.4/bin/mpiCC ;
+
         
+
          #################################################################################
+
          ## defining "common includes" and external libraries
+
          path-constant TOP : . ;
+
         
+
          #path to the boost library -- FUNDAMENTAL --- ATTENTION: it is IMPORTANT to set to the directory FROM WHICH the boost was installed
+
          path-constant BOOST_LIB_DIR :  /usr/lib/ ;
+
          path-constant BOOST_INCLUDE_DIR :  /usr/include/ ;
+
         
+
          ##blas/lapack lib dir
+
          path-constant BLAS_LIB_DIR : /usr/lib/ ;
+
          path-constant LAPACK_LIB_DIR : /usr/lib/ ;
+
         
+
          # Path to CUDA - required to compile and use GPU solvers - strictly optional
+
          ##path-constant CUDA_LIB_DIR :  /usr/local/cuda/lib ;
+
          ##path-constant CUDA_INCLUDE_DIR :  /usr/local/cuda/include ;
+
          ##path-constant LAPACKPP_LIB_DIR :  /usr/local/lapackpp/lib ; #directory in which we installed the LAPACK++ lib
+
          ##path-constant LAPACKPP_INCLUDE_DIR :  /usr/local/lapackpp/include/lapackpp ; #directory in which we installed the LAPACK++ lib
+
         
+
          ##decomment and modify for parallel
+
          ##path-constant MPI_LIB_DIR : /usr/lib/openmpi/lib/ ;
+
          ##path-constant MPI_INCLUDE_DIR : /usr/lib/openmpi/include/ ;
+
          ##path-constant TRILINOS_LIB_DIR : /compiled_libraries/trilinos-9.0.1/lib/ ;
+
          ##path-constant TRILINOS_INCLUDE_DIR : /compiled_libraries/trilinos-9.0.1/include/ ;
+
          ##path-constant METIS_LIB_DIR : /usr/lib/ ;
+
          ##path-constant METIS_INCLUDE_DIR : /usr/include/ ;
+
         
+
          ##path to the mkl library (STRICTLY OPTIONAL)
+
          ##path-constant MKL_INCLUDE_DIR : /opt/intel/mkl/10.0.1.014/include/ ;
+
          ##path-constant MKL_LIB_DIR : /opt/intel/mkl/10.0.1.014/lib/ ;
+
         
+
          project KratosProject
+
                          :
+
                          #############################################################################
+
                          ############### TO BE CUSTOMIZED -- LINUX VERSION EXAMPLE!! #################
+
                          <span style="color:Red; background:Yellow">'''##'''</span> requirements                <include>$(BOOST_INCLUDE_DIR)              #to be CUSTOMIZED
+
                          <span style="color:Red; background:Yellow">'''##'''</span>                                <include>/usr/include/python2.5/                    #to be CUSTOMIZED
+
                          <span style="color:Red; background:Yellow">'''##'''</span>                                <include>$(TOP)/kratos
+
                          <span style="color:Red; background:Yellow">'''##'''</span>                                <include>$(TOP)/external_libraries
+
                          #############################################################################
+
         
+
                          <span style="color:Green; background:White">'''#############################################################################'''
+
                          '''############### TO BE CUSTOMIZED -- WINDOWS VERSION EXAMPLE!! ###############'''</span>
+
                          requirements <include><span style="color:Red; background:Yellow">'''"D:/external_libraries/boost_1_42_0"'''</span>    #to be CUSTOMIZED
+
                                                          <include><span style="color:Red; background:Yellow">'''" D:/Python26/include"'''</span>          #to be CUSTOMIZED
+
                                                          <include>$(TOP)/kratos
+
                                                          <include><span style="color:Red; background:Yellow">'''"D:/external_libraries"'''</span>
+
                          #############################################################################               
+
         
+
                                                ##omptl - necessary for parallelism
+
                                                <include>$(TOP)/external_libraries/omptl
+
                                                         
+
                                                          #basic configurations
+
                                                <threading>multi
+
                                                <define>NDEBUG
+
          ###                                    <toolset>intel:<define>_GCC_LIMITS_H_
+
         
+
                                                            #compiler settings - can be CUSTOMIZED by the user
+
                                                            #WARNING -fPIC is NEEDED to compile on 64 bit systems - it has to be specified here in order to include it in the
+
                                                            #kratos "static" library
+
                                                            <warnings>on
+
         
+
                                                            #gcc settings
+
                                                          <toolset>gcc:<cflags>"-fPIC -funroll-loops" ##settings for external libraries
+
                                                            <toolset>gcc:<cxxflags>"-fPIC -ansi -funroll-loops -ffast-math -Wno-unknown-pragmas"
+
         
+
                                                          #msvc settings
+
                                                          <toolset>msvc:<linkflags>"/NODEFAULTLIB:libcmt"
+
                                                          <toolset>msvc:<cxxflags>"/D_SCL_SECURE_NO_DEPRECATE  /wd4335"
+
         
+
                                                          #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
+
         
+
          #############################################################################
+
          ############### TO BE CUSTOMIZED -- LINUX VERSION EXAMPLE!! #################
+
          <span style="color:Red; background:Yellow">'''##'''</span>lib pythonlib : : <name>python2.5 ;
+
          <span style="color:Red; background:Yellow">'''##'''</span>lib boost_python_lib : : <variant>debug <name>boost_python-mt-d <search>$(BOOST_LIB_DIR) ;   
+
          <span style="color:Red; background:Yellow">'''##'''</span>lib boost_python_lib : : <variant>release <name>boost_python-mt <search>$(BOOST_LIB_DIR) ;   
+
          #############################################################################
+
         
+
          #############################################################################
+
          ############### TO BE CUSTOMIZED -- WINDOWS                #################
+
          lib pythonlib : : <name><span style="color:Red; background:Yellow">'''python26'''</span> <search><span style="color:Red; background:Yellow">'''" D:/Python26/libs " '''</span>;
+
          lib boost_python_lib : : <variant>debug <name><span style="color:Red; background:Yellow">'''boost_python-vc90-mt-gd-1_42'''</span> <search><span style="color:Red; background:Yellow">'''"D:/external_libraries/boost_1_42_0/lib"'''</span> ;   
+
          lib boost_python_lib : : <variant>release <name><span style="color:Red; background:Yellow">'''boost_python-vc90-mt-1_42'''</span> <search><span style="color:Red; background:Yellow">'''"D:/external_libraries/boost_1_42_0/lib"'''</span> ;   
+
          #############################################################################
+
         
+
         
+
          #blas and lapack libraries
+
          lib blaslibrary : : <name>blas <search>$(BLAS_LIB_DIR) <link>shared ;
+
          lib lapacklibrary : : <name>lapack <search>$(LAPACK_LIB_DIR) <link>shared ;
+
         
+
          #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 ;
+
          alias libomp : : <toolset>msvc ;
+
          alias libomp : : <toolset>sun ;
+
         
+
          ## MPI LIBRARIES - comment out if using mpi is not required
+
          ##lib mpilibrary : : <name>mpi <search>$(MPI_LIB_DIR) ;
+
          ##lib mpilibrary_cpp : : <name>mpi_cxx <search>$(MPI_LIB_DIR) ;
+
         
+
          #################################################################################
+
          # IN PRINCIPLE THIS SHOULD REQUIRE NO CUSTOMARIZATION .. apart for compiling new applications
+
          ## defining "ids" for the different projects
+
          use-project /kratos-prj : . ;
+
         
+
          ##gid post library
+
          use-project /kratos-prj/gidpost : <span style="color:Red; background:Yellow">'''"D:/external_libraries/gidpost"'''</span> ;
+
         
+
          ##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 ;
+
          use-project /kratos-prj/MeshingApplication : $(TOP)/applications/MeshingApplication ;
+
          ##use-project /kratos-prj/Qcompressible_fluid_application : $(TOP)/applications/Qcompressible_fluid_application ;
+
         
+
          ## REQUIRES METIS TO BE INSTALLED
+
          ##use-project /kratos-prj/MetisApplication : $(TOP)/applications/metis_application ;
+
         
+
          ## REQUIRES TRILINOS TO BE INSTALLED
+
          ##use-project /kratos-prj/TrilinosApplication : $(TOP)/applications/trilinos_application ;
+
         
+
          ## MKL solvers: will not be compiled by default ###################################################
+
          ## this requires intel MKL library (v. 10.0.1.014) installed properly on your system ##############
+
          #use-project /kratos-prj/mkl_solvers_application : $(TOP)/applications/mkl_solvers_application ;
+
         
+
          # GPU Solvers: needs CUDA to be installed and appropriate environment variable set, a GT200 series GPU card (GTX260, GTX 280, etc.) with the *latest* driver installed
+
          # Before trying to compile this application, go to "~/kratos/applications/gpu_solvers_application/custom_external_libraries" and issue a "./build.sh" to build the "gpu_sparse.a" library
+
          use-project /kratos-prj/gpu_solvers_application : $(TOP)/applications/gpu_solvers_application ;
+
         
+
          ###################################################################################################
+
         
+
          alias libkratos_static : /kratos-prj/kratos//libkratos/<link>static ;
+
          alias gidpost : /kratos-prj/gidpost//gidpost/<link>static ;
+
         
+
          #################################################################################
+
          ## 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/MeshingApplication//install
+
          #                                /kratos-prj/FSIapplication//install
+
          #                                /kratos-prj/mkl_solvers_application//install
+
          #                                /kratos-prj/Qcompressible_fluid_application//install
+
          #                                /kratos-prj/MetisApplication//install
+
          #                                /kratos-prj/TrilinosApplication//install
+
          #                                /kratos-prj/gpu_solvers_application//install
+
                                          ;
+
           
+
          ECHO $(TOP) ;
+
 
+
=== Creation of the Microsoft Visual Studio 2008 Kratos Project ===
+
 
+
::* Open your MS Visual Studio
+
 
+
::[[Image:MSVS2008_Kratos_Project.1.jpg]]
+
 
+
::* To create the Kratos Project, select: Visual Studio - New Project - General - Makefile Project
+
::** Name: any name you want, but avoid spaces or unusual characters, for example you can use '''KratosIDE2010'''
+
::** Location: your kratos main folder ('''"C:\Kratos2010\kratos"''' or '''"D:\Kratos2010\kratos"''')
+
::** Be sure that the "create directory for solution" is '''UNMARKED'''
+
 
+
::[[Image:MSVS2008_Kratos_Project.2.jpg]]
+
 
+
::* Select '''''Debug Configuration Settings''''' (the -jN options, use N as the number of processors)
+
::** Build command line:    '''bjam toolset=msvc threading=multi debug -j2'''
+
::** Clean command line:    '''bjam toolset=msvc threading=multi debug clean -j2'''
+
::** Rebuild command line:    '''bjam toolset=msvc threading=multi debug -a -j2'''
+
::** Delete the name of the .exe file
+
 
+
::[[Image:MSVS2008_Kratos_Project.3.jpg]][[Image:MSVS2008_Kratos_Project.4.jpg]]
+
 
+
::* Select '''''Release Configuration Settings'''''
+
::** The "Same as debug configuration" option should be unmarked
+
::** Build command line:    '''bjam toolset=msvc threading=multi release –j2'''
+
::** Clean command line:    '''bjam toolset=msvc threading=multi release clean –j2'''
+
::** Rebuild command line:    '''bjam toolset=msvc threading=multi release -a –j2'''
+
::** Delete the name of the .exe file
+
:: [[Image:MSVS2008_Kratos_Project.5.jpg]]
+
 
+
::* Click Finish
+
 
+
::[[Image:MSVS2008_Kratos_Project.6.jpg]]
+
 
+
::* Now close the MS Visual Studio and check if a new folder has been created (probably at "C:\Kratos2010\kratos\KratosIDE2010" or "D:\Kratos2010\kratos\KratosIDE2010"). This folder is not any longer necessary, so you can copy all the files in it to your Kratos root ("C:\Kratos2010\kratos" or "D:\Kratos2010\kratos") and delete it. This operation is not strictly necessary.
+
::* Open again your MS Visual Studio 2008, and open the project '''KratosIDE2010''' from the kratos root.
+
::* Check the project properties:
+
 
+
::[[Image:MSVS2008_Kratos_Project.7.jpg]]
+
 
+
::* It should be like:
+
 
+
::[[Image:MSVS2008_Kratos_Project.8.jpg]][[Image:MSVS2008_Kratos_Project.9.jpg]]
+
 
+
::* Considering that Kratos works as a library, the program to execute the code is python, so in the '''Command''' field you have to indicate the python.exe file ("C:\Python26\python.exe" or "D:\Python26\python.exe"). The '''Command Arguments''' and '''Working Directory''' will be defined with the specific application, as we will see when we check the whole installation process.
+
+
::[[Image:MSVS2008_Kratos_Project.10.jpg]]
+
 
+
::* The '''NMake''' window for the Debug and Release options contains what we have already defined when we created the kratos project.
+
 
+
::[[Image:MSVS2008_Kratos_Project.11.jpg]][[Image:MSVS2008_Kratos_Project.12.jpg]]
+
 
+
::The installation process has finished.
+
 
+
=== First compilation and typical errors ===
+
 
+
::* Please, select Build - Build Solution
+
 
+
::[[Image:MSVS2008_Compile_Kratos.1.jpg]]
+
 
+
::* Patience... due to the parallel development for Linux and Windows, you may find errors such as:
+
Error 91 error C2664: 'GiD_BeginResult' : cannot convert parameter 6 from 'const char *' to 'char *' c:\Kratos2010\kratos\applications\structural_application\custom_utilities\custom_gid_io.h 195
+
:: en the following files custom_gid_io.h, edgedbased_gid_io.h, twofluid_gid_io.h, gid_mesh_container.h, gid_gauss_point_container.h, pfem_gid_io.h
+
 
+
::[[Image:MSVS2008_Compile_Kratos.2.jpg]]
+
 
+
::* For each file,it is enough to make a replacement: Edit – Find and Replace – Quick Replace
+
 
+
::[[Image:MSVS2008_Compile_Kratos.3.jpg]]
+
 
+
::* Find what: '''const char *''' Replace with: '''char *'''
+
 
+
::[[Image:MSVS2008_Compile_Kratos.4.jpg]][[Image:MSVS2008_Compile_Kratos.5.jpg]]
+
 
+
::* Other typical error in Windows is:
+
Error 57 fatal error C1083: Cannot open include file: 'sys/times.h': No such file or directory c:\Kratos2010\kratos\applications\ExternalSolversApplication\custom_external_libraries\SuperLU_3.0\SRC\superlu_timer.c 27
+
::* This is because the SuperLU library (developed in the External Solvers Application) has been developed only for Linux. Therefore, this application  should be removed from the Windows compilation.
+
::* Open the Jamroot file again and add a comment character to the ExternalSolversApplication. The part to modify is:
+
          ##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 ;
+
          <span style="color:Red; background:Yellow">'''##'''</span>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 ;
+
          use-project /kratos-prj/MeshingApplication : $(TOP)/applications/MeshingApplication ;
+
          ##use-project /kratos-prj/Qcompressible_fluid_application : $(TOP)/applications/Qcompressible_fluid_application ;
+
         
+
          ## REQUIRES METIS TO BE INSTALLED
+
          ##use-project /kratos-prj/MetisApplication : $(TOP)/applications/metis_application ;
+
         
+
          ## REQUIRES TRILINOS TO BE INSTALLED
+
          ##use-project /kratos-prj/TrilinosApplication : $(TOP)/applications/trilinos_application ;
+
         
+
          ## MKL solvers: will not be compiled by default ###################################################
+
          ## this requires intel MKL library (v. 10.0.1.014) installed properly on your system ##############
+
          #use-project /kratos-prj/mkl_solvers_application : $(TOP)/applications/mkl_solvers_application ;
+
         
+
          # GPU Solvers: needs CUDA to be installed and appropriate environment variable set, a GT200 series GPU card (GTX260, GTX 280, etc.) with the *latest* driver installed
+
          # Before trying to compile this application, go to "~/kratos/applications/gpu_solvers_application/custom_external_libraries" and issue a "./build.sh" to build the "gpu_sparse.a" library
+
          use-project /kratos-prj/gpu_solvers_application : $(TOP)/applications/gpu_solvers_application ;
+
         
+
          ###################################################################################################
+
         
+
          alias libkratos_static : /kratos-prj/kratos//libkratos/<link>static ;
+
          alias gidpost : /kratos-prj/gidpost//gidpost/<link>static ;
+
         
+
          #################################################################################
+
          ## 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
+
          <span style="color:Red; background:Yellow">'''#'''</span>          /kratos-prj/ExternalSolversApplication//install
+
                    /kratos-prj/ULFapplication//install
+
                    /kratos-prj/ALEapplication//install
+
                    /kratos-prj/MeshingApplication//install
+
          #          /kratos-prj/FSIapplication//install
+
          #          /kratos-prj/mkl_solvers_application//install
+
          #          /kratos-prj/Qcompressible_fluid_application//install
+
          #          /kratos-prj/MetisApplication//install
+
          #          /kratos-prj/TrilinosApplication//install
+
          #          /kratos-prj/gpu_solvers_application//install
+
                    ;
+
           
+
          ECHO $(TOP) ;
+
::* Now, after some time, it should work...
+
 
+
::[[Image:MSVS2008_Compile_Kratos.6.jpg]]
+
 
+
::* Debug version
+
 
+
::[[Image:MSVS2008_Compile_Kratos.7.jpg]]
+
 
+
::* Release version
+
 
+
::[[Image:MSVS2008_Compile_Kratos.8.jpg]]
+
 
+
 
+
 
+
[[Category: Installation]]
+

Latest revision as of 08:39, 2 July 2018

The information in this page was moved to GitHub: https://github.com/KratosMultiphysics/Kratos/wiki/Windows-Install

Personal tools
Categories