Menu

Installation

Joerg F. Unger Ghada Sokar Vitaliy Kindrachuk Thomas Titscher Peter Otto
Attachments
ANN-cmake.patch (1688 bytes)
ARPACK-cmake.patch (3593 bytes)

Installation & Build a NuTo environment

Build environment

Requirements
  • SWIG >=1.3.40 (aptitude install swig2.0 python-instant)
  • CMAKE >= 2.8.0
  • Python >= 2.6 (aptitude install python2.7-dev)
  • Doxygen >= 1.5.8
  • BOOST >= 1.36.0
  • BLAS
  • Eigen >= 3.0
  • ANN
  • ARPACK
  • MUMPS: http://graal.ens-lyon.fr/MUMPS: sparse direct solver (How to install MUMPS) -> needed for all explicit FE solutions
  • PARDISO (Parallel solver direct or iterative)
Optional packages

Instruction for compilation (Unix OS)

  1. checkout NuTo?

    svn co --username=USERNAME svn+ssh://USERNAME@svn.code.sf.net/p/nuto/code/ nuto
    

    or update using

    svn up
    
  2. Build and Install external packages (optional)
    a. Download individually from the relevant homepages and build static libraries (on 64-bit systems the -fPIC option is required during compilation) or build shared libraries -> recommended to get the newest versions
    b. Download via ssh (login required) repository location has changed

    svn co svn+ssh://parrot.bauing.uni-weimar.de/home/projects/NUTO/externals
    

    External Libraries

    Eigen3

    Homepage: http://eigen.tuxfamily.org

    cd eigen
    mkdir eigen3
    tar xzf 3.0.6.tar.gz --strip 1 -C eigen3
    cd eigen3
    mkdir objdir
    cd objdir
    cmake -DCMAKE_INSTALL_PREFIX=/opt/nuto ..
    make
    make install (eventually as root)
    


    BOOST

    Homepage: http://www.boost.org/

    cd boost
    tar xzf boost_1_54_0.tar.gz
    cd boost_1_54_0
    ./bootstrap.sh --prefix=/opt/nuto
    ./bjam --layout=versioned cxxflags="-fPIC -std=c++0x" --with-serialization --with-filesystem --with-python link=static
    ./bjam --layout=versioned cxxflags="-fPIC -std=c++0x" --with-serialization --with-filesystem --with-python link=static install (eventually as root)
    

    In order not to use the standard compiler, do e.g.

    ./bjam --toolset=gcc-4.4 --layout=versioned cxxflags="-fPIC -std=c++0x" --with-serialization --with-filesystem --with-python link=static
    

    In order to use debug version do

     ./bjam debug --layout=versioned cxxflags="-fPIC -std=c++0x" --with-serialization --with-filesystem --with-python link=static
    


    BLAS

    Homepage: http://github.com/xianyi/OpenBLAS/archive/v0.2.14.tar.gz.

    cd openblas
    tar xzf OpenBLAS-0.2.14.tar.gz
    cd OpenBLAS-0.2.14
    make USE_OPENMP=1 (if openMP parallelization is used else just make)        
    make PREFIX=/opt/nuto/openblas install (eventually as root)
    


    PARDISO

    Homepage: http://www.pardiso-project.org/branch. Download the appropriate PARDISO library. "libpardiso500-GNU472-X86-64.so" means you are using at least gcc version 4.7.2.

    cp libpardiso500-GNU<gcc_version>-X86-64.so /opt/nuto/lib/libpardiso.so (eventually as root)
    


    ANN

    Homepage: http://www.cs.umd.edu/~mount/ANN
    Patches: ANN-cmake.patch

    cd ann
    tar xzf ann_1.1.2.tar.gz
    cd ann_1.1.2
    patch -p1 -i ../ANN-cmake.patch
    mkdir objdir
    cd objdir
    cmake -DCMAKE_INSTALL_PREFIX=/opt/nuto ..
    make
    make install (eventually as root)
    mkdir /opt/nuto/include/ANN (eventually as root)
    mv /opt/nuto/include/ANN.h /opt/nuto/include/ANN (eventually as root)
    


    Arpack

    Homepage: http://www.caam.rice.edu/software/ARPACK/
    Patches: Arpack-cmake.patch

    cd ARPACK
    
    tar xzf arpack96.tar.gz
    cd ARPACK
    patch -p1 -i ../ARPACK-cmake.patch
    mkdir objdir
    cd objdir
    cmake -DCMAKE_INSTALL_PREFIX=/opt/nuto ..
    make
    make install (eventually as root)
    


  3. Build the Makefiles with cmake (check CMakeLists.txt for additional build options) An out-of-source is recommended
    a. create a build directory (it is recommended that the build directory is not a subdirectory of the nuto source directory)

        mkdir nuto_build
        cd nuto_build
    



    b. call cmake to create unix make files

    cmake -DNUTO_EXTERNAL_LIBRARIES_ROOT=/opt/nuto -DBOOST_ROOT=/opt/nuto mysourcedirectory
    

    here mysourcedirectory = 'home/username/develop/nuto'
    or to create unix make files and an eclipse project for debugging and only python tests turned on

    cmake -G"Eclipse CDT4 - Unix Makefiles" -DNUTO_EXTERNAL_LIBRARIES_ROOT=/opt/nuto -DBOOST_ROOT=/opt/nuto  -DENABLE_DEBUG:BOOL=ON -DENABLE_C++_TESTS:BOOL=OFF  -DENABLE_EXAMPLES:BOOL=OFF ../nuto
    

    or to create unix make files and an eclipse project with optimization and python and c++ tests turned on

    cmake -G"Eclipse CDT4 - Unix Makefiles" -DNUTO_EXTERNAL_LIBRARIES_ROOT=/opt/nuto -DBOOST_ROOT=/opt/nuto -DENABLE_DEBUG:BOOL=OFF -DENABLE_C++_TESTS:BOOL=ON ../nuto
    
    cmake -G"Eclipse CDT4 - Unix Makefiles"  -DCMAKE_ECLIPSE_VERSION=3.8 -DNUTO_EXTERNAL_LIBRARIES_ROOT=/opt/nuto -DBOOST_ROOT=/opt/nuto -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so -DENABLE_DEBUG:BOOL=ON -DENABLE_C++_TESTS:BOOL=OFF -DENABLE_EXAMPLES:BOOL=OFF ../nuto
    

    this one allows you to specify the python version you are using (in case python2 and python3 are installed in parallel) and the eclipse version

  4. call the build process (in your working directory)

    make
    
  5. set search path for python modules

    export PYTHONPATH=$(pwd)/src:$PYTHONPATH
    
  6. test the build process

    make test
    

    a single test file (e.g. Brick8N) can be executed

    ctest -V -R Brick8N
    
  7. build documentation

    make doc
    

    if you have problems with the Fortran-compiler, set the path to the Fortran-compiler by the environment variable FC or the cmake variable CMAKE_Fortran_COMPILER.

