wiki:HowToInstallFromSource

How to install from sources

Download

From tarballs

If you want to use OpenTURNS, we highly recommend you to pick up the lastest stable release.

You may download the lastest OpenTURNS' release archive from SourceForge.net in the download section.

Or you can get it directly by typing:

wget http://downloads.sourceforge.net/openturns/openturns/openturns-1.X.tar.bz2

Extract files from downloaded archive :

tar xvzf openturns-1.X.tar.gz

if you use gzip compressor, or

tar xjvf openturns-1.X.tar.bz2

if you use bzip2 compressor.

From version control system

To use a development version, you must have Git to retrieve a version.

You can checkout the development master:

git clone https://github.com/openturns/openturns.git

We ensure that master is quite stable though not fully debugged. So it should compile and pass the checks without efforts. That's all, so don't ask for bug correction on the trunk.
In particular, we do not encourage anyone to pick up a development version and distribute it in any way.

Install the required dependencies

Debian/Ubuntu

  • Install git
    sudo apt-get install git
    
  • Install building tools
    sudo apt-get install gcc g++ gfortran flex bison cmake 
    
  • Install some libraries
    sudo apt-get install libtbb-dev libxml2-dev
    
  • Install mathematical tools
    sudo apt-get install r-base-core liblapack-dev libmuparser-dev libboost-math-dev
    
  • Install python's development files and SWIG (used to build TUI)
    sudo apt-get install swig python-dev
    
  • Install additional python modules
    sudo apt-get install python-matplotlib python-numpy python-scipy python-sphinx
    

Fedora

  • Login with super cow powers
  • Install development tools (gcc, bison, flex, swig, subversion ...)
    yum groupinstall "Development Tools"
    
  • Install some libraries
    yum install libxml2-devel python-devel python-sphinx python-matplotlib R-devel lapack-devel tbb-devel boost-devel muParser-devel
    

Other linux distributions

To compile your OpenTURNS platform, you need some additional libraries, headers (development files) and tools. Use the development versions of the packages (libfoo-dev rather than libfoo). Of course, you can use your favorite package-manager to download and install these requirements.

Pre installation

To enable some optional capabilities depending on R, you need to install the provided R package named rot:

# R CMD INSTALL utils/rot_1.4.6.tar.gz

Then you should be able to load it in R.

$ R --vanilla <<< 'library(rot)'

Configure

As you can see with dependencies, OpenTURNS project uses CMake to configure and build the sources.

  • Create a build directory and go there
    mkdir build
    cd build
    
  • By default, openturns will be installed in the system, so specify CMAKE_INSTALL_PREFIX to install it as user:
    cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
    

Build, install & check

make
make check
make install
make installcheck

Try it !

  • Run a quick diagnostic test
    python python/test/t_features.py
    

Should display:

1: Python module load                    OK
2: Viewer (matplotlib)                   OK
3: drawing (R)                           OK
4: linear model (R.rot)                  OK
5: serialization (LibXML2)               OK
6: analytical function (muParser)        OK
7: HMatrix (hmat-oss)                    OK
8: optimization (NLopt)                  OK
Last modified 19 months ago Last modified on 02/01/16 18:28:09