run pvbatch in parallel using pvserver

Hello,
I have read the different posts around the forum, I am a little bit lost about this.
I want to run a paraview script using several processors in a openfoam decomposed case (equal number of processors for paraview part and openfoam case data).
I am in linux (ubuntu based) using the binaries from ParaView-5.12.0-MPI-Linux-Python3.10-x86_64.tar.gz
which is the correct workflow?

  1. create a server running mpiexec -n $nProc pvserver
  2. run mpiexec -np $nProc pvbatch --mpi myScript.py
    should I use mpiexec or mpirun?
    while running the first command, I am already encountering the issue that the address is already used
mpirun -n 8 pvserver
Waiting for client...
Connection URL: cs://franco-precision7560:11111
Waiting for client...
Connection URL: cs://franco-precision7560:11111
Waiting for client...
Connection URL: cs://franco-precision7560:11111
Waiting for client...
Connection URL: cs://franco-precision7560:11111
Accepting connection(s): franco-precision7560:11111
(   0.436s) [pvserver        ]          vtkSocket.cxx:241    ERR| vtkServerSocket (0x1d88050): Socket error in call to listen. Address already in use.
(   0.423s) [pvserver        ]          vtkSocket.cxx:190    ERR| vtkServerSocket (0x2537060): Socket error in call to bind. Address already in use.
(   0.436s) [pvserver        ]          vtkSocket.cxx:190    ERR| vtkServerSocket (0xd97060): Socket error in call to bind. Address already in use.
(   0.436s) [pvserver        ]vtkTCPNetworkAccessMana:441    ERR| vtkTCPNetworkAccessManager (0x1af4750): Failed to set up server socket.
(   0.423s) [pvserver        ]vtkTCPNetworkAccessMana:441    ERR| vtkTCPNetworkAccessManager (0x22a3750): Failed to set up server socket.
(   0.436s) [pvserver        ]vtkTCPNetworkAccessMana:441    ERR| vtkTCPNetworkAccessManager (0xb03750): Failed to set up server socket.
Exiting...

nevertheless I have tried to kill it using htop (looking for pvserver and kill the instance) but even after I am getting the error.
how can I create a new pvserver? and associate it with pvbatch so it runs the script in the simulation in parallel.
thanks in advance,

you should use the mpiexec executable available in the bin directory

So your command should be (for pvserver)

cd path/to/paraview
./bin/mpiexec -np $nProc ./bin/pvserver

Then connect to your server using ParaView.

but since you want to use pvbatch you do not even need pvserver, just run:

cd path/to/paraview
./bin/mpiexec -np $nProc ./bin/pvbatch /path/to/myScript.py

hello mathieu,
thanks for your answer, and what can I do for the error I am getting from the pvserver command?
if I do, I get:

nProc=8
./bin/mpiexec -np $nProc ./bin/pvserver
Waiting for client...
Connection URL: cs://franco-precision7560:11111
(   0.380s) [pvserver.0      ]          vtkSocket.cxx:190    ERR| vtkServerSocket (0x22b6700): Socket error in call to bind. Address already in use.
(   0.380s) [pvserver.0      ]vtkTCPNetworkAccessMana:441    ERR| vtkTCPNetworkAccessManager (0x201d370): Failed to set up server socket.
Exiting...
Exiting...
Exiting...
Exiting...
Exiting...
Exiting...
Exiting...
Exiting...

thanks in advance

reboot, you may have pvservers running in the background.

After rebooting, the command ./bin/mpiexec -np $nProc ./bin/pvserver is not finishing of running, is it normal? (it has already passed several minutes)
image

Well, yes, the distributed pvserver is running, waiting for you to connect to it.

1 Like