Kategoriarkiv: centos

Install OpenFOAM v1706 on CentOS 6.x from source Copy

Download:

mkdir -p /opt/openfoam/v1706
cd /opt/openfoam/v1706
wget https://sourceforge.net/projects/openfoamplus/files/v1706/OpenFOAM-v1706.tgz
wget https://sourceforge.net/projects/openfoamplus/files/v1706/ThirdParty-v1706.tgz

Unpack:

tar -xzvf OpenFOAM-v1706.tgz ;tar -xzvf ThirdParty-v1706.tgz

Edit file OpenFOAM-v1706/etc/bashrc

change FOAM_INST_DIR to
 FOAM_INST_DIR=/opt/openfoam/v1706
and:
export WM_MPLIB=OPENMPI

Load modules

module load gcc/4.8.4            # installation Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x
 module load mpfr/3.1.2 
 module load gmp/5.1.2
 module load mpc/1.0.1

Source bashrc

. ../OpenFOAM-v1612+/etc/bashrc

Compile on many cores if you have

export MAKEFLAGS='-j 60'
export WM_NCOMPPROCS=60

Now compile ThirdParty essentials

first install boost 1.48
yum install boost148 boost148-devel
I have not been able to use the compiled versions of gmp and mpfr...
 yum install gmp-devel mpfr-devel
cd  ThirdParty-v1612+
./Allwmake

Compile ParaView

Install cmake3
yum install cmake3

module load qt/4.8.6       # installation Standalone QT 4.8 installation on Centos
 ./makeParaView -cmake /usr/bin/cmake3
note: paraview need the path to gcc glibc: 
export LD_LIBRARY_PATH=/opt/gcc/4.8.4/lib64:$LD_LIBRARY_PATH

Compile ADIOS parallell IO

wget http://users.nccs.gov/~pnorbert/adios-1.11.0.tar.gz
 tar -xzvf adios-1.11.0.tar.gz
 mv adios-1.11.0 ADIOS-1.11.0
 ./makeADIOS

Compile ccmio

 wget http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
tar -xzvf libccmio-2.6.1.tar.gz
./makeCCMIO

Compile OpenFOAM

cd ../OpenFOAM-v1706
./Allwmake

Create module file

Create the file: /etc/modulefiles/openfoam/v1706

put the following content in the file

/etc/modulefiles/openfoam/v1706

#%Module1.0####################################################################
##
## openfoam/v1706 modulefile
##
## 
##
proc ModulesHelp { } {
 puts stderr "tSet OpenFOAM v1612+ environment."
}

## Create a whatis file.
module-whatis "Adds OpenFOAM links, aliases and paths"

set home $env(HOME)
set user $env(USER)


set-alias app "cd $FOAM_APP"
#set-alias foam3rdParty "cd $WM_THIRD_PARTY_DIR"
#set-alias foamApps "cd $FOAM_APP"
set-alias foam "cd $WM_PROJECT_DIR"
set-alias foamfv "cd $FOAM_SRC/finiteVolume"
set-alias foamSite "cd $WM_PROJECT_INST_DIR/site"
set-alias foamSol "cd $FOAM_SOLVERS"
set-alias foamsrc "cd $FOAM_SRC/$WM_PROJECT"
set-alias foamTuts "cd $FOAM_TUTORIALS"
set-alias foamUtils "cd $FOAM_UTILITIES"
set-alias lib "cd $FOAM_LIBBIN"
set-alias run "cd $FOAM_RUN"
set-alias sol "cd $FOAM_SOLVERS"
set-alias src "cd $FOAM_SRC"
set-alias tut "cd $FOAM_TUTORIALS"
set-alias util "cd $FOAM_UTILITIES"
#set-alias wm32 "wmSET WM_ARCH_OPTION "32""
#set-alias wm64 "wmSET WM_ARCH_OPTION "64""
set-alias wmDP "wmSET WM_PRECISION_OPTION "DP""
set-alias wmREFRESH "wmSET $FOAM_SETTINGS"
set-alias wmSchedOFF "unset WM_SCHEDULER"
set-alias wmSchedON "export WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler"
set-alias wmSET ". $WM_PROJECT_DIR/etc/bashrc"
set-alias wmSP "wmSET WM_PRECISION_OPTION "SP""
set-alias wmUNSET ". $WM_PROJECT_DIR/etc/config.sh/unset"

set-alias cc "/opt/gcc/4.8.4/bin/gcc"
set-alias wmInt32 "wmSet WM_LABEL_SIZE "32""
set-alias wmInt64 "wmSet WM_LABEL_SIZE "64""

prepend-path PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/gperftools-2.5/bin:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/bin:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/bin:$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/wmake:/opt/qt/4.8.6/bin:/opt/cmake/2.8.12.2/bin:/opt/gcc/4.8.4/bin"
prepend-path LD_LIBRARY_PATH "/opt/gcc/4.8.4/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/fftw-3.3.5/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/CGAL-4.9/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/boost_1_62_0/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/gperftools-2.5/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/openmpi-1.10.4:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib/openmpi-1.10.4:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/lib64:$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/qt/4.8.6/lib:/opt/mpc/1.0.1/lib:/opt/gmp/5.1.2/lib:/opt/mpfr/3.1.2/lib:/opt/gcc/4.8.4/lib"
prepend-path MANPATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/share/man:/opt/gcc/4.8.4/share/man:"

setenv BOOST_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/boost_1_62_0"
setenv CGAL_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/CGAL-4.9"
setenv CMAKE_ROOT_DIR "/opt/cmake/2.8.12.2"
setenv CPLUS_INCLUDE_PATH "/opt/mpc/1.0.1/include:/opt/gmp/5.1.2/include:/opt/mpfr/3.1.2/include:/opt/gcc/4.8.4/include"
setenv CPPFLAGS "-I/opt/mpc/1.0.1/include:-I/opt/gmp/5.1.2/include:-I/opt/mpfr/3.1.2/include:-L/opt/gcc/4.8.4/lib:-I/opt/gcc/4.8.4/include"
setenv FFTW_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/fftw-3.3.5"
setenv FOAM_APPBIN "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_APP "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications"
setenv FOAM_ETC "/opt/openfoam/v1612+/OpenFOAM-v1612+/etc"
setenv FOAM_EXT_LIBBIN "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib"
setenv FOAM_INST_DIR "/opt/openfoam/v1612+"
setenv FOAM_JOB_DIR "/opt/openfoam/v1612+/jobControl"
setenv FOAM_LIBBIN "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_MPI "openmpi-1.10.4"
setenv FOAM_RUN "$home/OpenFOAM/$user-v1612+/run"
setenv FOAM_SETTINGS ""
setenv FOAM_SIGFPE ""
setenv FOAM_SITE_APPBIN "/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_SITE_LIBBIN "/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_SOLVERS "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications/solvers"
setenv FOAM_SRC "/opt/openfoam/v1612+/OpenFOAM-v1612+/src"
setenv FOAM_TUTORIALS "/opt/openfoam/v1612+/OpenFOAM-v1612+/tutorials"
setenv FOAM_USER_APPBIN "$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_USER_LIBBIN "$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_UTILITIES "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications/utilities"
setenv GMP_INCLUDE_DIR "/opt/gmp/5.1.2/include"
setenv GMP_LIBRARIES "/opt/gmp/5.1.2/lib"
setenv LIBS "-L/opt/mpc/1.0.1/lib:-L/opt/gmp/5.1.2/lib:-L/opt/mpfr/3.1.2/lib"
setenv MAKEFLAGS "-j 60"
setenv MPFR_INCLUDE_DIR "/opt/mpfr/3.1.2/include"
setenv MPFR_LIBRARIES "/opt/mpfr/3.1.2/lib"
setenv MPI_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4"
setenv MPI_BUFFER_SIZE "20000000"
setenv OPAL_PREFIX "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4"
setenv ParaView_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1"
setenv ParaView_INCLUDE_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/include/paraview-5.0"
setenv PV_PLUGIN_PATH "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/paraview-5.0"
setenv QT4_ROOT_DIR "/opt/qt/4.8.6"
setenv QT_BIN_DIR "/opt/qt/4.8.6/bin"
setenv QTDIR "/opt/qt/4.8.6"
setenv QTINC "/opt/qt/4.8.6/include"
setenv QTLIB "/opt/qt/4.8.6/lib"
setenv QT_PLUGIN_PATH "/opt/qt/4.8.6/plugins"
setenv SCOTCH_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/scotch_6.0.3"
setenv WM_ARCH "linux64"
setenv WM_ARCH_OPTION "64"
setenv WM_CC "gcc"
setenv WM_CFLAGS "-m64 -fPIC"
setenv WM_COMPILE_OPTION "Opt"
setenv WM_COMPILER "Gcc"
setenv WM_COMPILER_LIB_ARCH "64"
setenv WM_COMPILER_TYPE "system"
setenv WM_CXXFLAGS "-m64 -fPIC -std "c++0x""
setenv WM_CXX "g++"
setenv WM_DIR "/opt/openfoam/v1612+/OpenFOAM-v1612+/wmake"
setenv WM_LABEL_OPTION "Int32"
setenv WM_LABEL_SIZE "32"
setenv WM_LDFLAGS "-m64"
setenv WM_LINK_LANGUAGE "c++"
setenv WM_MPLIB "OPENMPI"
setenv WM_NCOMPPROCS "60"
setenv WM_OPTIONS "linux64GccDPInt32Opt"
setenv WM_OSTYPE "POSIX"
setenv WM_PRECISION_OPTION "DP"
setenv WM_PROJECT_DIR "/opt/openfoam/v1612+/OpenFOAM-v1612+"
setenv WM_PROJECT_INST_DIR "/opt/openfoam/v1612+"
setenv WM_PROJECT "OpenFOAM"
setenv WM_PROJECT_USER_DIR "$home/OpenFOAM/$user-v1612+"
setenv WM_PROJECT_VERSION "v1612+"
setenv WM_THIRD_PARTY_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+"

