Parallel ParaView

Using OpenFOAM in parallel with MPI is well explained in the OpenFOAM manual. Rendering results in ParaView on multiple cores on a desktop computer is a little less explained on the light side of the internets. So here’s a quick’n’dirty tutorial for dummies.

ParaView itself can’t render on multiple cores. pvserver, on the other hand, can. So you need to run a server first but with MPI. The number of MPI processes should be equal to number of decomposed subdomains of the OpenFOAM case you will open. Also, on Windows Microsoft MPI is run with mpiexec, on Linux mpirun. The command line arguments are the same. In my case, I decompose my cases into 4 subdomains.

C:\Program Files\ParaView\bin>mpiexec -np 4 pvserver
Waiting for client…
Connection URL: cs://buquica:11111
Accepting connection(s): buquica:11111

Now you open ParaView and instead of opening a file directly, you connect to your server: File > Connect… If you haven’t done it yet, Add Server:

Name: your choice
Server Type: Client/Server
Host: <the URL that your server gave you at start>
Port: 11111 <also the port that your server gave you at start>

Now you can open a case as usual but you must read the decomposed times. Otherwise you will get the error:

Structure does not match. You must use CopyStructure before calling this method.

Here’s a big big domain rendered on all my cores:

Parallel rendered pump case
Pump case with 6 million cells, rendered with Paraview, on multiple cores. The rendered field is nut.

For more detailed information refer to the nerdier official ParaView Wiki. Have fun!