Right, the decomposition is up to the reader, so you need a reader that is &quot;parallel aware&quot;.  If you&#39;re starting with a .pvtu file, then you should be all set.  If you look inside the pvtu file, it should just be an xml format that lists all the pieces, and the pieces are .vtu.  Each rank will read a different subset of the .vtu files.  Since pvbatch functions just like pvserver, you  can try your work interactively with pvserver first.  In fact, you can connect ParaView to a parallel pvserver, then paste the python script line for line into ParaView&#39;s python console and you should get the same results.<br>

<br><br>You can color by process ID scalars using pvbatch.  I have script that I use for testing which does exactly that.  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&#39;m hearing is that the pvbatch process will use its MPI rank to decompose the data correctly. 
<div>Does this decomposition work correctly for all data formats?  I suspect not, so is there a way to confirm that decomposition is working for a particular type of data?  In the GUI, I can paint the data with the process ID scalars filter.  Any similar trick
 for pvbatch?  </div>
<div>Thanks!</div><span class="HOEnZb"><font color="#888888">
</font></span><div><span class="HOEnZb"><font color="#888888">-- Rich </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&#39;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.  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&#39;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=&#39;sphere.pvtp&#39;)<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.  Also, I&#39;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.  I&#39;m not sure how to do this right.  I&#39;ve never scripted Paraview before, and am thus clueless how to make it work.  Can someone on this list tell
 me how Paraview scripting with MPI works or point me to a tutorial on your massive tutorial pages?  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=[&#39;/p/lscratchd/bodart1/test_para/duct.020000.pvtu&#39;] )<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,  Livermore, CA, 94550, USA<br>
☎ (office) <a href="tel:%28925%29%20423-9605" value="+19254239605" target="_blank">(925) 423-9605</a><br>
☎ (fax) <a href="tel:%28925%29%20423-6961" value="+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>-- </div>
<div>✐Richard Cook   </div>
<div>✇ Lawrence Livermore National Laboratory</div>
<div>Bldg-453 Rm-4024, Mail Stop L-557        </div>
<div>7000 East Avenue,  Livermore, CA, 94550, USA</div>
<div>☎ (office) <a href="tel:%28925%29%20423-9605" value="+19254239605" target="_blank">(925) 423-9605</a>    </div>
<div>☎ (fax) <a href="tel:%28925%29%20423-6961" value="+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>