Hi Marek,<br><br>I&#39;m a bit confused.  Where are you getting your CoProcessing executable from?  If I run the coprocessing library tests I don&#39;t see any failures on my machine and they&#39;re running in parallel.  Could you send me the results of doing &quot;ctest -V -R CoProcessing&quot; 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">&lt;<a href="mailto:peacemaker1@web.de">peacemaker1@web.de</a>&gt;</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 &quot;getting in touch&quot; 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()-&gt;GetLocalProcessId();<br>#endif</font></div>
<div><font face="Arial" size="2">....</font></div>
<div><font face="Arial" size="2">gridBuilder-&gt;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(&quot;input&quot;).GetGrid()<br>  pressure 
= grid.GetPointData().GetArray(&#39;Pressure&#39;)</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(&#39;Pressure&#39;)<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=&quot;Surface&quot;</font></div>
<div> </div>
<div><font face="Arial" size="2">  #save screenshot<br>  
#gridimagefilename = &#39;CPGrid&#39;+str(timestep) + &#39;.png&#39;<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 = &#39;Pressure&#39;<br>  #rep.ColorAttributeType = 
&#39;POINT_DATA&#39;<br>  #set representation<br>  
rep.Representation=&quot;Wireframe&quot;<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 = 
&#39;CPPressure&#39;+str(timestep) + &#39;.png&#39;<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 
&#39;added Pressure and wanting to do coprocessing&#39;<br>    
datadescription.GetInputDescriptionByName(&quot;input&quot;).AddPointField(&quot;Pressure&quot;)<br>    
datadescription.GetInputDescriptionByName(&#39;input&#39;).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>