<div dir="ltr">Ok, so you are correctly using everything.<div>The question is now on the <i style="font-size:13px;font-family:arial,sans-serif">OpenFOAMReader and if it properly use MPI to read and distribute the data.</i></div>
<div><i style="font-size:13px;font-family:arial,sans-serif">Which unfortunately I don't know.</i></div><div><br></div><div><font face="arial, sans-serif"><i>If you want to force a redistribution of your data across your nodes, you can use the D3 filter just after your reader.</i></font></div>
<div><br></div><div><font face="arial, sans-serif"><i>Seb</i></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 5, 2014 at 11:44 AM, Daniele Obiso <span dir="ltr"><<a href="mailto:daniele.obiso@phitecingegneria.it" target="_blank">daniele.obiso@phitecingegneria.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Sebastien,<br>
<br>
here you can find the main parts of the script.<br>
<br>
<br>
--------------------------------------------------------------------------------------------------------------------------------<br>
<i>try: paraview.simple</i><i><br>
</i><i>except: from paraview.simple import *</i><i><br>
</i><i>paraview.simple._DisableFirstRenderCameraReset()</i><i><br>
</i><i><br>
</i><i>RenderView1 = CreateRenderView()</i><i><br>
</i><i><br>
</i><i>##### Lights</i><i> options<br>
</i><i><br>
</i><i>##### Screen</i><i> options</i><br>
<br>
<i></i><i>##### Set scale parameters</i><i><br>
</i><i>a1_Cp_PVLookupTable = GetLookupTableForArray( "Cp", 3,
RGBPoints=[-1, 0.0, 0.0, 1.0, 0.75, 1.0, 0.0, 0.0],
VectorMode='Magnitude', NanColor=[0.498039, 0.498039, 0.498039],
NumberOfTableValues=100, ColorSpace='HSV', LockScalarRange=1 )</i><i><br>
</i><i>a1_Cp_PiecewiseFunction = CreatePiecewiseFunction()</i><i><br>
</i><i>ScalarBarWidgetRepresentation1 =
CreateScalarBar(Position=[0.33, 0.95], Title='Cp [-]',
Orientation = 'Horizontal', Position2=[0.4, 0.04], Enabled=1,
LabelFontSize=12, LabelColor=[0.0, 0.0, 0.0],
LookupTable=a1_Cp_PVLookupTable, TitleFontSize=12,
TitleColor=[0.0, 0.0, 0.0] )</i><i><br>
</i><i><br>
</i><i></i><i>##### Legend position</i><i><br>
</i><i>GetRenderView().Representations.append(ScalarBarWidgetRepresentation1)</i><i><br>
</i><i><br>
</i><i>##### Time</i><i><br>
</i><i>RenderView1 = GetRenderView()</i><i><br>
</i><i>AnimationScene1 = GetAnimationScene()</i><i><br>
</i><i>AnimationScene1.EndTime = 2500</i><i><br>
</i><i>AnimationScene1.AnimationTime = 2500</i><i><br>
</i><i>RenderView1.ViewTime = 2500</i><i><br>
</i><i><br>
</i><i>##### Open the model: volume mesh</i><i><br>
</i><i>foam_foam = OpenFOAMReader( FileName='../case.foam' )</i><i><br>
</i><i>foam_foam.CellArrays = ['Cp']</i><i><br>
</i><i>foam_foam.CaseType = 'Reconstructed Case'</i><i><br>
</i><i>foam_foam.MeshRegions = ['internalMesh']</i><i><br>
</i><br>
<i>DataRepresentation2 = Show()</i><i><br>
</i><i>DataRepresentation2.ScalarOpacityUnitDistance = 0.01</i><i><br>
</i><i>DataRepresentation2.Representation = 'Outline'</i><i><br>
</i><i>DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5]</i><i><br>
</i><i>DataRepresentation2.Visibility = 0</i><i><br>
</i><i><br>
</i><i>##### Slice</i><i><br>
</i><i><br>
</i><i>RenderView1.CameraViewUp = [0.0, 1.0, 0.0]</i><i><br>
</i><i>RenderView1.CameraPosition = [1.5, 0.3, 18]</i><i><br>
</i><i>RenderView1.CameraFocalPoint = [</i><i><i>1.5, 0.3, 1</i>]</i><i><br>
</i><i>RenderView1.CameraClippingRange = [18, 18]</i><i><br>
</i><i>RenderView1.CameraParallelScale = 0.9</i><i><br>
</i><i><br>
</i><i>SetActiveSource(foam_foam)</i><i><br>
</i><i><br>
</i><i>Slice1 = Slice( SliceType="Plane" )</i><i><br>
</i><i>Slice1.SliceOffsetValues = [0.0]</i><i><br>
</i><i>Slice1.SliceType.Origin = [0, 0, 0]</i><i><br>
</i><i>Slice1.SliceType.Normal = [0, 0, 1]</i><i><br>
</i><i>Slice1.SliceType = "Plane"</i><i><br>
</i><i>DataRepresentation3 = Show()</i><i><br>
</i><i>DataRepresentation3.Visibility = 1</i><i><br>
</i><i>DataRepresentation3.EdgeColor = [0.0, 0.0, 0.5]</i><i><br>
</i><i>DataRepresentation3.ColorArrayName = 'Cp'</i><i><br>
</i><i>DataRepresentation3.LookupTable = a1_Cp_PVLookupTable</i><i><br>
</i><i><br>
</i><i>##### Animation Time</i><i><br>
</i><i>RenderView1 = GetRenderView()</i><i><br>
</i><i>AnimationScene1 = GetAnimationScene()</i><i><br>
</i><i>AnimationScene1.EndTime = 2500</i><i><br>
</i><i>AnimationScene1.AnimationTime = 2500</i><i><br>
</i><i>RenderView1.ViewTime = 2500</i><i><br>
</i><i>AnimationScene1.PlayMode = 'Sequence'</i><i><br>
</i><i>AnimationScene1.NumberOfFrames =10</i><i><br>
</i><i><br>
</i><i>KeyFrameAnimationCue3 = GetAnimationTrack( 'Origin', 2,
proxy=Slice1.SliceType)</i><i><br>
</i><i>KeyFrame1111 = CompositeKeyFrame( KeyValues=[0] )</i><i><br>
</i><i>KeyFrame2222 = CompositeKeyFrame( KeyTime=1.0,
KeyValues=[1.4] )</i><i><br>
</i><i>TimeAnimationCue1 = GetTimeTrack()</i><i><br>
</i><i>TimeAnimationCue1.UseAnimationTime = 0</i><i><br>
</i><i>KeyFrame3333 = CompositeKeyFrame( KeyTime=1.0,
KeyValues=[2500] )</i><i><br>
</i><i>KeyFrame4444 = CompositeKeyFrame( KeyValues=[2500] )</i><i><br>
</i><i>KeyFrameAnimationCue3.KeyFrames = [ KeyFrame1111,
KeyFrame2222 ] </i><i><br>
</i><i>TimeAnimationCue1.KeyFrames = [ KeyFrame3333, KeyFrame4444
]</i><i><br>
</i><i><br>
</i><i><br>
</i><i>##### Write</i><i><br>
</i><i><br>
</i><i>WriteAnimation('Cp.png', Magnification=1, Quality=2,
FrameRate=1.000000)</i><i><br>
</i><i><br>
</i><i>##### End</i><i><br>
</i><i>Render()</i><br>
<br>
--------------------------------------------------------------------------------------------------------------------------------<br>
<br>
Hope this can help you to understand the problem!<br>
<br>
Thanks for the availability!<span class="HOEnZb"><font color="#888888"><br>
Daniele</font></span><div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 06/05/2014 07:04 PM, Sebastien Jourdain wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">Is it using the VTK classes or the paraview Proxy?
<div><br>
<div>Moreover, the reader/source is responsible to distribute
the data to properly handle parallelism.</div>
<div>If it does not, then you right, everything will happen on
the root node.</div>
</div>
<div><br>
</div>
<div>Hense a quick look at the script can help us determine
which part need to change in order to truly use parallel
processing.</div>
<div><br>
</div>
<div>Seb</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jun 5, 2014 at 8:32 AM, Daniele
Obiso <span dir="ltr"><<a href="mailto:daniele.obiso@phitecingegneria.it" target="_blank">daniele.obiso@phitecingegneria.it</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Sebastien,<br>
<br>
thanks for the reply!<br>
<br>
The script is about creating slice and sweep animation.
But it's working fine, i think there is no problem in
it. <br>
Do you need the script to understand something about the
parallelization?<br>
<br>
Let me know!<span><font color="#888888"><br>
Daniele</font></span>
<div>
<div><br>
<br>
<br>
<br>
<br>
On 06/05/2014 04:17 PM, Sebastien Jourdain wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">Hi Daniele,
<div><br>
</div>
<div>can you share what your script look like?</div>
<div><br>
</div>
<div>Seb</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jun 5, 2014 at
1:56 AM, Daniele Obiso <span dir="ltr"><<a href="mailto:daniele.obiso@phitecingegneria.it" target="_blank">daniele.obiso@phitecingegneria.it</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi All,<br>
<br>
i'm writing here because i would understand
better the functionality of pvbatch in
Paraview.<br>
<br>
At moment i'm able to run Paraview in batch
launching a python script, and it works
good.<br>
<br>
Here the line command i launch:<br>
<u><i>/software/Paraview/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/mpirun
-np 6
/software/Paraview/ParaView-3.12.0-Linux-x86_64/bin/pvbatch
python_script.py </i></u><br>
<br>
The problem is that monitoring at processors
loads and memory consumption, it seems that
it's actually working on one single
processor; in fact if i switch to <i>-np 2</i>
or even <i>-np1</i> nothing changes in
terms of computing time.<br>
This is happening with various Paraview
versions (3.10 -3.12-4.1); is there
something missing in the line command? Some
other options? Are some Paraview filters
just working as serial?<br>
<br>
<br>
<br>
<br>
Another question would be about running
pvbatch on clusters without graphic cards: i
know it's possible, compiling Paraview with
OSMesa, and adding in the command line the
option <br>
--<i>use-offscreen-rendering</i>. Could
someone clarify also this point?<br>
<br>
Thank you all in advance!<span><font color="#888888"><br>
Daniele<br>
<br>
<br>
</font></span></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>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>