<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16437"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT size=2 face=Arial>Hi Andy,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>thanks for the quick answer. I've downloaded 
Paraview from: <A 
title="http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz&#10;STRG + Klicken, um Verknüpfung zu folgen" 
href="http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz">http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz</A>&nbsp;and 
compiled it with coprocessing. When I run <FONT size=3 
face="Times New Roman">"ctest -V -R CoProcessing"<FONT size=2 face=Arial> in my 
Paraview-bin directory there seem to be just 2 Tests running and I get the 
following output:</FONT></FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial><A 
href="mailto:orschews@Lap:~/projects/ParaView-bin$">orschews@Lap:~/projects/ParaView-bin$</A> 
ctest -V -R CoProcessing<BR>UpdateCTestConfiguration&nbsp; from 
:/home/orschews/projects/ParaView-bin/DartConfiguration.tcl<BR>Parse Config 
file:/home/orschews/projects/ParaView-bin/DartConfiguration.tcl<BR>&nbsp;Add 
coverage exclude regular expressions.<BR>&nbsp;Add coverage exclude: 
Common.KWCommon.*<BR>&nbsp;Add coverage exclude: vtk.*CSInit.cxx<BR>&nbsp;Add 
coverage exclude: vtkKWParaViewInit.cxx<BR>&nbsp;Add coverage exclude: 
vtk[^\.]+ClientServer.cxx<BR>&nbsp;Add coverage exclude: 
vtk[^\.]+Python.cxx<BR>&nbsp;Add coverage exclude: vtkSNL<BR>&nbsp;Add coverage 
exclude: GUI/Widgets<BR>&nbsp;Add coverage exclude: moc_[^\.]+.cxx<BR>&nbsp;Add 
coverage exclude: ui_[^\.]+.h<BR>&nbsp;Add coverage exclude: 
qrc_[^\.]+.cxx<BR>&nbsp;Add coverage exclude: 
Utilities.Xdmf2.libsrc.*<BR>&nbsp;Add coverage exclude: 
Utilities.VisItBridge.avt<BR>&nbsp;Add coverage exclude: 
Utilities.VisItBridge.CMake<BR>&nbsp;Add coverage exclude: 
Utilities.VisItBridge.common<BR>&nbsp;Add coverage exclude: 
Utilities.VisItBridge.databases<BR>&nbsp;Add coverage exclude: 
Utilities.VisItBridge.include<BR>&nbsp;Add coverage exclude: 
Utilities.VisItBridge.visit_vtk<BR>&nbsp;Add coverage exclude: 
Utilities.protobuf<BR>&nbsp;Add coverage exclude: vtk.*TCLInit.cxx<BR>&nbsp;Add 
coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx<BR>&nbsp;Add coverage exclude: 
Utilities.kwsys<BR>&nbsp;Add coverage exclude: Utilities.vtksys<BR>&nbsp;Add 
coverage exclude: Utilities.vtkmetaio<BR>&nbsp;Add coverage exclude: 
Utilities.vtklibproj4<BR>&nbsp;Add coverage exclude: 
Utilities.vtkalglib<BR>&nbsp;Add coverage exclude: Utilities.octree<BR>&nbsp;Add 
coverage exclude: .*vtkOpenGLState.*<BR>&nbsp;Add coverage exclude: 
.*Testing.Cxx.*cxx<BR>&nbsp;Add coverage exclude: .*Testing.Cxx.*h<BR>&nbsp;Add 
coverage exclude: .*moc_.*cxx<BR>UpdateCTestConfiguration&nbsp; from 
:/home/orschews/projects/ParaView-bin/DartConfiguration.tcl<BR>Parse Config 
file:/home/orschews/projects/ParaView-bin/DartConfiguration.tcl<BR>Test project 
/home/orschews/projects/ParaView-bin<BR>Constructing a list of tests<BR>Done 
constructing a list of tests<BR>Checking test dependency graph...<BR>Checking 
test dependency graph end<BR>test 372<BR>&nbsp;&nbsp;&nbsp; Start 372: 
CoProcessingTestPythonScript</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>372: Test command: 
/home/orschews/projects/ParaView-bin/bin/CoProcessingPythonScriptExample 
"/home/orschews/projects/ParaView3/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest.py"<BR>372: 
Test timeout computed to be: 1500<BR>372: Initializing MPI.<BR>372: Finished run 
with 0 errors.<BR>1/2 Test #372: CoProcessingTestPythonScript 
.......&nbsp;&nbsp; Passed&nbsp;&nbsp;&nbsp; 7.41 sec<BR>test 
373<BR>&nbsp;&nbsp;&nbsp; Start 373: 
PCoProcessingPythonScriptExample</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>373: Test command: /usr/bin/mpiexec "-np" "2" 
"/home/orschews/projects/ParaView-bin/bin/CoProcessingPythonScriptExample" 
"/home/orschews/projects/ParaView3/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest2.py"<BR>373: 
Test timeout computed to be: 1500<BR>373: Initializing MPI.<BR>373: Initializing 
MPI.<BR>373: Finished run with 0 errors.<BR>373: Finished run with 0 
errors.<BR>2/2 Test #373: PCoProcessingPythonScriptExample ...&nbsp;&nbsp; 
Passed&nbsp;&nbsp;&nbsp; 1.99 sec</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>The following tests 
passed:<BR>&nbsp;CoProcessingTestPythonScript<BR>&nbsp;PCoProcessingPythonScriptExample</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>100% tests passed, 0 tests failed out of 
2</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Total Test time (real) =&nbsp; 11.18 sec<BR><A 
href="mailto:orschews@Lap:~/projects/ParaView-bin$">orschews@Lap:~/projects/ParaView-bin$</A> 
</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A 
title="mailto:andy.bauer@kitware.com&#10;STRG + Klicken, um Verknüpfung zu folgen" 
href="mailto:andy.bauer@kitware.com">Andy Bauer</A> </DIV>
<DIV><B>Sent:</B> Tuesday, December 06, 2011 8:53 PM</DIV>
<DIV><B>To:</B> <A 
title="mailto:peacemaker1@web.de&#10;STRG + Klicken, um Verknüpfung zu folgen" 
href="mailto:peacemaker1@web.de">peacemaker</A> </DIV>
<DIV><B>Cc:</B> <A 
title="mailto:paraview@paraview.org&#10;STRG + Klicken, um Verknüpfung zu folgen" 
href="mailto:paraview@paraview.org">paraview@paraview.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Paraview] PythonScriptCoProcessingExample mpirun 
Problem</DIV></DIV></DIV>
<DIV><BR></DIV>Hi Marek,<BR><BR>I'm a bit confused.&nbsp; Where are you getting 
your CoProcessing executable from?&nbsp; If I run the coprocessing library tests 
I don't see any failures on my machine and they're running in parallel.&nbsp; 
Could you send me the results of doing "ctest -V -R CoProcessing" on your 
machine?&nbsp; There should be 6 tests that run.&nbsp; The 
PCoProcessingPythonScriptExampleOne tests the coprocessing tools with a 2 
process run.&nbsp; You may need to check out ParaViewData (<A 
title="http://www.paraview.org/paraview/resources/software.html&#10;STRG + Klicken, um Verknüpfung zu folgen" 
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 
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote><U></U>
  <DIV style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
  name="Compose message area">
  <DIV><FONT size=2 face=Arial>Hi,</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>Im trying to run the 
  PythonScriptCoProcessingExample(.cxx) included in ParaView sourcecode - this 
  is my first "getting in touch" with&nbsp;MPI +&nbsp;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 size=2 face=Arial>When I run it like: </FONT></DIV>
  <DIV><FONT size=2 face=Arial>mpirun -n 1 ./CoProcessing ./PythonScriptTest.py 
  </FONT></DIV>
  <DIV><FONT size=2 face=Arial>then I get as result CPGrid0_mpirun1.png and 
  CPPressure0_mpirun1.png - looks good.</FONT></DIV>
  <DIV><FONT size=2 face=Arial>If I try:</FONT></DIV>
  <DIV><FONT size=2 face=Arial>mpirun -n 2&nbsp;&nbsp;./CoProcessing 
  ./PythonScriptTest.py </FONT></DIV>
  <DIV><FONT size=2 face=Arial>then I get as result CPGrid0_mpirun2.png and 
  CPPressure0_mpirun2.png - these pictures seem to be incorrect. </FONT></DIV>
  <DIV><FONT size=2 face=Arial>In vtkPVCustomTestDriver.cxx there are source 
  lines like:</FONT></DIV>
  <DIV><FONT size=2 face=Arial>...</FONT></DIV>
  <DIV><FONT size=2 face=Arial>#ifdef COPROCESSOR_USE_MPI<BR>&nbsp; myid = 
  vtkMPICommunicator::GetWorldCommunicator()-&gt;GetLocalProcessId();<BR>#endif</FONT></DIV>
  <DIV><FONT size=2 face=Arial>....</FONT></DIV>
  <DIV><FONT size=2 face=Arial>gridBuilder-&gt;SetSpacing(spacing);<BR>&nbsp; 
  double origin[3] = {myid*49*.2,20,300};</FONT></DIV>
  <DIV><FONT size=2 face=Arial>.....</FONT></DIV>
  <DIV><FONT size=2 face=Arial>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 size=2 face=Arial>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 size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>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 size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>I already tested this on a&nbsp;different PC with 
  the same result. I hope you can help me. &nbsp;</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>Best wishes</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>Marek</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>changed Python Script:</FONT></DIV>
  <DIV><FONT size=2 face=Arial>def DoCoProcessing(datadescription):<BR>&nbsp; 
  timestep = datadescription.GetTimeStep()</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; grid = 
  datadescription.GetInputDescriptionByName("input").GetGrid()<BR>&nbsp; 
  pressure = grid.GetPointData().GetArray('Pressure')</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>#&nbsp; print grid</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; 
  #grid.GetPointData().SetScalars(pressure)<BR>&nbsp; 
  obj.SetOutput(grid)<BR>#&nbsp; print obj</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; # get global range of Pressure<BR>&nbsp; 
  di = trivialproducer.GetDataInformation(0)<BR>&nbsp; 
  trivialproducer.UpdatePipeline()<BR>&nbsp; di.Update()<BR>&nbsp; pdi = 
  di.GetPointDataInformation()<BR>#&nbsp; print pdi<BR>&nbsp; ai = 
  pdi.GetArrayInformation('Pressure')<BR>&nbsp; pressurerange = 
  ai.GetComponentRange(0)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; contour.Isosurfaces = 
  .5*(pressurerange[0]+pressurerange[1])</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; # now output the results to the screen as 
  well as taking<BR>&nbsp; # a screen shot of the view<BR>&nbsp; #setup a 
  window<BR>&nbsp; #rep = Show(contour)<BR>&nbsp; #ren = Render()</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; #set the background color<BR>&nbsp; 
  #ren.Background=[1,1,1]&nbsp; #white</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; #set image size<BR>&nbsp; #ren.ViewSize = 
  [1000, 1000] #[width, height]</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; #set representation<BR>&nbsp; 
  #rep.Representation="Surface"</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; #save screenshot<BR>&nbsp; 
  #gridimagefilename = 'CPGrid'+str(timestep) + '.png'<BR>&nbsp; 
  #WriteImage(gridimagefilename)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; rep = Show(trivialproducer)<BR>&nbsp; 
  #rep.LookupTable = MakeBlueToRedLT(pressurerange[0], 
  pressurerange[1])<BR>&nbsp; #rep.ColorArrayName = 'Pressure'<BR>&nbsp; 
  #rep.ColorAttributeType = 'POINT_DATA'<BR>&nbsp; #set representation<BR>&nbsp; 
  rep.Representation="Wireframe"<BR>&nbsp; #rep = Show(contour)<BR>&nbsp; #set 
  the background color<BR>&nbsp; ren = Render()<BR>&nbsp; 
  ren.Background=[0,0,0]&nbsp; #white<BR>&nbsp; ren.ViewSize = [1000, 1000] 
  #[width, height]</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&nbsp; pressureimagefilename = 
  'CPPressure'+str(timestep) + '.png'<BR>&nbsp; 
  WriteImage(pressureimagefilename)<BR>&nbsp; return</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>def 
  RequestDataDescription(datadescription):<BR>&nbsp; time = 
  datadescription.GetTime()<BR>&nbsp; timestep = 
  datadescription.GetTimeStep()<BR>&nbsp; print timestep<BR>&nbsp; if timestep % 
  20 == 0:<BR>&nbsp;&nbsp;&nbsp; # add in some fields<BR>&nbsp;&nbsp;&nbsp; 
  #print 'added Pressure and wanting to do coprocessing'<BR>&nbsp;&nbsp;&nbsp; 
  datadescription.GetInputDescriptionByName("input").AddPointField("Pressure")<BR>&nbsp;&nbsp;&nbsp; 
  datadescription.GetInputDescriptionByName('input').GenerateMeshOn()<BR>&nbsp; 
  return</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial># 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>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>trivialproducer = TrivialProducer()<BR>contour = 
  Contour(Input=trivialproducer)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>obj = 
  trivialproducer.GetClientSideObject()<BR></FONT></DIV></DIV><BR>_______________________________________________<BR>Powered 
  by <A 
  title="http://www.kitware.com&#10;STRG + Klicken, um Verknüpfung zu folgen" 
  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></BODY></HTML>