Hi Marek,<br><br>I'm a bit confused. Where are you getting your CoProcessing executable from? If I run the coprocessing library tests I don't see any failures on my machine and they're running in parallel. Could you send me the results of doing "ctest -V -R CoProcessing" on your machine? There should be 6 tests that run. The PCoProcessingPythonScriptExampleOne tests the coprocessing tools with a 2 process run. You may need to check out ParaViewData (<a href="http://www.paraview.org/paraview/resources/software.html">http://www.paraview.org/paraview/resources/software.html</a>) and add that option in the cmake configuration.<br>
<br>Andy<br><br><div class="gmail_quote">On Tue, Dec 6, 2011 at 3:31 AM, peacemaker <span dir="ltr"><<a href="mailto:peacemaker1@web.de">peacemaker1@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>
<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Im trying to run the
PythonScriptCoProcessingExample(.cxx) included in ParaView sourcecode - this is
my first "getting in touch" with MPI + ParaView (and Coprocessing of
course) so maybe it`s just a very simple problem. I already succesfully compiled
Paraview with Coprocessing and python (Ubuntu 11.10) and I`m running the source
with COPROCESSOR_USE_MPI. </font></div>
<div><font face="Arial" size="2">When I run it like: </font></div>
<div><font face="Arial" size="2">mpirun -n 1 ./CoProcessing ./PythonScriptTest.py
</font></div>
<div><font face="Arial" size="2">then I get as result CPGrid0_mpirun1.png and
CPPressure0_mpirun1.png - looks good.</font></div>
<div><font face="Arial" size="2">If I try:</font></div>
<div><font face="Arial" size="2">mpirun -n 2 ./CoProcessing
./PythonScriptTest.py </font></div>
<div><font face="Arial" size="2">then I get as result CPGrid0_mpirun2.png and
CPPressure0_mpirun2.png - these pictures seem to be incorrect. </font></div>
<div><font face="Arial" size="2">In vtkPVCustomTestDriver.cxx there are source lines
like:</font></div>
<div><font face="Arial" size="2">...</font></div>
<div><font face="Arial" size="2">#ifdef COPROCESSOR_USE_MPI<br> myid =
vtkMPICommunicator::GetWorldCommunicator()->GetLocalProcessId();<br>#endif</font></div>
<div><font face="Arial" size="2">....</font></div>
<div><font face="Arial" size="2">gridBuilder->SetSpacing(spacing);<br>
double origin[3] = {myid*49*.2,20,300};</font></div>
<div><font face="Arial" size="2">.....</font></div>
<div><font face="Arial" size="2">If I understand it correctly there should be just a
shift on the x-axis between the grids? The pictures get more and more messy,
when I increase the numer of processes.</font></div>
<div><font face="Arial" size="2">After little messing around with the pyton-script
needed to run this example (see bottom of this Mail) I got the following output
when running it with mpirun -n 3: CPPressure0_changedscript_mpirun3.png. The
halfs of the 2nd and 3rd grid are missing.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">What am I doing wrong? Is this example not supposed
to be run with MPI? How does Coprocessing merge the data from different
processes and how does the picture get built?</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I already tested this on a different PC with
the same result. I hope you can help me. </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Best wishes</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Marek</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">changed Python Script:</font></div>
<div><font face="Arial" size="2">def DoCoProcessing(datadescription):<br>
timestep = datadescription.GetTimeStep()</font></div>
<div> </div>
<div><font face="Arial" size="2"> grid =
datadescription.GetInputDescriptionByName("input").GetGrid()<br> pressure
= grid.GetPointData().GetArray('Pressure')</font></div>
<div> </div>
<div><font face="Arial" size="2"># print grid</font></div>
<div> </div>
<div><font face="Arial" size="2">
#grid.GetPointData().SetScalars(pressure)<br>
obj.SetOutput(grid)<br># print obj</font></div>
<div> </div>
<div><font face="Arial" size="2"> # get global range of Pressure<br> di
= trivialproducer.GetDataInformation(0)<br>
trivialproducer.UpdatePipeline()<br> di.Update()<br> pdi =
di.GetPointDataInformation()<br># print pdi<br> ai =
pdi.GetArrayInformation('Pressure')<br> pressurerange =
ai.GetComponentRange(0)</font></div>
<div> </div>
<div><font face="Arial" size="2"> contour.Isosurfaces =
.5*(pressurerange[0]+pressurerange[1])</font></div>
<div> </div>
<div><font face="Arial" size="2"> # now output the results to the screen as
well as taking<br> # a screen shot of the view<br> #setup a
window<br> #rep = Show(contour)<br> #ren = Render()</font></div>
<div> </div>
<div><font face="Arial" size="2"> #set the background color<br>
#ren.Background=[1,1,1] #white</font></div>
<div> </div>
<div><font face="Arial" size="2"> #set image size<br> #ren.ViewSize =
[1000, 1000] #[width, height]</font></div>
<div> </div>
<div><font face="Arial" size="2"> #set representation<br>
#rep.Representation="Surface"</font></div>
<div> </div>
<div><font face="Arial" size="2"> #save screenshot<br>
#gridimagefilename = 'CPGrid'+str(timestep) + '.png'<br>
#WriteImage(gridimagefilename)</font></div>
<div> </div>
<div><font face="Arial" size="2"> rep = Show(trivialproducer)<br>
#rep.LookupTable = MakeBlueToRedLT(pressurerange[0], pressurerange[1])<br>
#rep.ColorArrayName = 'Pressure'<br> #rep.ColorAttributeType =
'POINT_DATA'<br> #set representation<br>
rep.Representation="Wireframe"<br> #rep = Show(contour)<br> #set the
background color<br> ren = Render()<br> ren.Background=[0,0,0]
#white<br> ren.ViewSize = [1000, 1000] #[width, height]</font></div>
<div> </div>
<div><font face="Arial" size="2"> pressureimagefilename =
'CPPressure'+str(timestep) + '.png'<br>
WriteImage(pressureimagefilename)<br> return</font></div>
<div> </div>
<div><font face="Arial" size="2">def
RequestDataDescription(datadescription):<br> time =
datadescription.GetTime()<br> timestep =
datadescription.GetTimeStep()<br> print timestep<br> if timestep %
20 == 0:<br> # add in some fields<br> #print
'added Pressure and wanting to do coprocessing'<br>
datadescription.GetInputDescriptionByName("input").AddPointField("Pressure")<br>
datadescription.GetInputDescriptionByName('input').GenerateMeshOn()<br>
return</font></div>
<div> </div>
<div><font face="Arial" size="2"># the code below is needed to import objects from
paraview.simple<br># plus the definition of vtkTrivialProducer into this python
script.<br>try: paraview.simple<br>except: from paraview.simple import
*</font></div>
<div> </div>
<div><font face="Arial" size="2">trivialproducer = TrivialProducer()<br>contour =
Contour(Input=trivialproducer)</font></div>
<div> </div>
<div><font face="Arial" size="2">obj =
trivialproducer.GetClientSideObject()<br></font></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>