The ugly compilation of foamMeshToMED

I want to test Code Saturne. Then it would be nice to use OpenFOAM meshes. This i how I did

first install
Build OpenFOAM 3.0.0 on CentOS 6.6and
Install Salome-Platform on CentOS
then download foamMeshToMED

to create an compilation environment:

module load openfoam/3.0.0
. /opt/salome/7.3.0/env_build.sh
as root: ln -s /opt/salome/7.3.0/med-3.0.7/lib/libmedC.so /usr/lib64/
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/opt/salome/7.3.0/med-3.0.7/include/
export LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/salome/7.3.0/med-3.0.7/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/salome/7.3.0/med-3.0.7/lib

then

wmake

to use it just do:

module load openfoam/3.0.0
. /opt/salome/7.3.0/env_build.sh

Install OpenFOAM v1706 on CentOS 6.x from source

Download:

mkdir -p /opt/openfoam/v1706
cd /opt/openfoam/v1706
wget https://sourceforge.net/projects/openfoamplus/files/v1706/OpenFOAM-v1706.tgz
wget https://sourceforge.net/projects/openfoamplus/files/v1706/ThirdParty-v1706.tgz

Unpack:

tar -xzvf OpenFOAM-v1706.tgz ;tar -xzvf ThirdParty-v1706.tgz

Edit file OpenFOAM-v1706/etc/bashrc

change FOAM_INST_DIR to
 FOAM_INST_DIR=/opt/openfoam/v1706
and:
export WM_MPLIB=OPENMPI

Load modules

module load gcc/4.8.4            # installation Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x
 module load mpfr/3.1.2 
 module load gmp/5.1.2
 module load mpc/1.0.1

Source bashrc

. ../OpenFOAM-v1612+/etc/bashrc

Compile on many cores if you have

export MAKEFLAGS='-j 60'
export WM_NCOMPPROCS=60

Now compile ThirdParty essentials

first install boost 1.48
yum install boost148 boost148-devel
I have not been able to use the compiled versions of gmp and mpfr...
 yum install gmp-devel mpfr-devel
cd  ThirdParty-v1612+
./Allwmake

Compile ParaView

Install cmake3
yum install cmake3

module load qt/4.8.6       # installation Standalone QT 4.8 installation on Centos
 ./makeParaView -cmake /usr/bin/cmake3
note: paraview need the path to gcc glibc: 
export LD_LIBRARY_PATH=/opt/gcc/4.8.4/lib64:$LD_LIBRARY_PATH

Compile ADIOS parallell IO

wget http://users.nccs.gov/~pnorbert/adios-1.11.0.tar.gz
 tar -xzvf adios-1.11.0.tar.gz
 mv adios-1.11.0 ADIOS-1.11.0
 ./makeADIOS

Compile ccmio

 wget http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
tar -xzvf libccmio-2.6.1.tar.gz
./makeCCMIO

Compile OpenFOAM

cd ../OpenFOAM-v1706
./Allwmake

Create module file

Create the file: /etc/modulefiles/openfoam/v1706

put the following content in the file

/etc/modulefiles/openfoam/v1706

#%Module1.0####################################################################
##
## openfoam/v1706 modulefile
##
## 
##
proc ModulesHelp { } {
 puts stderr "tSet OpenFOAM v1612+ environment."
}

## Create a whatis file.
module-whatis "Adds OpenFOAM links, aliases and paths"

set home $env(HOME)
set user $env(USER)


set-alias app "cd $FOAM_APP"
#set-alias foam3rdParty "cd $WM_THIRD_PARTY_DIR"
#set-alias foamApps "cd $FOAM_APP"
set-alias foam "cd $WM_PROJECT_DIR"
set-alias foamfv "cd $FOAM_SRC/finiteVolume"
set-alias foamSite "cd $WM_PROJECT_INST_DIR/site"
set-alias foamSol "cd $FOAM_SOLVERS"
set-alias foamsrc "cd $FOAM_SRC/$WM_PROJECT"
set-alias foamTuts "cd $FOAM_TUTORIALS"
set-alias foamUtils "cd $FOAM_UTILITIES"
set-alias lib "cd $FOAM_LIBBIN"
set-alias run "cd $FOAM_RUN"
set-alias sol "cd $FOAM_SOLVERS"
set-alias src "cd $FOAM_SRC"
set-alias tut "cd $FOAM_TUTORIALS"
set-alias util "cd $FOAM_UTILITIES"
#set-alias wm32 "wmSET WM_ARCH_OPTION "32""
#set-alias wm64 "wmSET WM_ARCH_OPTION "64""
set-alias wmDP "wmSET WM_PRECISION_OPTION "DP""
set-alias wmREFRESH "wmSET $FOAM_SETTINGS"
set-alias wmSchedOFF "unset WM_SCHEDULER"
set-alias wmSchedON "export WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler"
set-alias wmSET ". $WM_PROJECT_DIR/etc/bashrc"
set-alias wmSP "wmSET WM_PRECISION_OPTION "SP""
set-alias wmUNSET ". $WM_PROJECT_DIR/etc/config.sh/unset"

set-alias cc "/opt/gcc/4.8.4/bin/gcc"
set-alias wmInt32 "wmSet WM_LABEL_SIZE "32""
set-alias wmInt64 "wmSet WM_LABEL_SIZE "64""

prepend-path PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/gperftools-2.5/bin:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/bin:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/bin:$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/wmake:/opt/qt/4.8.6/bin:/opt/cmake/2.8.12.2/bin:/opt/gcc/4.8.4/bin"
prepend-path LD_LIBRARY_PATH "/opt/gcc/4.8.4/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/fftw-3.3.5/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/CGAL-4.9/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/boost_1_62_0/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/gperftools-2.5/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/openmpi-1.10.4:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib/openmpi-1.10.4:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/lib64:$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/qt/4.8.6/lib:/opt/mpc/1.0.1/lib:/opt/gmp/5.1.2/lib:/opt/mpfr/3.1.2/lib:/opt/gcc/4.8.4/lib"
prepend-path MANPATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/share/man:/opt/gcc/4.8.4/share/man:"

setenv BOOST_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/boost_1_62_0"
setenv CGAL_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/CGAL-4.9"
setenv CMAKE_ROOT_DIR "/opt/cmake/2.8.12.2"
setenv CPLUS_INCLUDE_PATH "/opt/mpc/1.0.1/include:/opt/gmp/5.1.2/include:/opt/mpfr/3.1.2/include:/opt/gcc/4.8.4/include"
setenv CPPFLAGS "-I/opt/mpc/1.0.1/include:-I/opt/gmp/5.1.2/include:-I/opt/mpfr/3.1.2/include:-L/opt/gcc/4.8.4/lib:-I/opt/gcc/4.8.4/include"
setenv FFTW_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/fftw-3.3.5"
setenv FOAM_APPBIN "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_APP "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications"
setenv FOAM_ETC "/opt/openfoam/v1612+/OpenFOAM-v1612+/etc"
setenv FOAM_EXT_LIBBIN "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib"
setenv FOAM_INST_DIR "/opt/openfoam/v1612+"
setenv FOAM_JOB_DIR "/opt/openfoam/v1612+/jobControl"
setenv FOAM_LIBBIN "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_MPI "openmpi-1.10.4"
setenv FOAM_RUN "$home/OpenFOAM/$user-v1612+/run"
setenv FOAM_SETTINGS ""
setenv FOAM_SIGFPE ""
setenv FOAM_SITE_APPBIN "/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_SITE_LIBBIN "/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_SOLVERS "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications/solvers"
setenv FOAM_SRC "/opt/openfoam/v1612+/OpenFOAM-v1612+/src"
setenv FOAM_TUTORIALS "/opt/openfoam/v1612+/OpenFOAM-v1612+/tutorials"
setenv FOAM_USER_APPBIN "$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_USER_LIBBIN "$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_UTILITIES "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications/utilities"
setenv GMP_INCLUDE_DIR "/opt/gmp/5.1.2/include"
setenv GMP_LIBRARIES "/opt/gmp/5.1.2/lib"
setenv LIBS "-L/opt/mpc/1.0.1/lib:-L/opt/gmp/5.1.2/lib:-L/opt/mpfr/3.1.2/lib"
setenv MAKEFLAGS "-j 60"
setenv MPFR_INCLUDE_DIR "/opt/mpfr/3.1.2/include"
setenv MPFR_LIBRARIES "/opt/mpfr/3.1.2/lib"
setenv MPI_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4"
setenv MPI_BUFFER_SIZE "20000000"
setenv OPAL_PREFIX "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4"
setenv ParaView_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1"
setenv ParaView_INCLUDE_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/include/paraview-5.0"
setenv PV_PLUGIN_PATH "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/paraview-5.0"
setenv QT4_ROOT_DIR "/opt/qt/4.8.6"
setenv QT_BIN_DIR "/opt/qt/4.8.6/bin"
setenv QTDIR "/opt/qt/4.8.6"
setenv QTINC "/opt/qt/4.8.6/include"
setenv QTLIB "/opt/qt/4.8.6/lib"
setenv QT_PLUGIN_PATH "/opt/qt/4.8.6/plugins"
setenv SCOTCH_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/scotch_6.0.3"
setenv WM_ARCH "linux64"
setenv WM_ARCH_OPTION "64"
setenv WM_CC "gcc"
setenv WM_CFLAGS "-m64 -fPIC"
setenv WM_COMPILE_OPTION "Opt"
setenv WM_COMPILER "Gcc"
setenv WM_COMPILER_LIB_ARCH "64"
setenv WM_COMPILER_TYPE "system"
setenv WM_CXXFLAGS "-m64 -fPIC -std "c++0x""
setenv WM_CXX "g++"
setenv WM_DIR "/opt/openfoam/v1612+/OpenFOAM-v1612+/wmake"
setenv WM_LABEL_OPTION "Int32"
setenv WM_LABEL_SIZE "32"
setenv WM_LDFLAGS "-m64"
setenv WM_LINK_LANGUAGE "c++"
setenv WM_MPLIB "OPENMPI"
setenv WM_NCOMPPROCS "60"
setenv WM_OPTIONS "linux64GccDPInt32Opt"
setenv WM_OSTYPE "POSIX"
setenv WM_PRECISION_OPTION "DP"
setenv WM_PROJECT_DIR "/opt/openfoam/v1612+/OpenFOAM-v1612+"
setenv WM_PROJECT_INST_DIR "/opt/openfoam/v1612+"
setenv WM_PROJECT "OpenFOAM"
setenv WM_PROJECT_USER_DIR "$home/OpenFOAM/$user-v1612+"
setenv WM_PROJECT_VERSION "v1612+"
setenv WM_THIRD_PARTY_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+"

