Benchmarking: OpenFOAM

From Define Wiki
Revision as of 12:23, 7 May 2014 by David (talk | contribs)
Jump to navigation Jump to search

OpenFOAM 2.3.0

  • Built with GCC 4.8.1
  • Built on Centos 6.5
  • Built with OpenMPI 1.8.1 (gcc 4.8.1 and --with-cuda)
  • Note: Will not work with GCC 4.4, has to be GCC >= 4.5

Download

  mkdir /cm/shared/apps/openfoam/2.3.0 -p 
  cd /cm/shared/apps/openfoam/2.3.0
  wget 'http://downloads.sourceforge.net/foam/OpenFOAM-2.3.0.tgz'
  wget 'http://downloads.sourceforge.net/foam/ThirdParty-2.3.0.tgz'
  tar zxf OpenFOAM-2.3.0.tgz
  tar zxf ThirdParty-2.3.0.tgz

Build OpenFOAM

  • module load gcc/4.8.1 openmpi/gcc/64/1.8.1-gcc481-cuda
  cd OpenFOAM-2.3.0
  # Source the OpenFOAM vars
  source etc/bashrc WM_NCOMPPROCS=4 foamCompiler=system WM_MPLIB=SYSTEMOPENMPI FOAM_INST_DIR=/cm/shared/apps/openfoam/2.3.0/
  ./Allwmake

Build ParaView

  • Edit the paraview vars script: vi $WM_PROJECT_DIR/etc/config/paraview.sh
  • On a RHEL system with qt4.6 we can only build paraview 3.12, not the 4.1 release provided in the ThirdParty dir
  # vi $WM_PROJECT_DIR/etc/config/paraview.sh 
  export ParaView_VERSION=3.12.0
  • Get version 3.12.0 as the 4.1 version wont work
  cd $WM_THIRD_PARTY_DIR 
  wget http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz
  tar zxf ParaView-3.12.0.tar.gz 
  ./makeParaView -qmake $(which qmake-qt4)
  • Apply Patch for it to build with gcc 4.8.1
[root@head1 ThirdParty-2.3.0]# pwd
/cm/shared/apps/openfoam/2.3.0/ThirdParty-2.3.0
[root@head1 ThirdParty-2.3.0]# cat paraview-3.12.0.patch 
--- ParaView-3.12.0/Qt/Core/pqServerManagerSelectionModel.h.orig        2014-05-07 12:49:15.000000000 +0100
+++ ParaView-3.12.0/Qt/Core/pqServerManagerSelectionModel.h     2014-05-07 12:50:45.000000000 +0100
@@ -72,7 +72,7 @@
     Clear          = QItemSelectionModel::Clear,
     Select         = QItemSelectionModel::Select,
     Deselect       = QItemSelectionModel::Deselect, 
-    ClearAndSelect = Clear | Select
+    ClearAndSelect = static_cast<int>(Clear) | static_cast<int>(Select)
   };
   Q_DECLARE_FLAGS(SelectionFlags, SelectionFlag)
  • Build
  cd $WM_THIRD_PARTY_DIR 
   ./makeParaView -qmake $(which qmake-qt4)
  • Should end up with the following:
    Installation complete for paraview-3.12.0
    Set environment variables:

        export ParaView_DIR=/cm/shared/apps/openfoam/2.3.0//ThirdParty-2.3.0/platforms/linux64Gcc/ParaView-3.12.0
        export PATH=$ParaView_DIR/bin:$PATH
        export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-3.12