[Paraview] pvpython vtkMPIController usage? rank is always 0
Ephraim Obermaier
ephraimobermaier at gmail.com
Tue May 16 13:07:14 EDT 2017
Hello,
I am trying to use VTK's MPI communication from pvpython, running with
OpenMPI's mpirun. It seems like ParaView hasn't enabled the MPI
capabilities for VTK, although it was compiled from source with
PARAVIEW_USE_MPI=ON and correctly found the system OpenMPI-2.0.0 libraries
and includes.
I am running the short example below with the command "mpirun -n 2 pvpython
test.py". The full output is also attached.
In short, both MPI processes report rank=0 and size=1 and their controller
is a vtkDummyController although I expected rank=0..1, size=2 and a
vtkMPIController.
Is it possible to determine the problem with the given information? Do I
need extra CMake settings besides "PARAVIEW_USE_MPI=ON" to enable MPI for
VTK?
ParaView by itself runs fine in parallel, and I can start several parallel
pvservers using "mpirun -n 16 pvserver".
--- test.py: ---
import vtk
c = vtk.vtkMultiProcessController.GetGlobalController()
print "comm:",type(c)
rank = c.GetLocalProcessId()
print "rank:",rank
size = c.GetNumberOfProcesses()
print "size:",size
if rank == 0:
ssource = vtk.vtkSphereSource()
ssource.Update()
print " 0 sending."
c.Send(ssource.GetOutput(), 1, 1234)
else:
sphere = vtk.vtkPolyData()
print " 1 receiving."
c.Receive(sphere, 0, 1234)
print sphere
--- Test run: ---
$ mpirun -n 2 pvpython test.py
comm: <type 'vtkParallelCorePython.vtkDummyController'>
rank: 0
size: 1
0 sending.
Warning: In
/home/user/.local/easybuild/build/ParaView/5.3.0/foss-2016b-mpi/ParaView-v5.3.0/VTK/Parallel/Core/vtkDummyCommunicator.h,
line 47
vtkDummyCommunicator (0x1ff74e0): There is no one to send to.
[... 7 more times the same Warning...]
comm: <type 'vtkParallelCorePython.vtkDummyController'>
rank: 0
size: 1
0 sending.
Warning: In
/home/user/.local/easybuild/build/ParaView/5.3.0/foss-2016b-mpi/ParaView-v5.3.0/VTK/Parallel/Core/vtkDummyCommunicator.h,
line 47
vtkDummyCommunicator (0x22c14e0): There is no one to send to.
[... 7 more times the same Warning...]
--- end of output ---
Thank you!
Ephraim
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170516/21215880/attachment.html>
More information about the ParaView
mailing list