Install OpenFOAM-dev on CentOS 6.x from source

Download:

mkdir -p /opt/openfoam/dev
cd /opt/openfoam/dev

git clone git://github.com/OpenFOAM/OpenFOAM-dev.git
git clone git://github.com/OpenFOAM/ThirdParty-dev.git

Edit file OpenFOAM-dev/etc/bashrc

change FOAM_INST_DIR to
 FOAM_INST_DIR=/opt/openfoam/dev
and:
export WM_MPLIB=OPENMPI

Load modules

module load gcc/4.8.4            # installation Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x
 module load mpfr/3.1.2 
 module load gmp/5.1.2
 module load mpc/1.0.1 
 module load cmake/2.8.12.2  # installation Standalone cmake 2.8 on CentOS

Source bashrc

. ../OpenFOAM-v1612+/etc/bashrc

Compile on many cores if you have

export MAKEFLAGS='-j 60'
export WM_NCOMPPROCS=60

Now compile ThirdParty essentials

first install boost 1.48
yum install boost148 boost148-devel
I have not been able to use the compiled versions of gmp and mpfr...
 yum install gmp-devel mpfr-devel
cd  ThirdParty-dev

download openmpi 2.0.2:
 wget https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.2.tar.gz
unpack:
tar -czvf openmpi-2.0.2.tar.gz
./Allwmake

Compile ParaView

module load qt/4.8.6       # installation Standalone QT 4.8 installation on Centos
 ./makeParaView
wmRefresh
note: paraview need the path to gcc glibc: 
export LD_LIBRARY_PATH=/opt/gcc/4.8.4/lib64:$LD_LIBRARY_PATH

Compile OpenFOAM

cd ../OpenFOAM-dev
./Allwmake

Create module file

Create the file: /etc/modulefiles/openfoam/dev

put the following content in the file

/etc/modulefiles/openfoam/dev

#%Module1.0####################################################################
##
## openfoam/dev modulefile
##
## 
##
proc ModulesHelp { } {
 puts stderr "\tSet OpenFOAM-dev environment."
}

## Create a whatis file.
module-whatis "Adds OpenFOAM links, aliases and paths"

set home $env(HOME)
set user $env(USER)

set-alias app "cd \$FOAM_APP"
set-alias foam "cd \$WM_PROJECT_DIR"

set-alias foamSite "cd \$WM_PROJECT_INST_DIR/site"
set-alias lib "cd \$FOAM_LIBBIN"
set-alias run "cd \$FOAM_RUN"
set-alias sol "cd \$FOAM_SOLVERS"
set-alias src "cd \$FOAM_SRC"
set-alias tut "cd \$FOAM_TUTORIALS"
set-alias util "cd \$FOAM_UTILITIES"
set-alias wm32 "wmSet WM_ARCH_OPTION=32"
set-alias wm64 "wmSet WM_ARCH_OPTION=64"
set-alias wmDP "wmSet WM_PRECISION_OPTION=DP"
set-alias wmSchedOff "unset WM_SCHEDULER"
set-alias wmSchedOn "export WM_SCHEDULER=\$WM_PROJECT_DIR/wmake/wmakeScheduler"
set-alias wmSet ". \$WM_PROJECT_DIR/etc/bashrc"
set-alias wmSP "wmSet WM_PRECISION_OPTION=SP"
set-alias wmUnset ". \$WM_PROJECT_DIR/etc/config.sh/unset"

set-alias cc "/opt/gcc/4.8.4/bin/gcc"

prepend-path PATH "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/gperftools-svn/bin:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/ParaView-5.0.1/bin:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/openmpi-2.0.2/bin:$home/OpenFOAM/$user-dev/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/dev/site/dev/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/dev/OpenFOAM-dev/bin:/opt/openfoam/dev/OpenFOAM-dev/wmake:/opt/qt/4.8.6/bin:/opt/cmake/2.8.12.2/bin:/opt/gcc/4.8.4/bin"
prepend-path LD_LIBRARY_PATH "/opt/gcc/4.8.4/lib64:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/gperftools-svn/lib:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0:/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/openmpi-2.0.2:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64GccDPInt32/lib/openmpi-2.0.2:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/openmpi-2.0.2/lib:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/openmpi-2.0.2/lib64:$home/OpenFOAM/$user-dev/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/dev/site/dev/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/dev/ThirdParty-dev/platforms/linux64GccDPInt32/lib:/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/qt/4.8.6/lib:/opt/mpc/1.0.1/lib:/opt/gmp/5.1.2/lib:/opt/mpfr/3.1.2/lib:/opt/gcc/4.8.4/lib"
setenv CMAKE_ROOT_DIR "/opt/cmake/2.8.12.2"
setenv CPLUS_INCLUDE_PATH "/opt/mpc/1.0.1/include:/opt/gmp/5.1.2/include:/opt/mpfr/3.1.2/include:/opt/gcc/4.8.4/include"
setenv CPPFLAGS "-I/opt/mpc/1.0.1/include:-I/opt/gmp/5.1.2/include:-I/opt/mpfr/3.1.2/include:-L/opt/gcc/4.8.4/lib:-I/opt/gcc/4.8.4/include"
setenv FOAM_APPBIN "/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_APP "/opt/openfoam/dev/OpenFOAM-dev/applications"
setenv FOAM_ETC "/opt/openfoam/dev/OpenFOAM-dev/etc"
setenv FOAM_EXT_LIBBIN "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64GccDPInt32/lib"
setenv FOAM_INST_DIR "/opt/openfoam/dev"
setenv FOAM_JOB_DIR "/opt/openfoam/dev/jobControl"
setenv FOAM_LIBBIN "/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_MPI "openmpi-2.0.2"
setenv FOAM_RUN "$home/OpenFOAM/$user-dev/run"
setenv FOAM_SETTINGS ""
setenv FOAM_SIGFPE ""
setenv FOAM_SITE_APPBIN "/opt/openfoam/dev/site/dev/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_SITE_LIBBIN "/opt/openfoam/dev/site/dev/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_SOLVERS "/opt/openfoam/dev/OpenFOAM-dev/applications/solvers"
setenv FOAM_SRC "/opt/openfoam/dev/OpenFOAM-dev/src"
setenv FOAM_TUTORIALS "/opt/openfoam/dev/OpenFOAM-dev/tutorials"
setenv FOAM_USER_APPBIN "$home/OpenFOAM/$user-dev/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_USER_LIBBIN "$home/OpenFOAM/$user-dev/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_UTILITIES "/opt/openfoam/dev/OpenFOAM-dev/applications/utilities"

