[Paraview] pythoncalculator with mpirun fails
Eelco van Vliet
eelcovv at gmail.com
Wed Jul 27 10:21:25 EDT 2011
Dear Paraviewer developers
Thanks for the new 3.10.1 release: finally I can get my python batch files
run in parallel including the text labels!
I have one small problem related with a parallel run of a python batch
script when pythonCalculator is included
I have added the script below this email and added to the attachment as
pycalc.py
If I run the script with
pvbatch pycalc.py
everything is fine
also
pvbatch --use-offscreen-rendering pycalc.py
works fine
Even
mpirun -np 1 pvbatch --use-offscreen-rendering pycalc.py
runs like a charm
However, if I do:
mpirun -np 2 pvbatch --use-offscreen-rendering pycalc.py
It crashed and I got a whole bunch of error messages
starting with
Process id: 1 >> Warning: In
/tmp/openfoam_build/ParaView-3.10.1/VTK/Parallel/vtkSochetController, line
50
vtkSocketCrontroller (-xd4a51f0): Already initialized
...
Error: Cannot find command function for "vtkProcessModeule""
If I change in the script the PythonCalcuator for the normal calculator by
substituting the lines with Calc for
Calc=Calculator()
Calc.Function='U_Z'
Everything runs fine, even for the mpirun -np 2
In other words: the combination of mpirun on multiple processors with
PythonCalculator does not seem to work
I have added the scripts and the error message in the tar ball attachment.
Hopefully can shed some light on this, as the PythonCalculator would be very
handy to use in script, also when I am running parallel
Thanks in advance!
Regards
Eelco
+++++++++++++++++++++++++++++++
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
sm=servermanager
sm.Connect()
nbprocs = sm.ActiveConnection.GetNumberOfDataPartitions()
print ("RENDERING ON # %d cores: ")%(nbprocs)
U_pxz_y0_vtk = LegacyVTKReader(FileNames=['U_pxz_y0.vtk'] )
RenderView1 = sm.CreateRenderView()
Calc = PythonCalculator()
Calc.Expression = 'U'
DataRepresentation1 =
sm.CreateRepresentation(ProcessIdScalars(Calc),RenderView1)
RenderView1.StillRender()
RenderView1.WriteImage("bla.png","vtkPNGWriter",1)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110727/128a545e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tgz
Type: application/x-gzip
Size: 208481 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110727/128a545e/attachment-0001.bin>
More information about the ParaView
mailing list