Difference between revisions of "Benchmarking: OpenFOAM"

From Define Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 26: Line 26:
  
 
== Build ParaView ==
 
== Build ParaView ==
 +
* Edit the paraview vars script: <tt>vi $WM_PROJECT_DIR/etc/config/paraview.sh </tt>
 +
* On a RHEL system with qt4.6 we can only build paraview 3.12, not the 4.1 release provided in the ThirdParty dir
 +
<syntaxhighlight>
 +
  # vi $WM_PROJECT_DIR/etc/config/paraview.sh
 +
  export ParaView_VERSION=3.12.0
 +
</syntaxhighlight>
 +
 +
* Get version 3.12.0 as the 4.1 version wont work
 +
<syntaxhighlight>
 +
  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)
 +
</syntaxhighlight>
 +
 +
* Apply Patch for it to build with gcc 4.8.1
 +
<syntaxhighlight>
 +
[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)
 +
 +
</syntaxhighlight>
 +
 +
* Build
 +
<syntaxhighlight>
 +
  cd $WM_THIRD_PARTY_DIR
 +
  ./makeParaView -qmake $(which qmake-qt4)
 +
</syntaxhighlight>
 +
 +
* Should end up with the following:
 +
<syntaxhighlight>
 +
    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
 +
</syntaxhighlight>
 +
 +
* Setup Paraview 3 with OpenFOAM
 +
<syntaxhighlight>
 +
  # Quick fix, wasnt building properly due to case issues
 +
  cd /cm/shared/apps/openfoam/2.3.0/ThirdParty-2.3.0/platforms/linux64Gcc
 +
  ln -s ParaView-3.12.0 paraview-3.12.0
 +
  # continue on with the build
 +
  cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
 +
  wmSET
 +
  ./Allwclean
 +
  ./Allwmake
 +
</syntaxhighlight>
 +
 +
== Verify the Installation ==
 +
* Run the <tt>foamInstallationTest</tt> command
 +
<syntaxhighlight>
 +
  foamInstallationTest
 +
</syntaxhighlight>

Latest revision as of 15:07, 7 May 2014

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
  • Setup Paraview 3 with OpenFOAM
  # Quick fix, wasnt building properly due to case issues
  cd /cm/shared/apps/openfoam/2.3.0/ThirdParty-2.3.0/platforms/linux64Gcc
  ln -s ParaView-3.12.0 paraview-3.12.0
  # continue on with the build
  cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers 
  wmSET 
  ./Allwclean 
  ./Allwmake

Verify the Installation

  • Run the foamInstallationTest command
  foamInstallationTest