setenv GMP_INCLUDE_DIR "/opt/gmp/5.1.2/include"
setenv GMP_LIBRARIES "/opt/gmp/5.1.2/lib"
setenv LIBS "-L/opt/mpc/1.0.1/lib:-L/opt/gmp/5.1.2/lib:-L/opt/mpfr/3.1.2/lib"
setenv MAKEFLAGS "-j 3"
setenv MANPATH "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/openmpi-2.0.2/share/man:/opt/gcc/4.8.4/share/man:"
setenv MPFR_INCLUDE_DIR "/opt/mpfr/3.1.2/include"
setenv MPFR_LIBRARIES "/opt/mpfr/3.1.2/lib"
setenv MPI_ARCH_PATH "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/openmpi-2.0.2"
setenv MPI_BUFFER_SIZE "20000000"
setenv OPAL_PREFIX "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/openmpi-2.0.2"
setenv ParaView_DIR "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/ParaView-5.0.1"
setenv ParaView_INCLUDE_DIR "/opt/openfoam/dev/ThirdParty-dev/platforms/linux64Gcc/ParaView-5.0.1/include/paraview-5.0"
setenv ParaView_MAJOR "5.0"
setenv ParaView_VERSION "5.0.1"
setenv PV_PLUGIN_PATH "/opt/openfoam/dev/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/paraview-5.0"
setenv QT4_ROOT_DIR "/opt/qt/4.8.6"
setenv QT_BIN_DIR "/opt/qt/4.8.6/bin"
setenv QTDIR "/opt/qt/4.8.6"
setenv QTINC "/opt/qt/4.8.6/include"
setenv QTLIB "/opt/qt/4.8.6/lib"
setenv QT_PLUGIN_PATH "/opt/qt/4.8.6/plugins"
setenv WM_ARCH "linux64"
setenv WM_ARCH_OPTION "64"
setenv WM_CC "gcc"
setenv WM_CFLAGS "-m64 -fPIC"
setenv WM_COMPILE_OPTION "Opt"
setenv WM_COMPILER "Gcc"
setenv WM_COMPILER_LIB_ARCH "64"
setenv WM_COMPILER_TYPE "system"
setenv WM_CXXFLAGS "-m64 -fPIC -std \"c++0x\""
setenv WM_CXX "g++"
setenv WM_DIR "/opt/openfoam/dev/OpenFOAM-dev/wmake"
setenv WM_LABEL_OPTION "Int32"
setenv WM_LABEL_SIZE "32"
setenv WM_LDFLAGS "-m64"
setenv WM_LINK_LANGUAGE "c++"
setenv WM_MPLIB "OPENMPI"
setenv WM_OPTIONS "linux64GccDPInt32Opt"
setenv WM_OSTYPE "POSIX"
setenv WM_PRECISION_OPTION "DP"
setenv WM_PROJECT_DIR "/opt/openfoam/dev/OpenFOAM-dev"
setenv WM_PROJECT_INST_DIR "/opt/openfoam/dev"
setenv WM_PROJECT "OpenFOAM"
setenv WM_PROJECT_USER_DIR "$home/OpenFOAM/$user-dev"
setenv WM_PROJECT_VERSION "dev"
setenv WM_THIRD_PARTY_DIR "/opt/openfoam/dev/ThirdParty-dev"

Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x

Install gmp 5.1.2

wget https://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
 tar -xjvf gmp-5.1.2.tar.bz2
 cd gmp-5.1.2
 ./configure --exec-prefix=/opt/gmp/5.1.2 --datarootdir=/opt/gmp/5.1.2/share --datadir=/opt/gmp/5.1.2/share --infodir=/opt/gmp/5.1.2/share/info --includedir=/opt/gmp/5.1.2/include --oldincludedir=/opt/gmp/5.1.2/include --prefix=/opt/gmp/5.1.2
 make
 make install

Module file: /etc/modulefiles/gmp/5.1.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/gmp/5.1.2/bin
prepend-path LD_LIBRARY_PATH /opt/gmp/5.1.2/lib
prepend-path CPLUS_INCLUDE_PATH /opt/gmp/5.1.2/include
prepend-path CPPFLAGS -I/opt/gmp/5.1.2/include
prepend-path LIBS -L/opt/gmp/5.1.2/lib
prepend-path GMP_LIBRARIES /opt/gmp/5.1.2/lib
prepend-path GMP_INCLUDE_DIR /opt/gmp/5.1.2/include
pre

Install mpfr 3.1.2

wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.gz
tar -xzvf mpfr-3.1.2.tar.gz
cd mpfr-3.1.2
./configure --exec-prefix=/opt/mpfr/3.1.2 --datarootdir=/opt/mpfr/3.1.2/share --datadir=/opt/mpfr/3.1.2/share --infodir=/opt/mpfr/3.1.2/share/info --includedir=/opt/mpfr/3.1.2/include --oldincludedir=/opt/mpfr/3.1.2/include
make
make install

Module file: /etc/modulefiles/mpfr/3.1.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##


## Add directory to the path
#prepend-path PATH /opt/mpfr/3.1.2/bin
prepend-path LD_LIBRARY_PATH /opt/mpfr/3.1.2/lib
prepend-path CPLUS_INCLUDE_PATH /opt/mpfr/3.1.2/include
prepend-path CPPFLAGS -I/opt/mpfr/3.1.2/include
prepend-path LIBS -L/opt/mpfr/3.1.2/lib
prepend-path MPFR_LIBRARIES /opt/mpfr/3.1.2/lib
prepend-path MPFR_INCLUDE_DIR /opt/mpfr/3.1.2/include
prepend-path LD_RUN_PATH /opt/mpfr/3.1.2/lib

Install mpc 1.0.1

wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz
tar -xzvf mpc-1.0.1.tar.gz
cd mpc-1.0.1
./configure --exec-prefix=/opt/mpc/1.0.1 --datarootdir=/opt/mpc/1.0.1/share --datadir=/opt/mpc/1.0.1/share --infodir=/opt/mpc/1.0.1/share/info --includedir=/opt/mpc/1.0.1/include --oldincludedir=/opt/mpc/1.0.1/include --with-gmp=/opt/gmp/5.1.2/ --with-mpfr=/opt/mpfr/3.1.2/
make
make install

Module file: /etc/modulefiles/mpc/1.0.1

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

## Add directory to the path
#prepend-path PATH /opt/mpc/1.0.1/bin
prepend-path LD_LIBRARY_PATH /opt/mpc/1.0.1/lib
prepend-path CPLUS_INCLUDE_PATH /opt/mpc/1.0.1/include
prepend-path CPPFLAGS -I/opt/mpc/1.0.1/include
prepend-path LIBS -L/opt/mpc/1.0.1/lib

Install isl 0.11.1

wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/isl-0.11.1.tar.bz2
tar -xjvf isl-0.11.1.tar.bz2
cd isl-0.11.1
./configure --exec-prefix=/opt/isl/0.11.1 --datarootdir=/opt/isl/0.11.1/share --datadir=/opt/isl/0.11.1/share --infodir=/opt/isl/0.11.1/share/info --includedir=/opt/isl/0.11.1/include --oldincludedir=/opt/isl/0.11.1/include --with-gmp-prefix=/opt/gmp/5.1.2/ 
make make install

Module file: /etc/modulefiles/isl/0.11.1

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/isl/0.11.1/bin
prepend-path LD_LIBRARY_PATH /opt/isl/0.11.1/lib
prepend-path CPLUS_INCLUDE_PATH /opt/isl/0.11.1/include
prepend-path CPPFLAGS -I/opt/isl/0.11.1/include
prepend-path LIBS -L/opt/isl/0.11.1/lib
prepend-path LD_RUN_PATH /opt/isl/0.11.1/lib

Install cloog 0.18.0

wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/cloog-0.18.0.tar.gz
tar -xzvf cloog-0.18.0.tar.gz
cd cloog-0.18.0
./configure --exec-prefix=/opt/cloog/0.18.0 --datarootdir=/opt/cloog/0.18.0/share --datadir=/opt/cloog/0.18.0/share --infodir=/opt/cloog/0.18.0/share/info --includedir=/opt/cloog/0.18.0/include --oldincludedir=/opt/cloog/0.18.0/include --with-gmp-prefix=/opt/gmp/5.1.2/
makemake install

Module file: /etc/modulefiles/cloog/0.18.0

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/cloog/0.18.0/bin
prepend-path LD_LIBRARY_PATH /opt/cloog/0.18.0/lib
prepend-path CPLUS_INCLUDE_PATH /opt/cloog/0.18.0/include
prepend-path CPPFLAGS -I/opt/cloog/0.18.0/include
prepend-path LIBS -L/opt/cloog/0.18.0/lib
prepend-path LD_RUN_PATH /opt/cloog/0.18.0/lib

Install gcc 4.8.4

I had to install 32 bit glibc-devel:
 yum install glibc-devel.i686

module load gmp/5.1.2
module load mpfr/3.1.2 
module load mpc/1.0.1 
module load isl/0.11.1
module load cloog/0.18.0
wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2
tar -xjvf gcc-4.8.4.tar.bz2
cd gcc-4.8.4
./configure --prefix=/opt/gcc/4.8.4 --exec-prefix=/opt/gcc/4.8.4 --datarootdir=/opt/gcc/4.8.4/share --datadir=/opt/gcc/4.8.4/share --infodir=/opt/gcc/4.8.4/share/info --includedir=/opt/gcc/4.8.4/include --oldincludedir=/opt/gcc/4.8.4/include --with-gmp=/opt/gmp/5.1.2/ --with-mpfr=/opt/mpfr/3.1.2/ --with-mpc=/opt/mpc/1.0.1/ --with-isl=/opt/isl/0.11.1/ --with-cloog=/opt/cloog/0.18.0/ --disable-isl-version-check
 make 
