<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Looks like I need to study up on PV scripting -- I'm so used to VisIt and EnSight, I was hoping the syntax would be pretty intuitive but some of what you are doing there is not clear to me, just because I'm such a newbie. &nbsp;Thanks for the clarification. I think
 this sets my mind at ease and helps my user.
<div><br>
</div>
<div>-- Rich&nbsp;<br>
<div><br>
<div>
<div>On Feb 13, 2013, at 9:18 PM, Pat Marion wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Right, the decomposition is up to the reader, so you need a reader that is &quot;parallel aware&quot;.&nbsp; If you're starting with a .pvtu file, then you should be all set.&nbsp; If you look inside the pvtu file, it should just be an xml format that lists
 all the pieces, and the pieces are .vtu.&nbsp; Each rank will read a different subset of the .vtu files.&nbsp; Since pvbatch functions just like pvserver, you&nbsp; can try your work interactively with pvserver first.&nbsp; In fact, you can connect ParaView to a parallel pvserver,
 then paste the python script line for line into ParaView's python console and you should get the same results.<br>
<br>
<br>
You can color by process ID scalars using pvbatch.&nbsp; I have script that I use for testing which does exactly that.&nbsp; Notice that the script creates a Sphere(), you could replace that with your reader.<br>
<br>
<br>
# testParallelRender.py<br>
<br>
print &quot;importing paraview.simple...&quot;<br>
from paraview.simple import *<br>
<br>
n_procs = servermanager.vtkProcessModule.GetProcessModule().GetNumberOfLocalPartitions()<br>
print &quot;number of ranks: &quot;, n_procs<br>
<br>
print &quot;create pipeline...&quot;<br>
Sphere(ThetaResolution=100, PhiResolution=100)<br>
ProcessIdScalars()<br>
UpdatePipeline()<br>
<br>
<br>
print &quot;creating view...&quot;<br>
CreateRenderView()<br>
<br>
print &quot;create reps...&quot;<br>
Show()<br>
lt = CreateLookupTable(RGBPoints=[0.0, 0, 0, 1, n_procs-1, 1, 0, 0], ColorSpace = &quot;HSV&quot;)<br>
SetDisplayProperties(ColorAttributeType=0, ColorArrayName=&quot;ProcessId&quot;, LookupTable=lt)<br>
<br>
print &quot;render...&quot;<br>
Render()<br>
<br>
GetActiveView().UseOffscreenRenderingForScreenshots = 0<br>
<br>
print &quot;writing...&quot;<br>
WriteImage(&quot;coloredSphere.png&quot;)<br>
<br>
print &quot;Done.&quot;<br>
<br>
<br>
<br>
Pat<br>
<br>
<div class="gmail_quote">On Thu, Feb 14, 2013 at 3:16 AM, Cook, Rich <span dir="ltr">
&lt;<a href="mailto:cook47@llnl.gov" target="_blank">cook47@llnl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">OK, so what I'm hearing is that the pvbatch process will use its MPI rank to decompose the data correctly.&nbsp;
<div>Does this decomposition work correctly for all data formats? &nbsp;I suspect not, so is there a way to confirm that decomposition is working for a particular type of data? &nbsp;In the GUI, I can paint the data with the process ID scalars filter. &nbsp;Any similar trick
 for pvbatch? &nbsp;</div>
<div>Thanks!</div>
<span class="HOEnZb"><font color="#888888"></font></span>
<div><span class="HOEnZb"><font color="#888888">-- Rich&nbsp;</font></span>
<div>
<div class="h5"><br>
<div><br>
<div>
<div>On Feb 12, 2013, at 11:31 PM, Pat Marion wrote:</div>
<br>
<blockquote type="cite">Hi Rich,<br>
<br>
The command line will be:<br>
<br>
mpirun -np 1 /path/to/pvbatch /path/to/script.py<br>
<br>
<br>
The pvbatch executable is similar to pvserver, except proc 0 doesn't wait for a client connection, it reads the python script specified on the command line and executes the script as if it were instructions from a client.&nbsp; The script will be read and interpreted
 on proc 0, but the processing will be carried out by all the satellite procs, just like pvserver.<br>
