<!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> </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 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> 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 from
:/home/orschews/projects/ParaView-bin/DartConfiguration.tcl<BR>Parse Config
file:/home/orschews/projects/ParaView-bin/DartConfiguration.tcl<BR> Add
coverage exclude regular expressions.<BR> Add coverage exclude:
Common.KWCommon.*<BR> Add coverage exclude: vtk.*CSInit.cxx<BR> Add
coverage exclude: vtkKWParaViewInit.cxx<BR> Add coverage exclude:
vtk[^\.]+ClientServer.cxx<BR> Add coverage exclude:
vtk[^\.]+Python.cxx<BR> Add coverage exclude: vtkSNL<BR> Add coverage
exclude: GUI/Widgets<BR> Add coverage exclude: moc_[^\.]+.cxx<BR> Add
coverage exclude: ui_[^\.]+.h<BR> Add coverage exclude:
qrc_[^\.]+.cxx<BR> Add coverage exclude:
Utilities.Xdmf2.libsrc.*<BR> Add coverage exclude:
Utilities.VisItBridge.avt<BR> Add coverage exclude:
Utilities.VisItBridge.CMake<BR> Add coverage exclude:
Utilities.VisItBridge.common<BR> Add coverage exclude:
Utilities.VisItBridge.databases<BR> Add coverage exclude:
Utilities.VisItBridge.include<BR> Add coverage exclude:
Utilities.VisItBridge.visit_vtk<BR> Add coverage exclude:
Utilities.protobuf<BR> Add coverage exclude: vtk.*TCLInit.cxx<BR> Add
coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx<BR> Add coverage exclude:
Utilities.kwsys<BR> Add coverage exclude: Utilities.vtksys<BR> Add
coverage exclude: Utilities.vtkmetaio<BR> Add coverage exclude:
Utilities.vtklibproj4<BR> Add coverage exclude:
Utilities.vtkalglib<BR> Add coverage exclude: Utilities.octree<BR> Add
coverage exclude: .*vtkOpenGLState.*<BR> Add coverage exclude:
.*Testing.Cxx.*cxx<BR> Add coverage exclude: .*Testing.Cxx.*h<BR> Add
coverage exclude: .*moc_.*cxx<BR>UpdateCTestConfiguration 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> Start 372:
CoProcessingTestPythonScript</FONT></DIV>
<DIV> </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
....... Passed 7.41 sec<BR>test
373<BR> Start 373:
PCoProcessingPythonScriptExample</FONT></DIV>
<DIV> </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 ...
Passed 1.99 sec</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>The following tests
passed:<BR> CoProcessingTestPythonScript<BR> PCoProcessingPythonScriptExample</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>100% tests passed, 0 tests failed out of
2</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>Total Test time (real) = 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> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV> </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 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 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 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. 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
title="http://www.paraview.org/paraview/resources/software.html 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><<A
href="mailto:peacemaker1@web.de">peacemaker1@web.de</A>></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> </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 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 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 ./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> myid =
vtkMPICommunicator::GetWorldCommunicator()->GetLocalProcessId();<BR>#endif</FONT></DIV>
<DIV><FONT size=2 face=Arial>....</FONT></DIV>
<DIV><FONT size=2 face=Arial>gridBuilder->SetSpacing(spacing);<BR>
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> </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> </DIV>
<DIV><FONT size=2 face=Arial>I already tested this on a different PC with
the same result. I hope you can help me. </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Best wishes</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Marek</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>changed Python Script:</FONT></DIV>
<DIV><FONT size=2 face=Arial>def DoCoProcessing(datadescription):<BR>
timestep = datadescription.GetTimeStep()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> grid =
datadescription.GetInputDescriptionByName("input").GetGrid()<BR>
pressure = grid.GetPointData().GetArray('Pressure')</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial># print grid</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>
#grid.GetPointData().SetScalars(pressure)<BR>
obj.SetOutput(grid)<BR># print obj</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> # 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 size=2 face=Arial> contour.Isosurfaces =
.5*(pressurerange[0]+pressurerange[1])</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> # 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 size=2 face=Arial> #set the background color<BR>
#ren.Background=[1,1,1] #white</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> #set image size<BR> #ren.ViewSize =
[1000, 1000] #[width, height]</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> #set representation<BR>
#rep.Representation="Surface"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> #save screenshot<BR>
#gridimagefilename = 'CPGrid'+str(timestep) + '.png'<BR>
#WriteImage(gridimagefilename)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> 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 size=2 face=Arial> pressureimagefilename =
'CPPressure'+str(timestep) + '.png'<BR>
WriteImage(pressureimagefilename)<BR> return</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>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 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> </DIV>
<DIV><FONT size=2 face=Arial>trivialproducer = TrivialProducer()<BR>contour =
Contour(Input=trivialproducer)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>obj =
trivialproducer.GetClientSideObject()<BR></FONT></DIV></DIV><BR>_______________________________________________<BR>Powered
by <A
title="http://www.kitware.com 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>