Instruction to include the new NuTo-modules to your Python-module environment (Unix OS)

  1. add module path to your environment
    export PYTHONPATH=$PYTHONPATH:<path to>/mynuto/src
    

GUI requirements

The NuTo sources contain a simple GUI (“NuToGUI”) to try out NuTo and view results.

It has the following additional requirements:

  • wxWidgets >= 2.8 (2.8.11 or 2.9.1 recommended)
  • VTK >= 5.2
  • Boost.Python

wxWidgets

wxWidgets (http://www.wxwidgets.org/) is a cross-platform GUI toolkit, used to create the interface for the NuToGUI application.

For Linux, wxWidgets is usually available as a package in the distribution. For Windows, binaries are available.

A comprehensive overview of the different ways to acquire wxWidgets can be found on it's Wiki: http://wiki.wxwidgets.org/Guides_%26_Tutorials#Installing_wxWidgets_and_Setting_up_Your_IDE

When configuring NuTo for building you may have to tell CMake where to find wxWidgets. The CMake documentation lists the different variables that control how wxWidgets is found: http://cmake.org/cmake/help/cmake-2-8-docs.html#module:FindwxWidgets

VTK

VTK is a visualization toolkit and used for the results display.

VTK uses CMake for building; so building it is essentially just a matter of doing cmake <path to="" vtk_sources="">; make. (On Windows you should provide an appropriate generator options.) When building NuTo you need to specify where VTK can be found - this is done through the VTK_DIR variable, like cmake -DVTK_DIR=<path where="" vtk="" was="" built=""> <path to="" nuto="">.

</path></path></path>

Boost.Python

On Linux, there are probably distribution packages available that contain Boost.Python.

If you built Boost yourself, Boost.Python should usually be built as a part of it, if the Python headers+libraries are available.

Running the GUI

You need a NuTo python module set up, as described above. You can run the GUI application itself with ./nutogui from the build directory. (Without a correct NuTo environment you will get an error message along the lines of “could not initialize Python ... could not import module nuto”.)

Small walkthrough:

  • Click the “Open file” button, locate and open Brick8N.py in the NuTo sources.
  • Click “Run script”.
  • A new tab with the results activates.
  • You could view different result data (drop down that starts with “Solid color”).
  • You could visualize the displacement in various ways - click one of the “displacement” buttons in the toolbar. The scale is also inviting for playing around.

Using a different compiler with cmake

Instead of just calling cmake do

 CC=/usr/bin/gcc-4.4 CXX=/usr/bin/g++-4.4 FC=/usr/bin/gfortran-4.4 cmake [...]


Attachments


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.