<br>
I'd recommend starting with a script that is very simple, like:<br>
<br>
# testSphere.py<br>
<br>
from paraview.simple import *<br>
<br>
Sphere()<br>
writer = XMLPPolyDataWriter(FileName='sphere.pvtp')<br>
writer.UpdatePipeline()<br>
<br>
<br>
Try getting that to work using -np 1, then try -np 2, you should find pieces of there sphere written by both processes.<br>
<br>
Pat<br>
<br>
p.s. If your data is unstructured grid, then your writer would be a XMLPUnstructuredGridWriter.&nbsp; Also, I'm not sure if the name should be &quot;XMLP...&quot; or &quot;XMLPartitioned...&quot;<br>
<br>
<br>
<div class="gmail_quote">On Wed, Feb 13, 2013 at 11:48 AM, Cook, Rich <span dir="ltr">
&lt;<a href="mailto:cook47@llnl.gov" target="_blank">cook47@llnl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello, ParaView genii,<br>
<br>
I would like to run ParaView to view some data in parallel using the following script from a user as a basis. &nbsp;I'm not sure how to do this right. &nbsp;I've never scripted Paraview before, and am thus clueless how to make it work. &nbsp;Can someone on this list tell
 me how Paraview scripting with MPI works or point me to a tutorial on your massive tutorial pages? &nbsp;The data is very large and it would be great to decompose the data across the cluster.<br>
<br>
Thanks!<br>
<br>
try: paraview.simple<br>
except: from paraview.simple import *<br>
paraview.simple._DisableFirstRenderCameraReset()<br>
<br>
filein = XMLPartitionedUnstructuredGridReader( FileName=['/p/lscratchd/bodart1/test_para/duct.020000.pvtu'] )<br>
<br>
Slice1 = Slice( SliceType=&quot;Plane&quot; )<br>
<br>
Slice1.SliceOffsetValues = [0.0]<br>
Slice1.SliceType.Origin = [0.0,0.0,0.0]<br>
Slice1.SliceType.Normal = [0.0,0.0,1.0]<br>
Slice1.SliceType = &quot;Plane&quot;<br>
<br>
CleantoGrid1 = CleantoGrid()<br>
<br>
<br>
CellDatatoPointData1 = CellDatatoPointData()<br>
<br>
w.FileName=&quot;test_slice.vtu&quot;<br>
w.UpdatePipeline()<br>
<br>
<br>
--<br>
✐Richard Cook<br>
✇ Lawrence Livermore National Laboratory<br>
Bldg-453 Rm-4024, Mail Stop L-557<br>
7000 East Avenue, &nbsp;Livermore, CA, 94550, USA<br>
☎ (office) <a href="tel:%28925%29%20423-9605" value="&#43;19254239605" target="_blank">
(925) 423-9605</a><br>
☎ (fax) <a href="tel:%28925%29%20423-6961" value="&#43;19254236961" target="_blank">(925) 423-6961</a><br>
---<br>
Information Management &amp; Graphics Grp., Services &amp; Development Div., Integrated Computing &amp; Communications Dept.<br>
(opinions expressed herein are mine and not those of LLNL)<br>
<br>
<br>
<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>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:13px;white-space:normal;font-family:Monaco;word-spacing:0px">
<div>--&nbsp;</div>
<div>✐Richard Cook&nbsp; &nbsp;</div>
<div>✇ Lawrence Livermore National Laboratory</div>
<div>Bldg-453 Rm-4024, Mail Stop L-557 &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>7000 East Avenue,&nbsp; Livermore, CA, 94550, USA</div>
<div>☎ (office) <a href="tel:%28925%29%20423-9605" value="&#43;19254239605" target="_blank">
(925) 423-9605</a> &nbsp; &nbsp;</div>
<div>☎ (fax)&nbsp;<a href="tel:%28925%29%20423-6961" value="&#43;19254236961" target="_blank">(925) 423-6961</a></div>
<div>---</div>
<div>Information Management &amp; Graphics Grp., Services &amp; Development Div., Integrated Computing &amp; Communications Dept.</div>
<div>(opinions expressed herein are mine and not those of LLNL)</div>
<br>
</span></span></span></span></span></span></span><br>
</span></span></div>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
<div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Monaco; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">
<div>--&nbsp;</div>
<div>✐Richard Cook&nbsp; &nbsp;</div>
<div>✇ Lawrence Livermore National Laboratory</div>
<div>Bldg-453 Rm-4024, Mail Stop L-557 &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>7000 East Avenue,&nbsp; Livermore, CA, 94550, USA</div>
<div>☎ (office) (925) 423-9605 &nbsp; &nbsp;</div>
<div>☎ (fax)&nbsp;(925) 423-6961</div>
<div>---</div>
<div>Information Management &amp; Graphics Grp., Services &amp; Development Div., Integrated Computing &amp; Communications Dept.</div>
<div>(opinions expressed herein are mine and not those of LLNL)</div>
<br class="Apple-interchange-newline">
</span></span></span></span></span></span></span><br class="Apple-interchange-newline">
</span></span></div>
<br>
</div>
</div>
</body>
</html>