How to run OpenFlow with MPI?

How do I run OpenFlow using MPI for a multi-processor computer?

Use MS mpiexec

Setup your OpenFOAM case directory (mesh, conditions, etc.) as normal. Then let's consider an example where we want to run simpleFoam in parallel on 4 processors:

  • Launch the OpenFlow Parallel Command Prompt
  • Switch directory to your OpenFOAM case
  • Set the parallel options in system/decomposeParDict:
    • numberOfSubdomains 4;
    • method scotch;
  • Decompose the case using decomposePar
  • Run the case using mpiexec -n 4 simpleFoam -parallel
  • Recompose the case using recomposePar