make install

Module file: /etc/modulefiles/gcc/4.8.4

#%Module1.0####################################################################
##
## gcc modulefile
##
## 
##

prepend-path PATH /opt/gcc/4.8.4/bin
#prepend-path PATH /opt/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/
set-alias "cc" "/opt/gcc/4.8.4/bin/gcc"
prepend-path LD_LIBRARY_PATH /opt/gcc/4.8.4/lib/../lib64 
prepend-path LD_RUN_PATH /opt/gcc/4.8.4/lib/../lib64 
#prepend-path LIBS -I/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include
prepend-path MANPATH /opt/gcc/4.8.4/share/man

prepend-path CPLUS_INCLUDE_PATH /opt/gcc/4.8.4/include
#prepend-path CPLUS_INCLUDE_PATH /opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include/ssp
prepend-path CPPFLAGS -I/opt/gcc/4.8.4/include
prepend-path CPPFLAGS -L/opt/gcc/4.8.4/lib
#prepend-path LIBS -L/opt/gcc/4.8.4/lib64
#prepend-path LIBS -L/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path LIBS -B/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path LIBS -L/opt/gcc/4.8.4/lib/
#prepend-path LIBS -B/opt/gcc/4.8.4/lib/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/libexec/gcc/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/lib/gcc/

Install OpenFOAM v1612+ on CentOS 6.x from source

Download:

mkdir -p /opt/openfoam/v1612+
cd /opt/openfoam/v1612+

wget https://sourceforge.net/projects/openfoamplus/files/v1612+/OpenFOAM-v1612+.tgz
wget https://sourceforge.net/projects/openfoamplus/files/v1612+/ThirdParty-v1612+.tgz

Unpack:

tar -xzvf OpenFOAM-v1612+.tgz ;tar -xzvf ThirdParty-v1612+.tgz

Edit file OpenFOAM-v1612+/etc/bashrc

change FOAM_INST_DIR to
 FOAM_INST_DIR=/opt/openfoam/v1612+
and:
export WM_MPLIB=OPENMPI

Load modules

module load gcc/4.8.4            # installation Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x
 module load mpfr/3.1.2 
 module load gmp/5.1.2
 module load mpc/1.0.1 
 module load cmake/2.8.12.2  # installation Standalone cmake 2.8 on CentOS

Source bashrc

. ../OpenFOAM-v1612+/etc/bashrc

Compile on many cores if you have

export MAKEFLAGS='-j 60'
export WM_NCOMPPROCS=60

Now compile ThirdParty essentials

first install boost 1.48
yum install boost148 boost148-devel
I have not been able to use the compiled versions of gmp and mpfr...
 yum install gmp-devel mpfr-devel
cd  ThirdParty-v1612+
./Allwmake

Compile ParaView

module load qt/4.8.6       # installation Standalone QT 4.8 installation on Centos
 ./makeParaView
note: paraview need the path to gcc glibc: 
export LD_LIBRARY_PATH=/opt/gcc/4.8.4/lib64:$LD_LIBRARY_PATH

Compile ADIOS parallell IO

wget http://users.nccs.gov/~pnorbert/adios-1.11.0.tar.gz
 tar -xzvf adios-1.11.0.tar.gz
 mv adios-1.11.0 ADIOS-1.11.0
 ./makeADIOS

Compile ccmio

 wget http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
tar -xzvf libccmio-2.6.1.tar.gz
./makeCCMIO

Compile OpenFOAM

cd ../OpenFOAM-v1612+
./Allwmake

Create module file

Create the file: /etc/modulefiles/openfoam/v1612+

put the following content in the file

/etc/modulefiles/openfoam/v1612+

#%Module1.0####################################################################
##
## openfoam/v1612+ modulefile
##
## 
##
proc ModulesHelp { } {
 puts stderr "\tSet OpenFOAM v1612+ environment."
}

## Create a whatis file.
module-whatis "Adds OpenFOAM links, aliases and paths"

set home $env(HOME)
set user $env(USER)


set-alias app "cd \$FOAM_APP"
#set-alias foam3rdParty "cd \$WM_THIRD_PARTY_DIR"
#set-alias foamApps "cd \$FOAM_APP"
set-alias foam "cd \$WM_PROJECT_DIR"
set-alias foamfv "cd \$FOAM_SRC/finiteVolume"
set-alias foamSite "cd \$WM_PROJECT_INST_DIR/site"
set-alias foamSol "cd \$FOAM_SOLVERS"
set-alias foamsrc "cd \$FOAM_SRC/\$WM_PROJECT"
set-alias foamTuts "cd \$FOAM_TUTORIALS"
set-alias foamUtils "cd \$FOAM_UTILITIES"
set-alias lib "cd \$FOAM_LIBBIN"
set-alias run "cd \$FOAM_RUN"
set-alias sol "cd \$FOAM_SOLVERS"
set-alias src "cd \$FOAM_SRC"
set-alias tut "cd \$FOAM_TUTORIALS"
set-alias util "cd \$FOAM_UTILITIES"
#set-alias wm32 "wmSET WM_ARCH_OPTION \"32\""
#set-alias wm64 "wmSET WM_ARCH_OPTION \"64\""
set-alias wmDP "wmSET WM_PRECISION_OPTION \"DP\""
set-alias wmREFRESH "wmSET \$FOAM_SETTINGS"
set-alias wmSchedOFF "unset WM_SCHEDULER"
set-alias wmSchedON "export WM_SCHEDULER \$WM_PROJECT_DIR/wmake/wmakeScheduler"
set-alias wmSET ". \$WM_PROJECT_DIR/etc/bashrc"
set-alias wmSP "wmSET WM_PRECISION_OPTION \"SP\""
set-alias wmUNSET ". \$WM_PROJECT_DIR/etc/config.sh/unset"

set-alias cc "/opt/gcc/4.8.4/bin/gcc"
set-alias wmInt32 "wmSet WM_LABEL_SIZE \"32\""
set-alias wmInt64 "wmSet WM_LABEL_SIZE \"64\""

prepend-path PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/gperftools-2.5/bin:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/bin:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/bin:$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/bin:/opt/openfoam/v1612+/OpenFOAM-v1612+/wmake:/opt/qt/4.8.6/bin:/opt/cmake/2.8.12.2/bin:/opt/gcc/4.8.4/bin"
prepend-path LD_LIBRARY_PATH "/opt/gcc/4.8.4/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/fftw-3.3.5/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/CGAL-4.9/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/boost_1_62_0/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/gperftools-2.5/lib64:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/openmpi-1.10.4:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib/openmpi-1.10.4:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/lib64:$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib:/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/qt/4.8.6/lib:/opt/mpc/1.0.1/lib:/opt/gmp/5.1.2/lib:/opt/mpfr/3.1.2/lib:/opt/gcc/4.8.4/lib"
prepend-path MANPATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4/share/man:/opt/gcc/4.8.4/share/man:"

