Compiling OpenFOAM-5.0 with Intel-MPI

Minimum Requirements version

  1. gcc: 4.8.5
  2. cmake: 3.3 (required for ParaView and CGAL build)
  3. boost: 1.48 (required for CGAL build)
  4. fftw: 3.3.7 (optional – required for FFT-related functionality)
  5. Qt: 4.8 (optional – required for ParaView build)

I’m using Intel-16.0.4 and Intel-MPI-

Step 1a: Download and Unpacking Sources

# wget -O - | tar xvz
# wget -O - | tar xvz

Step 1b:  Rename the Directory

# mv OpenFOAM-5.x-version-5.0 OpenFOAM-5.0
# mv ThirdParty-5.x-version-5.0 ThirdParty-5.0

Step 2: Initiate Intel and Intel-MPI Environment and source OpenFOAM-5.0 bashrc

source /usr/local/intel/bin/ intel64
source /usr/local/intel/parallel_studio_xe_2016.4.072/bin/ intel64
source /usr/local/intel/impi/ intel64
source /usr/local/intel/mkl/bin/ intel64
source /usr/local/OpenFOAM/OpenFOAM-5.0/etc/bashrc
export MPI_ROOT=/usr/local/intel/impi/

Step 3: Make sure your CentOS-7 Environment have the following base packages

# yum install gcc-c++ gcc-gfortran gmp flex flex-devel boost zlib zlib-devel qt4 qt4-devel

Step 4: Edit the OpenFOAM  internal bashrc

# vim /usr/local/OpenFOAM/OpenFOAM-5.0/etc/bashrc

Line 35,36


Line 45


Line 60

export WM_COMPILER_TYPE=system

Line 65

export WM_COMPILER=Icc

Line 88


Step 5: Compile OpenFOAM

# ./Allwmake -update -j

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.