Hi Sebastien,

here you can find the main parts of the script.


--------------------------------------------------------------------------------------------------------------------------------
/try: paraview.simple//
//except: from paraview.simple import *//
//paraview.simple._DisableFirstRenderCameraReset()//
//
//RenderView1 = CreateRenderView()//
//
//##### Lights//options
//
//##### Screen//options/

///##### Set scale parameters//
//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 )//
//a1_Cp_PiecewiseFunction = CreatePiecewiseFunction()//
//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] )//
//
////##### Legend position//
//GetRenderView().Representations.append(ScalarBarWidgetRepresentation1)//
//
//##### Time//
//RenderView1 = GetRenderView()//
//AnimationScene1 = GetAnimationScene()//
//AnimationScene1.EndTime = 2500//
//AnimationScene1.AnimationTime = 2500//
//RenderView1.ViewTime = 2500//
//
//##### Open the model: volume mesh//
//foam_foam = OpenFOAMReader( FileName='../case.foam' )//
//foam_foam.CellArrays = ['Cp']//
//foam_foam.CaseType = 'Reconstructed Case'//
//foam_foam.MeshRegions = ['internalMesh']//
/
/DataRepresentation2 = Show()//
//DataRepresentation2.ScalarOpacityUnitDistance = 0.01//
//DataRepresentation2.Representation = 'Outline'//
//DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5]//
//DataRepresentation2.Visibility = 0//
//
//##### Slice//
//
//RenderView1.CameraViewUp = [0.0, 1.0, 0.0]//
//RenderView1.CameraPosition = [1.5, 0.3, 18]//
//RenderView1.CameraFocalPoint = [///1.5, 0.3, 1/]//
//RenderView1.CameraClippingRange = [18, 18]//
//RenderView1.CameraParallelScale = 0.9//
//
//SetActiveSource(foam_foam)//
//
//Slice1 = Slice( SliceType="Plane" )//
//Slice1.SliceOffsetValues = [0.0]//
//Slice1.SliceType.Origin = [0, 0, 0]//
//Slice1.SliceType.Normal = [0, 0, 1]//
//Slice1.SliceType = "Plane"//
//DataRepresentation3 = Show()//
//DataRepresentation3.Visibility = 1//
//DataRepresentation3.EdgeColor = [0.0, 0.0, 0.5]//
//DataRepresentation3.ColorArrayName = 'Cp'//
//DataRepresentation3.LookupTable = a1_Cp_PVLookupTable//
//
//##### Animation Time//
//RenderView1 = GetRenderView()//
//AnimationScene1 = GetAnimationScene()//
//AnimationScene1.EndTime = 2500//
//AnimationScene1.AnimationTime = 2500//
//RenderView1.ViewTime = 2500//
//AnimationScene1.PlayMode = 'Sequence'//
//AnimationScene1.NumberOfFrames =10//
//
//KeyFrameAnimationCue3 = GetAnimationTrack( 'Origin', 2, proxy=Slice1.SliceType)//
//KeyFrame1111 = CompositeKeyFrame( KeyValues=[0] )//
//KeyFrame2222 = CompositeKeyFrame( KeyTime=1.0, KeyValues=[1.4] )//
//TimeAnimationCue1 = GetTimeTrack()//
//TimeAnimationCue1.UseAnimationTime = 0//
//KeyFrame3333 = CompositeKeyFrame( KeyTime=1.0, KeyValues=[2500] )//
//KeyFrame4444 = CompositeKeyFrame( KeyValues=[2500] )//
//KeyFrameAnimationCue3.KeyFrames = [ KeyFrame1111, KeyFrame2222 ] //
//TimeAnimationCue1.KeyFrames = [ KeyFrame3333, KeyFrame4444 ]//
//
//
//##### Write//
//
//WriteAnimation('Cp.png', Magnification=1, Quality=2, FrameRate=1.000000)//
//
//##### End//
//Render()/

--------------------------------------------------------------------------------------------------------------------------------

Hope this can help you to understand the problem!

Thanks for the availability!
Daniele











On 06/05/2014 07:04 PM, Sebastien Jourdain wrote:
Is it using the VTK classes or the paraview Proxy?

Moreover, the reader/source is responsible to distribute the data to properly handle parallelism.
If it does not, then you right, everything will happen on the root node.

Hense a quick look at the script can help us determine which part need to change in order to truly use parallel processing.

Seb


On Thu, Jun 5, 2014 at 8:32 AM, Daniele Obiso <[email protected] <mailto:[email protected]>> wrote:

    Hi Sebastien,

    thanks for the reply!

    The script is about creating slice and sweep animation. But it's
    working fine, i think there is no problem in it.
    Do you need the script to understand something about the
    parallelization?

    Let me know!
    Daniele





    On 06/05/2014 04:17 PM, Sebastien Jourdain wrote:
    Hi Daniele,

    can you share what your script look like?

    Seb



    On Thu, Jun 5, 2014 at 1:56 AM, Daniele Obiso
    <[email protected]
    <mailto:[email protected]>> wrote:

        Hi All,

        i'm writing here because i would understand better the
        functionality of pvbatch in Paraview.

        At moment i'm able to run Paraview in batch launching a
        python script, and it works good.

        Here the line command i launch:
        
_//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 /_

        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 /-np 2/ or even
        /-np1/ nothing changes in terms of computing time.
        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?




        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
        --/use-offscreen-rendering/. Could someone clarify also this
        point?

        Thank you all in advance!
        Daniele



        _______________________________________________
        Powered by www.kitware.com <http://www.kitware.com>

        Visit other Kitware open-source projects at
        http://www.kitware.com/opensource/opensource.html

        Please keep messages on-topic and check the ParaView Wiki at:
        http://paraview.org/Wiki/ParaView

        Follow this link to subscribe/unsubscribe:
        http://www.paraview.org/mailman/listinfo/paraview





_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to