OpenFoam v2112 compilation on CentOs7. We have tested with gcc7 and openmpi 4+ . We have not tested paraview with this version.
Please note, Infiniband network in SOUMYA does not support openmpi greater than version 2.
1. #OpenFOAM downloading and installation
cd ~
mkdir OpenFOAM
cd OpenFOAM
wget -O - ftp://ftp.aero.iitb.ac.in/ace/openfoam/OpenFOAM-v2112.tgz | tar -xvz
wget -O - ftp://ftp.aero.iitb.ac.in/ace/openfoam/ThirdParty-v2112.tgz | tar -xvz
2. #Add source paths in your bashrc before proceeding with the installation , add in the end of the bashrc file -
vi ~/.bashrc
#openfoam2112
source /opt/rh/python27/enable
source /opt/rh/devtoolset-7/enable
source $HOME/OpenFOAM/OpenFOAM-v2112/etc/bashrc
3. #Source your bashrc
source ~/.bashrc
4. #OpenMPI Version 4.1.4 is the latest version supported by cluster SOUMYA. Download and extract from here OpenMPI (Download File tar.gz - openmpi-4.1.4.tar.gz)
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz
tar -xvf openmpi-4.1.4.tar.gz
5. Run the command "./configure" in the openmpi folder and run "make all install" after the configuration. This will enable the openmpi and certainly will add the mpicc command.
./configure --prefix=$HOME/OpenFOAM/openmpi-4.1.4
make all install
After it's compiled, add it in your bashrc and source it, to override system openmpi -
export PATH=$HOME/OpenFOAM/openmpi-4.1.4/bin:$PATH
source ~/.bashrc
7. We can now start to install OpenFoam now. Navigate to OpenFoam directory
cd ../OpenFOAM-v2112
8. Run the command "export WM_NCOMPPROCS=ncpus" for multithreading compilation. Below command will set 16 Cores
export WM_NCOMPPROCS=16
9. Start installation
./Allwmake -j
You can run it again just to verify -
./Allwmake -j
10. If it is compiled without any errors, then it is done. You can check
icoFoam -help