setenv BOOST_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/boost_1_62_0"
setenv CGAL_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/CGAL-4.9"
setenv CMAKE_ROOT_DIR "/opt/cmake/2.8.12.2"
setenv CPLUS_INCLUDE_PATH "/opt/mpc/1.0.1/include:/opt/gmp/5.1.2/include:/opt/mpfr/3.1.2/include:/opt/gcc/4.8.4/include"
setenv CPPFLAGS "-I/opt/mpc/1.0.1/include:-I/opt/gmp/5.1.2/include:-I/opt/mpfr/3.1.2/include:-L/opt/gcc/4.8.4/lib:-I/opt/gcc/4.8.4/include"
setenv FFTW_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/fftw-3.3.5"
setenv FOAM_APPBIN "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_APP "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications"
setenv FOAM_ETC "/opt/openfoam/v1612+/OpenFOAM-v1612+/etc"
setenv FOAM_EXT_LIBBIN "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/lib"
setenv FOAM_INST_DIR "/opt/openfoam/v1612+"
setenv FOAM_JOB_DIR "/opt/openfoam/v1612+/jobControl"
setenv FOAM_LIBBIN "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_MPI "openmpi-1.10.4"
setenv FOAM_RUN "$home/OpenFOAM/$user-v1612+/run"
setenv FOAM_SETTINGS ""
setenv FOAM_SIGFPE ""
setenv FOAM_SITE_APPBIN "/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_SITE_LIBBIN "/opt/openfoam/v1612+/site/v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_SOLVERS "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications/solvers"
setenv FOAM_SRC "/opt/openfoam/v1612+/OpenFOAM-v1612+/src"
setenv FOAM_TUTORIALS "/opt/openfoam/v1612+/OpenFOAM-v1612+/tutorials"
setenv FOAM_USER_APPBIN "$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/bin"
setenv FOAM_USER_LIBBIN "$home/OpenFOAM/$user-v1612+/platforms/linux64GccDPInt32Opt/lib"
setenv FOAM_UTILITIES "/opt/openfoam/v1612+/OpenFOAM-v1612+/applications/utilities"
setenv GMP_INCLUDE_DIR "/opt/gmp/5.1.2/include"
setenv GMP_LIBRARIES "/opt/gmp/5.1.2/lib"
setenv LIBS "-L/opt/mpc/1.0.1/lib:-L/opt/gmp/5.1.2/lib:-L/opt/mpfr/3.1.2/lib"
setenv MAKEFLAGS "-j 60"
setenv MPFR_INCLUDE_DIR "/opt/mpfr/3.1.2/include"
setenv MPFR_LIBRARIES "/opt/mpfr/3.1.2/lib"
setenv MPI_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4"
setenv MPI_BUFFER_SIZE "20000000"
setenv OPAL_PREFIX "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/openmpi-1.10.4"
setenv ParaView_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1"
setenv ParaView_INCLUDE_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64Gcc/ParaView-5.0.1/include/paraview-5.0"
setenv PV_PLUGIN_PATH "/opt/openfoam/v1612+/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/paraview-5.0"
setenv QT4_ROOT_DIR "/opt/qt/4.8.6"
setenv QT_BIN_DIR "/opt/qt/4.8.6/bin"
setenv QTDIR "/opt/qt/4.8.6"
setenv QTINC "/opt/qt/4.8.6/include"
setenv QTLIB "/opt/qt/4.8.6/lib"
setenv QT_PLUGIN_PATH "/opt/qt/4.8.6/plugins"
setenv SCOTCH_ARCH_PATH "/opt/openfoam/v1612+/ThirdParty-v1612+/platforms/linux64GccDPInt32/scotch_6.0.3"
setenv WM_ARCH "linux64"
setenv WM_ARCH_OPTION "64"
setenv WM_CC "gcc"
setenv WM_CFLAGS "-m64 -fPIC"
setenv WM_COMPILE_OPTION "Opt"
setenv WM_COMPILER "Gcc"
setenv WM_COMPILER_LIB_ARCH "64"
setenv WM_COMPILER_TYPE "system"
setenv WM_CXXFLAGS "-m64 -fPIC -std \"c++0x\""
setenv WM_CXX "g++"
setenv WM_DIR "/opt/openfoam/v1612+/OpenFOAM-v1612+/wmake"
setenv WM_LABEL_OPTION "Int32"
setenv WM_LABEL_SIZE "32"
setenv WM_LDFLAGS "-m64"
setenv WM_LINK_LANGUAGE "c++"
setenv WM_MPLIB "OPENMPI"
setenv WM_NCOMPPROCS "60"
setenv WM_OPTIONS "linux64GccDPInt32Opt"
setenv WM_OSTYPE "POSIX"
setenv WM_PRECISION_OPTION "DP"
setenv WM_PROJECT_DIR "/opt/openfoam/v1612+/OpenFOAM-v1612+"
setenv WM_PROJECT_INST_DIR "/opt/openfoam/v1612+"
setenv WM_PROJECT "OpenFOAM"
setenv WM_PROJECT_USER_DIR "$home/OpenFOAM/$user-v1612+"
setenv WM_PROJECT_VERSION "v1612+"
setenv WM_THIRD_PARTY_DIR "/opt/openfoam/v1612+/ThirdParty-v1612+"

Build OpenFOAM 3.0.0 on CentOS 6.6

Download from http://www.openfoam.org/download/source.php:

OpenFOAM-3.0.0.tgz and ThirdParty-3.0.0.tgz
create directory /opt/openfoam/3.0.0/ and unpack

In /opt/openfoam/3.0.0/OpenFOAM-3.0.0/etc/bashrc

foamInstall=/opt/openfoam/$WM_PROJECT_VERSION
and
foamCompiler=ThirdParty
export WM_MPLIB=OPENMPI
wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.8.4/gcc-4.8.4.tar.bz2
tar -xjvf gcc-4.8.4.tar.bz2
cd /opt/openfoam/3.0.0/ThirdParty-3.0.0
module load gmp/5.1.2
module load mpfr/3.1.2
module load mpc/1.0.1
export GMP_ARCH_PATH=/opt/gmp/5.1.2
export MPFR_ARCH_PATH=/opt/mpfr/3.1.2
export MPC_ARCH_PATH=/opt/mpc/1.0.1

uncomment the ARCH_PATH’s in makeGcc file

#GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
#MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
#MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
./makeGcc gcc-4.8.4

Change in /opt/openfoam/3.0.0/OpenFOAM-3.0.0/etc/config/settings.sh

from

gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version

to

gmpDir=/opt/gmp/5.1.2
mpfrDir=/opt/mpfr/3.1.2
mpcDir=/opt/mpc/1.0.1

now source bashrc again

. /opt/openfoam/3.0.0/OpenFOAM-3.0.0/etc/bashrc

check which compiler

which gcc
/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64/gcc-4.8.4/bin/gcc

in makeCGAL uncomment
#GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
#MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE

module load mpc/1.0.1
module load mpfr/3.1.2
module load boost/1.49.0
module load cmake/2.8.12.2
module load gmp/5.1.2

./Allwmake

. /opt/openfoam/3.0.0/OpenFOAM-3.0.0/etc/bashrc
./makeParaView4 -mpi -python

module list
Currently Loaded Modulefiles:
1) mpc/1.0.1 3) boost/1.49.0 5) gmp/5.1.2
2) mpfr/3.1.2 4) cmake/2.8.12.2 6) qt/4.8.6

in file /opt/openfoam/3.0.0/OpenFOAM-3.0.0/etc/config/CGAL.sh

#export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
export BOOST_ARCH_PATH=/opt/boost/1.49.0/stage

cd /opt/openfoam/3.0.0/OpenFOAM-3.0.0
./Allwmake

 

