1st May 2016

OpenFOAM Repo: 1. Software for Compilation

The following supporting software is required to download, compile and run OpenFOAM from one of the source repositories.

  • Compiler: either GCC version 4.5 or above; or LLVM Clang version 3.6 or above; or Intel ICC version 15.0.3  or above. GCC is most commonly available and the version can be checked by typing
    gcc --version
  • FLEX fast lexical analyser, used by OpenFOAM for reading files of third-party formats.
  • cmake build software for compiling ParaView, the third-party visualisation toolkit
  • QT cross-platform application software, version 4.8 or above, used by ParaView.
  • Git distributed version control software used for the OpenFOAM source repositories.
  • OpenMPI message passing interface for parallel computation.

Installing dependent packages on Ubuntu (versions 14.04 or above)

  • Install general packages for OpenFOAM
    sudo apt-get install build-essential flex bison git-core cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev
  • Install packages for ParaView
    sudo apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev

    Note: If Qt 5 is also installed in Ubuntu, the following should be executed before running makeParaView:

    export QT_SELECT=qt4

Installing on SuSE (OpenSuSE/SLES v12 or above, or Tumbleweed)

  • Install general packages for OpenFOAM
    sudo zypper install -t pattern devel_C_C++
    sudo zypper install git-core cmake boost-devel gnuplot mpfr-devel openmpi-devel glu-devel
  • Install packages for ParaView
    sudo zypper install libQtWebKit-devel libqt4-devel qt4-assistant-adp-devel qt4-x11-tools
  • Either log out and log in again, or source the script by typing in the terminal
    source /etc/profile.d/

Installing on RedHat Enterprise Linux (RHEL)

The RHEL distribution generally contains old versions of software packages.  For example,  the latest version of RHEL 6 at the time of writing (2016), RHEL 6.7, contains GCC version 4.4.7.  This cannot compile OpenFOAM which requires at least version 4.5.0 of GCC, released in 2010.  An upgrade may be available under a support subscription, otherwise the instructions to upgrade RHEL from packages in unofficial repositories may enable compilation and running of OpenFOAM on RHEL.

Up: Main Page ↑ | Next: 2. Downloading the OpenFOAM Source Code