[Paraview] pvbatch and process id

Gena Bug archaerolog at mail.ru
Mon Feb 4 09:35:03 EST 2013


Hi!

I'm trying to get a current process id from within a pvbatch script.
I found a solution here
(http://www.paraview.org/pipermail/paraview/2010-April/016759.html)
but this trick doesn't work for me.

I wrote a very simple script:
from paraview.simple import *
sm = servermanager
print 'parts = ', sm.ActiveConnection.GetNumberOfDataPartitions()
print 'my id = ', sm.vtkProcessModule.GetProcessModule().GetPartitionId()

If I run it with custom compiled paraview (with MPI enabled) I get:
$ mpirun -np 2 ~/projects/ParaView-build/bin/pvbatch tst_pvbatch.py 
parts =  2
my id =  0

If I run it with pvbatch downloaded from www.paraview.org I get:
$ mpirun -np 2 ~/paraview/bin/pvbatch tst_pvbatch.py 
parts =  1
my id = parts =  1
my id =  0
 0

What am I doing wrong?

-----|-
Гена.


More information about the ParaView mailing list