cd ../ThirdParty-3.0.0
wmake http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
tar -xzvf libccmio-2.6.1.tar.gz
cd libccmio-2.6.1
make
#copy generated files to LIBBIN
echo $FOAM_LIBBIN
cp ./lib/linux64_2.4-x86-glibc_2.2.5/debug-shared/* /opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib

#%Module1.0####################################################################
##
##  openfoam/3.0.0 modulefile
##
##  
##
proc ModulesHelp { } {
        puts stderr "\tSet OpenFOAM 3.0.0 environment."
}

## Create a whatis file.
module-whatis   "Adds OpenFOAM links, aliases and paths"

set home $env(HOME)
set user $env(USER)

set-alias app "cd \$FOAM_APP"
set-alias foam3rdParty "cd \$WM_THIRD_PARTY_DIR"
set-alias foamApps "cd \$FOAM_APP"
set-alias foam "cd \$WM_PROJECT_DIR"
set-alias foamfv "cd \$FOAM_SRC/finiteVolume"
set-alias foamSite "cd \$WM_PROJECT_INST_DIR/site"
set-alias foamSol "cd \$FOAM_SOLVERS"
set-alias foamsrc "cd \$FOAM_SRC/\$WM_PROJECT"
set-alias foamTuts "cd \$FOAM_TUTORIALS"
set-alias foamUtils "cd \$FOAM_UTILITIES"
set-alias lib "cd \$FOAM_LIBBIN"
set-alias run "cd \$FOAM_RUN"
set-alias sol "cd \$FOAM_SOLVERS"
set-alias src "cd \$FOAM_SRC"
set-alias tut "cd \$FOAM_TUTORIALS"
set-alias util "cd \$FOAM_UTILITIES"
set-alias wm32 "wmSET WM_ARCH_OPTION \"32\""
set-alias wm64 "wmSET WM_ARCH_OPTION \"64\""
set-alias wmDP "wmSET WM_PRECISION_OPTION \"DP\""
set-alias wmREFRESH "wmSET \$FOAM_SETTINGS"
set-alias wmSchedOFF "unset WM_SCHEDULER"
set-alias wmSchedON "export WM_SCHEDULER \"\$WM_PROJECT_DIR/wmake/wmakeScheduler\""
set-alias wmSET ". \$WM_PROJECT_DIR/etc/bashrc"
set-alias wmSP "wmSET WM_PRECISION_OPTION \"SP\""
set-alias wmUNSET ". \$WM_PROJECT_DIR/etc/config/unset.sh"

prepend-path  PATH "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/gperftools-svn/bin:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/ParaView-4.4.0/bin:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/openmpi-1.10.0/bin:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64/gcc-4.8.4/bin:$home/OpenFOAM/$user-3.0.0/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/3.0.0/site/3.0.0/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam/3.0.0/OpenFOAM-3.0.0/bin:/opt/openfoam/3.0.0/OpenFOAM-3.0.0/wmake:/opt/qt/4.8.6/bin:/opt/cmake/2.8.12.2/bin"
prepend-path  LD_LIBRARY_PATH "/opt/boost/1.49.0/stage//lib:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/CGAL-4.7/lib:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/gperftools-svn/lib:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/ParaView-4.4.0/lib/paraview-4.4:/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib/openmpi-1.10.0:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64GccDPInt32Opt/lib/openmpi-1.10.0:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/openmpi-1.10.0/lib:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/openmpi-1.10.0/lib64:/opt/mpc/1.0.1/lib:/opt/mpfr/3.1.2/lib:/opt/gmp/5.1.2/lib:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64/gcc-4.8.4/lib64:$home/OpenFOAM/$user-3.0.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/3.0.0/site/3.0.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/boost/1.49.0/stage/lib//lib:/opt/qt/4.8.6/lib:/opt/boost/1.49.0/stage/lib"

setenv  BOOST_ARCH_PATH "/opt/boost/1.49.0/stage/"
setenv  CGAL_ARCH_PATH "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/CGAL-4.7"
setenv  CMAKE_ROOT_DIR "/opt/cmake/2.8.12.2"
setenv  CPLUS_INCLUDE_PATH "/opt/gmp/5.1.2/include:/opt/mpfr/3.1.2/include:/opt/mpc/1.0.1/include"
setenv  CPPFLAGS "-I/opt/gmp/5.1.2/include:-I/opt/mpfr/3.1.2/include:-I/opt/mpc/1.0.1/include"
setenv  FOAM_APPBIN "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/bin"
setenv  FOAM_APP "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/applications"
setenv  FOAM_ETC "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/etc"
setenv  FOAM_EXT_LIBBIN "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64GccDPInt32Opt/lib"
setenv  FOAM_INST_DIR "/opt/openfoam/3.0.0"
setenv  FOAM_JOB_DIR "/opt/openfoam/3.0.0/jobControl"
setenv  FOAM_LIBBIN "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib"
setenv  FOAM_MPI "openmpi-1.10.0"
setenv  FOAM_RUN "$home/OpenFOAM/$user-3.0.0/run"
setenv  FOAM_SETTINGS ""
setenv  FOAM_SIGFPE ""
setenv  FOAM_SITE_APPBIN "/opt/openfoam/3.0.0/site/3.0.0/platforms/linux64GccDPInt32Opt/bin"
setenv  FOAM_SITE_LIBBIN "/opt/openfoam/3.0.0/site/3.0.0/platforms/linux64GccDPInt32Opt/lib"
setenv  FOAM_SOLVERS "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/applications/solvers"
setenv  FOAM_SRC "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/src"
setenv  FOAM_TUTORIALS "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/tutorials"
setenv  FOAM_USER_APPBIN "$home/OpenFOAM/$user-3.0.0/platforms/linux64GccDPInt32Opt/bin"
setenv  FOAM_USER_LIBBIN "$home/OpenFOAM/$user-3.0.0/platforms/linux64GccDPInt32Opt/lib"
setenv  FOAM_UTILITIES "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/applications/utilities"
setenv  GMP_ARCH_PATH "/opt/gmp/5.1.2"
setenv  GMP_INCLUDE_DIR "/opt/gmp/5.1.2/include"
setenv  GMP_LIBRARIES "/opt/gmp/5.1.2/lib"
setenv  LIBS "-L/opt/gmp/5.1.2/lib:-L/opt/mpfr/3.1.2/lib:-L/opt/mpc/1.0.1/lib"
setenv  _LMFILES_ "/etc/modulefiles/mpc/1.0.1:/etc/modulefiles/mpfr/3.1.2:/etc/modulefiles/boost/1.49.0:/etc/modulefiles/cmake/2.8.12.2:/etc/modulefiles/gmp/5.1.2:/etc/modulefiles/qt/4.8.6"
setenv  MANPATH "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/openmpi-1.10.0/share/man:/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64/gcc-4.8.4/man:"
setenv  MPC_ARCH_PATH "/opt/mpc/1.0.1"
setenv  MPFR_ARCH_PATH "/opt/mpfr/3.1.2"
setenv  MPFR_INCLUDE_DIR "/opt/mpfr/3.1.2/include"
setenv  MPFR_LIBRARIES "/opt/mpfr/3.1.2/lib"
setenv  MPI_ARCH_PATH "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/openmpi-1.10.0"
setenv  MPI_BUFFER_SIZE "20000000"
setenv  OPAL_PREFIX "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/openmpi-1.10.0"
setenv  ParaView_DIR "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/ParaView-4.4.0"
setenv  ParaView_INCLUDE_DIR "/opt/openfoam/3.0.0/ThirdParty-3.0.0/platforms/linux64Gcc/ParaView-4.4.0/include/paraview-4.4"
setenv  ParaView_MAJOR "4.4"
setenv  ParaView_VERSION "4.4.0"
setenv  PV_PLUGIN_PATH "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib/paraview-4.4"
setenv  PYTHON_LIBRARY "/opt/python/2.7.6/"
setenv  QT4_ROOT_DIR "/opt/qt/4.8.6"
setenv  QT_BIN_DIR "/opt/qt/4.8.6/bin"
setenv  QTDIR "/opt/qt/4.8.6"
setenv  QTINC "/opt/qt/4.8.6/include"
setenv  QTLIB "/opt/qt/4.8.6/lib"
setenv  QT_PLUGIN_PATH "/opt/qt/4.8.6/plugins"
setenv  WM_ARCH "linux64"
setenv  WM_ARCH_OPTION "64"
setenv  WM_CC "gcc"
setenv  WM_CFLAGS "-m64 -fPIC"
setenv  WM_COMPILE_OPTION "Opt"
setenv  WM_COMPILER "Gcc"
setenv  WM_COMPILER_LIB_ARCH "64"
setenv  WM_CXXFLAGS "-m64 -fPIC"
setenv  WM_CXX "g++"
setenv  WM_DIR "/opt/openfoam/3.0.0/OpenFOAM-3.0.0/wmake"
setenv  WM_LABEL_OPTION "Int32"
setenv  WM_LABEL_SIZE "32"
setenv  WM_LDFLAGS "-m64"
setenv  WM_LINK_LANGUAGE "c++"
setenv  WM_MPLIB "OPENMPI"
setenv  WM_OPTIONS "linux64GccDPInt32Opt"
setenv  WM_OSTYPE "POSIX"
setenv  WM_PRECISION_OPTION "DP"
setenv  WM_PROJECT_DIR "/opt/openfoam/3.0.0/OpenFOAM-3.0.0"
setenv  WM_PROJECT_INST_DIR "/opt/openfoam/3.0.0"
setenv  WM_PROJECT "OpenFOAM"
setenv  WM_PROJECT_USER_DIR "$home/OpenFOAM/$user-3.0.0"
setenv  WM_PROJECT_VERSION "3.0.0"
setenv  WM_THIRD_PARTY_DIR "/opt/openfoam/3.0.0/ThirdParty-3.0.0"

install cfMesh

wget http://sourceforge.net/projects/cfmesh/files/v1.1.1/cfMesh-v1.1.1.tgz/download
mv download cfMesh-v1.1.1.tgz
tar -xzvf cfMesh-v1.1.1.tgz
cd cfMesh-v1.1.1
find . -name files -exec sed -i ’s/_USER//’ {} +
module load openfoam/3.0.0
./Allwmake

Install Octave 4.0.0 on CentOS 6.6

Download from: ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz

tar -xzvf octave-4.0.0.tar.gz
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64
./configure --exec-prefix=/opt/octave/4.0.0 --datarootdir=/opt/octave/4.0.0/share --datadir=/opt/octave/4.0.0/share --infodir=/opt/octave/4.0.0/share/info --includedir=/opt/octave/4.0.0/include --oldincludedir=/opt/octave/4.0.0/include
make -j64 # if you want to compile on 64 cores...
make install

Create module file /etc/modulefiles/octave/4.0.0:

#%Module1.0####################################################################
##
## octave modulefile
##
##
##
prepend-path PATH /opt/octave/4.0.0/bin
prepend-path LD_LIBRARY_PATH /opt/octave/4.0.0/lib
prepend-path MANPATH /opt/octave/4.0.0/share/man

 

install OpenFOAM 2.4.0 on CentOS 6.6

First install boost, qt and cmake

Get it:

mkdir -p /opt/openfoam/2.4.0
cd /opt/openfoam/2.4.0
wget http://downloads.sourceforge.net/foam/OpenFOAM-2.4.0.tgz?use_mirror=mesh
wget http://downloads.sourceforge.net/foam/ThirdParty-2.4.0.tgz?use_mirror=mesh
mv OpenFOAM-2.4.0.tgz\?use_mirror\=mesh OpenFOAM-2.4.0.tgz
mv ThirdParty-2.4.0.tgz\?use_mirror\=mesh ThirdParty-2.4.0.tgz
tar -xzvf OpenFOAM-2.4.0.tgz
tar -xzvf ThirdParty-2.4.0.tgz

Prepare:

yum install qtwebkit qtwebkit-devel  #from epel
module load boost/1.49.0    #installation
module load qt/4.8.6        #installation
module load openmpi-x86_64  #from openmpi-1.8.1-1.el6.x86_64
module load cmake/2.8.12.2  #installation

In OpenFOAM-2.4.0/etc/bashrc

foamInstall=/opt/openfoam/$WM_PROJECT_VERSION
#and
foamCompiler=ThirdParty

In OpenFOAM-2.4.0/etc/config/settings.sh

gcc_version=gcc-4.8.4  #from gcc-4.8.2

Source it:

. OpenFOAM-2.4.0/etc/bashrc

Compile on all cores:

export MAKEFLAGS='-j 60'
export WM_NCOMPPROCS=60

Compile gcc:

cd ThirdParty-2.4.0
wget ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
tar -xjvf gmp-5.1.2.tar.bz2
wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2
tar -xjvf mpfr-3.1.2.tar.bz2
wget http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz
tar -xzvf mpc-1.0.1.tar.gz
wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.8.4/gcc-4.8.4.tar.bz2
tar -xjvf gcc-4.8.4.tar.bz2

edit makeGcc:

gccPACKAGE=gcc-4.8.4
./makeGcc

Control if gcc works after sourcing baschrc again ”. ../OpenFOAM-2.4.0/etc/bashrc”

which gcc
output:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/gcc-4.8.4/bin/gcc

Continue in ThirdParty:

./Allwmake
 ./makeParaView4

Time to compile OpenFOAM 2.4.0!!!

cd ../OpenFOAM-2.4.0
 ./Allwmake > build.log|tail -f build.log

The module file: /etc/modulefiles/openfoam/2.4.0

 

#%Module1.0####################################################################
##
## openfoam/2.4.0 modulefile
##
## 
##
proc ModulesHelp { } {
 puts stderr "\tSet OpenFOAM 2.4.0 environment."
}

## Create a whatis file.
module-whatis "Adds OpenFOAM links, aliases and paths"

set home $env(HOME)
set user $env(USER)

set-alias app "cd \$FOAM_APP"
set-alias foam3rdParty "cd \$WM_THIRD_PARTY_DIR"
set-alias foamApps "cd \$FOAM_APP"
set-alias foam "cd \$WM_PROJECT_DIR"
set-alias foamfv "cd \$FOAM_SRC/finiteVolume"
set-alias foamSite "cd \$WM_PROJECT_INST_DIR/site"
set-alias foamSol "cd \$FOAM_SOLVERS"
set-alias foamsrc "cd \$FOAM_SRC/\$WM_PROJECT"
set-alias foamTuts "cd \$FOAM_TUTORIALS"
set-alias foamUtils "cd \$FOAM_UTILITIES"
set-alias lib "cd \$FOAM_LIBBIN"
set-alias run "cd \$FOAM_RUN"
set-alias sol "cd \$FOAM_SOLVERS"
set-alias src "cd \$FOAM_SRC"
set-alias tut "cd \$FOAM_TUTORIALS"
set-alias util "cd \$FOAM_UTILITIES"
set-alias wm32 "wmSET WM_ARCH_OPTION=32"
set-alias wm64 "wmSET WM_ARCH_OPTION=64"
set-alias wmDP "wmSET WM_PRECISION_OPTION=DP"
set-alias wmREFRESH "wmSET \$FOAM_SETTINGS"
set-alias wmSchedOFF "unset WM_SCHEDULER"
set-alias wmSchedON "export WM_SCHEDULER=\$WM_PROJECT_DIR/wmake/wmakeScheduler"
set-alias wmSET ". \$WM_PROJECT_DIR/etc/bashrc"
set-alias wmSP "wmSET WM_PRECISION_OPTION=SP"
set-alias wmUNSET ". \$WM_PROJECT_DIR/etc/config/unset.sh"
prepend-path PATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/gperftools-svn/bin:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/ParaView-4.1.0/bin:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/gcc-4.8.4/bin:$home/OpenFOAM/$user-2.4.0/platforms/linux64GccDPOpt/bin:/opt/openfoam/2.4.0/site/2.4.0/platforms/linux64GccDPOpt/bin:/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin:/opt/openfoam/2.4.0/OpenFOAM-2.4.0/bin:/opt/openfoam/2.4.0/OpenFOAM-2.4.0/wmake:/usr/lib64/openmpi/bin"
prepend-path LD_LIBRARY_PATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/gperftools-svn/lib:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1:/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/openmpi-system:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64GccDPOpt/lib/openmpi-system:/usr/lib64/openmpi/lib:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/mpc-1.0.1/lib:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/mpfr-3.1.2/lib:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/gmp-5.1.2/lib:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/gcc-4.8.4/lib64:$home/OpenFOAM/$user-2.4.0/platforms/linux64GccDPOpt/lib:/opt/openfoam/2.4.0/site/2.4.0/platforms/linux64GccDPOpt/lib:/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib:/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64GccDPOpt/lib:/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy"
setenv BOOST_ARCH_PATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/boost-system"
setenv CGAL_ARCH_PATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/CGAL-4.6"
setenv FOAM_APPBIN "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin"
setenv FOAM_APP "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/applications"
setenv FOAM_ETC "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/etc"
setenv FOAM_EXT_LIBBIN "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64GccDPOpt/lib"
setenv FOAM_INST_DIR "/opt/openfoam/2.4.0"
setenv FOAM_JOB_DIR "/opt/openfoam/2.4.0/jobControl"
setenv FOAM_LIBBIN "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib"
setenv FOAM_MPI "openmpi-system"
setenv FOAM_RUN "$home/OpenFOAM/$user-2.4.0/run"
setenv FOAM_SETTINGS ""
setenv FOAM_SIGFPE ""
setenv FOAM_SITE_APPBIN "/opt/openfoam/2.4.0/site/2.4.0/platforms/linux64GccDPOpt/bin"
setenv FOAM_SITE_LIBBIN "/opt/openfoam/2.4.0/site/2.4.0/platforms/linux64GccDPOpt/lib"
setenv FOAM_SOLVERS "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/applications/solvers"
setenv FOAM_SRC "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/src"
setenv FOAM_TUTORIALS "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/tutorials"
setenv FOAM_USER_APPBIN "$home/OpenFOAM/$user-2.4.0/platforms/linux64GccDPOpt/bin"
setenv FOAM_USER_LIBBIN "$home/OpenFOAM/$user-2.4.0/platforms/linux64GccDPOpt/lib"
setenv FOAM_UTILITIES "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/applications/utilities"
setenv GMP_ARCH_PATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/gmp-5.1.2"
setenv MANPATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/gcc-4.8.4/man:"
setenv MPFR_ARCH_PATH "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64/mpfr-3.1.2"
setenv MPI_ARCH_PATH "/usr/lib64/openmpi"
setenv MPI_BIN "/usr/lib64/openmpi/bin"
setenv MPI_BUFFER_SIZE "20000000"
setenv MPI_COMPILER "openmpi-x86_64"
setenv MPI_FORTRAN_MOD_DIR "/usr/lib64/gfortran/modules/openmpi-x86_64"
setenv MPI_INCLUDE "/usr/include/openmpi-x86_64"
setenv MPI_LIB "/usr/lib64/openmpi/lib"
setenv MPI_MAN "/usr/share/man/openmpi-x86_64"
setenv MPI_PYTHON_SITEARCH "/usr/lib64/python2.6/site-packages/openmpi"
setenv MPI_SUFFIX "_openmpi"
setenv MPI_SYSCONFIG "/etc/openmpi-x86_64"
setenv ParaView_DIR "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/ParaView-4.1.0"
setenv ParaView_INCLUDE_DIR "/opt/openfoam/2.4.0/ThirdParty-2.4.0/platforms/linux64Gcc/ParaView-4.1.0/include/paraview-4.1"
setenv ParaView_MAJOR "4.1"
setenv ParaView_VERSION "4.1.0"
setenv PV_PLUGIN_PATH "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/paraview-4.1"
setenv PYTHONPATH "/usr/lib64/python2.6/site-packages/openmpi"
setenv WM_ARCH "linux64"
setenv WM_ARCH_OPTION "64"
setenv WM_CC "gcc"
setenv WM_CFLAGS "-m64 -fPIC"
setenv WM_COMPILE_OPTION "Opt"
setenv WM_COMPILER "Gcc"
setenv WM_COMPILER_LIB_ARCH "64"
setenv WM_CXXFLAGS "-m64 -fPIC"
setenv WM_CXX "g++"
setenv WM_DIR "/opt/openfoam/2.4.0/OpenFOAM-2.4.0/wmake"
setenv WM_LDFLAGS "-m64"
setenv WM_LINK_LANGUAGE "c++"
setenv WM_MPLIB "SYSTEMOPENMPI"
setenv WM_OPTIONS "linux64GccDPOpt"
setenv WM_OSTYPE "POSIX"
setenv WM_PRECISION_OPTION "DP"
setenv WM_PROJECT_DIR "/opt/openfoam/2.4.0/OpenFOAM-2.4.0"
setenv WM_PROJECT_INST_DIR "/opt/openfoam/2.4.0"
setenv WM_PROJECT "OpenFOAM"
setenv WM_PROJECT_USER_DIR "$home/OpenFOAM/$user-2.4.0"
setenv WM_PROJECT_VERSION "2.4.0"
setenv WM_THIRD_PARTY_DIR "/opt/openfoam/2.4.0/ThirdParty-2.4.0"

ruby 2.2.2 on centos 6.6

wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz
tar -xzvf ruby-2.2.2.tar.gz
cd ruby-2.2.2
module load tcltk/8.5.13  #tcltk installation
./configure --prefix=/opt/ruby/2.2.2
make -j64 #(if you have 64 cores...)
make install

Module file /etc/modulefiles/ruby/2.2.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##
setenv RUBY_INCLUDE /opt/ruby/2.2.2/include
prepend-path PATH /opt/ruby/2.2.2/bin
prepend-path LD_LIBRARY_PATH /opt/ruby/2.2.2/lib