1 Parallel Visualization Parallel Visualization with ParaView with ParaView Ken Moreland (Sandia National Labs) Ken Moreland (Sandia National Labs) Berk Geveci (Kitware Inc.) Berk Geveci (Kitware Inc.)
11
Parallel Visualization with Parallel Visualization with ParaViewParaView
Ken Moreland (Sandia National Labs)Ken Moreland (Sandia National Labs)Berk Geveci (Kitware Inc.)Berk Geveci (Kitware Inc.)
22
What is ParaView?What is ParaView? Open-source, multi-platform Open-source, multi-platform
visualization application. visualization application. Supports distributed computation Supports distributed computation
models to process large data sets. models to process large data sets. Has an open, flexible, and intuitive Has an open, flexible, and intuitive
user interface. user interface. Extensible architecture based on Extensible architecture based on
open standards. open standards.
33
History of ParaViewHistory of ParaView
Project started in 1999Project started in 1999 Developed by Kitware, Los Developed by Kitware, Los
Alamos and Sandia National LabsAlamos and Sandia National Labs Funded by Trilabs and Army Funded by Trilabs and Army
Research LabsResearch Labs
44
Large data / scalable parallel Large data / scalable parallel processing processing
End user applicationEnd user application Application frameworkApplication framework Visualization and processing featuresVisualization and processing features Data modelsData models Open-sourceOpen-source Commercial supportCommercial support
Why use ParaView?Why use ParaView?
55
More InformationMore Information ParaView information:ParaView information:
– ParaView Guide - ParaView Guide - http://www.kitware.com/products/paraviewguide.hthttp://www.kitware.com/products/paraviewguide.htmlml
– http://http://www.paraview.orgwww.paraview.org– Mailing list - Mailing list -
http://www.paraview.org/HTML/MailingList.htmlhttp://www.paraview.org/HTML/MailingList.html– Wiki - Wiki - http://www.paraview.org/Wiki/ParaViewhttp://www.paraview.org/Wiki/ParaView– FAQ - FAQ - http://www.paraview.org/Wiki/ParaView:FAQhttp://www.paraview.org/Wiki/ParaView:FAQ
66
Basics of VisualizationBasics of Visualization Large amount of dataLarge amount of data Using pictures to understand raw Using pictures to understand raw
datadata Debugging simulationsDebugging simulations Communication/marketingCommunication/marketing Several post-processing Several post-processing
techniquestechniques
77
Basics of VisualizationBasics of Visualization Present data visuallyPresent data visually Use algorithms to process dataUse algorithms to process data Focus on important featuresFocus on important features
88
Basics of VisualizationBasics of Visualization
99
More InformationMore Information VTK information:VTK information:
– Visualization Toolkit BookVisualization Toolkit Book– VTK User’s GuideVTK User’s Guide– http://http://www.vtk.orgwww.vtk.org– Mailing listMailing list– WikiWiki– FAQFAQ
1010
Building ParaViewBuilding ParaView Use CMake Use CMake www.cmake.orgwww.cmake.org Run CMake GUI to configureRun CMake GUI to configure Run native build system to buildRun native build system to build
1111
Introduction To CMakeIntroduction To CMake On Unix (or Mac OSX) On Unix (or Mac OSX) ccmakeccmake
– Example: ccmake /src/ParaViewExample: ccmake /src/ParaView
1212
Introduction To CMakeIntroduction To CMake On Windows On Windows CMakeSetupCMakeSetup
1313
More InformationMore Information CMake information:CMake information:
– CMake BookCMake Book– www.cmake.orgwww.cmake.org– Mailing listMailing list– WikiWiki– FAQFAQ
1414
Different Running Different Running ModesModes Local Local
– paraviewparaview Client server Client server
– pvclientpvclient– pvserverpvserver
Render serverRender server– pvclient pvclient – pvdataserverpvdataserver– pvrenderserverpvrenderserver
BatchBatch– pvbatchpvbatch
1515
LocalLocal Executable: paraviewExecutable: paraview Can run on multiple processesCan run on multiple processes
– mpirun –np 2 paraviewmpirun –np 2 paraview
1616
Client/ServerClient/Server Executables: pvclient, pvserverExecutables: pvclient, pvserver pvserver processes data and pvserver processes data and
rendersrenders Data remains on serverData remains on server --reverse-connection (-rc) argument--reverse-connection (-rc) argument pvserver can run with multiple pvserver can run with multiple
processesprocesses
1717
Render ServerRender Server ExecutablesExecutables
– pvclientpvclient– pvdataserverpvdataserver– pvrenderserverpvrenderserver
Specify host on command lineSpecify host on command line Connection ID to further specify Connection ID to further specify
connectionconnection Used when large data resides on server Used when large data resides on server
with no rendering resourceswith no rendering resources
1818
Render ServerRender Server
Multiple socket connections with Multiple socket connections with data serverdata server
M->N redistribution executes on M->N redistribution executes on data server then data is data server then data is transferred to render servertransferred to render server
Geometry can optionally be sent to Geometry can optionally be sent to the client for local renderingthe client for local rendering
1919
Basic UsageBasic Usage GUIGUI Readers / writersReaders / writers Camera manipulationCamera manipulation FiltersFilters Accept / resetAccept / reset 3D widgets3D widgets
2020
GUIGUI
ToolbarSources and
filters
Parameters forcurrent filter
View Filters Center of rotation
Message box Progress bar
Error message
2121
File MenuFile Menu
2222
Loading DataLoading Data
2323
Loading Data: File Loading Data: File TypesTypes
ChomboChombo SpyPlot / CTH (.sptch)SpyPlot / CTH (.sptch) ExodusExodus Partitioned ExodusPartitioned Exodus HDF5 Raw(.h5)HDF5 Raw(.h5) Extensible Data Format (.xdmf)Extensible Data Format (.xdmf) EnSight (.case .sos)EnSight (.case .sos) Plot3D (.xyz)Plot3D (.xyz) VRML (.wrl)VRML (.wrl) Protein Data Bank (.pdb)Protein Data Bank (.pdb) XMol Molecule (.xyz)XMol Molecule (.xyz) Stereo Lithography (.stl)Stereo Lithography (.stl) BYU (.g)BYU (.g) Gaussian Cube File (.cube)Gaussian Cube File (.cube) Digital elevation map (.dem)Digital elevation map (.dem)
ParaView Data (.pvd) ParaView Data (.pvd) VTK PolyData (.vtp)VTK PolyData (.vtp) VTK Unstructured Grid (.vtu)VTK Unstructured Grid (.vtu) VTK Image (.vti)VTK Image (.vti) VTK Structured Grid (.vts)VTK Structured Grid (.vts) VTK Rectilinear (.vtr)VTK Rectilinear (.vtr) VTK Legacy (.vtk)VTK Legacy (.vtk) VTK Partitioned PolyData (.pvtp)VTK Partitioned PolyData (.pvtp) VTK Partitioned Unstructured grid VTK Partitioned Unstructured grid
(.pvtu)(.pvtu) VTK Partitioned Image (.pvti)VTK Partitioned Image (.pvti) VTK Partitioned Structured Grid VTK Partitioned Structured Grid
(.pvts) …(.pvts) …
2424
Source MenuSource Menu
2525
ParametersParameters AcceptAccept Reset Reset DeleteDelete Time step Time step
(File series)(File series) Array Array
selectionselection
2626
Auto AcceptAuto Accept
2727
InformationInformation
Data typeData type Number of Number of
cellscells Number of Number of
pointspoints BoundsBounds ExtentExtent
2828
Display OptionsDisplay Options
Representation
Shading
Wireframe Surface Points
Gouraud
Flat
2929
Color By AttributeColor By Attribute
3030
Volume RenderingVolume Rendering Only unstructured gridOnly unstructured grid Future plansFuture plans
– Structured Structured – AMRAMR– Faster algorithmsFaster algorithms
3131
Volume RenderingVolume Rendering
3232
Transfer Function Transfer Function EditorEditor
3333
Level of DetailsLevel of Details
DecimationDistributed / local rendering
Image reduction
3434
View PropertiesView Properties
Select
3535
View Properties: View Properties: Camera Camera
Axis aligned views
User defined views
User customization of
view manipulators
Reset camera
View manipulators Center of rotation
3636
View Properties: View Properties: GeneralGeneral
Background color
Parallel / Perspective
Performance
3737
Filter MenuFilter Menu
3838
FiltersFiltersFilter toolbar
Filter menu
NavigationSelection
3939
Toolbar Filters/SourcesToolbar Filters/SourcesContourCutClipThresholdExtract gridWarp vectorStream linesIntegrate flowSurface vectorsGlyph
CalculatorPick cellProbeGroupUngroupAMR outlineAMR extract partAMR surface
WaveletMeasureFractalSphereSuperquadric
4040
Contour (Iso Surface)Contour (Iso Surface)
4141
CutCut
4242
3D Widgets3D Widgets
Point WidgetPoint Widget Box Widget Box Widget Line WidgetLine Widget Plane WidgetPlane Widget Sphere WidgetSphere Widget
4343
Clip (Scalars)Clip (Scalars)
4444
Clip (Plane)Clip (Plane)
4545
Extract GridExtract Grid
4646
StreamlinesStreamlines
4747
Pick FilterPick Filter
4848
GroupGroup
Dr. Jean M. Favre, Dr. Jean M. Favre,
CSCS, Swiss Center for Scientific ComputingCSCS, Swiss Center for Scientific Computing
4949
Attribute CalculatorAttribute Calculator
Scalar menu
5050
ProbeProbe
5151
Intermediate Intermediate UsageUsage AnimationAnimation AnnotationsAnnotations Parallel operationsParallel operations
5252
AnimationAnimation Change parameters over time.Change parameters over time. Cannot animate creation/deletion Cannot animate creation/deletion
of sources/filters.of sources/filters.
5353
Animation InterfaceAnimation InterfaceAnimation Play
Control
Key Frame properties
Active Track Selector
Track Editor
5454
Creating AnimationCreating Animation Select Active Track for the Source Select Active Track for the Source
and property to animate.and property to animate. Add/Edit key frames.Add/Edit key frames.
5555
Selecting Active TrackSelecting Active Track
OR
5656
Add/Delete Key Add/Delete Key FramesFrames
OR
Add/Delete Buttons Click to add
Drag-out to remove
5757
Key Frame PropertiesKey Frame Properties Time – key frame Time – key frame
activation time.activation time. Value – property value Value – property value
on key frame on key frame activation.activation.
Interpolation – controls Interpolation – controls value interpolation value interpolation until the subsequent until the subsequent key frame.key frame.
5858
Animation ControlAnimation Control VCR-like control.VCR-like control. Controls playing of Controls playing of
animation.animation. Play ModePlay Mode
– SequenceSequence played as a sequence of frames.played as a sequence of frames. ((DurationDuration + 1) frames are rendered. + 1) frames are rendered.
– Real TimeReal Time Uses wall-clock time for playing animation.Uses wall-clock time for playing animation. Animation is played for Animation is played for DurationDuration seconds. seconds.
5959
Animate XFreqAnimate XFreq
Time: 5
Time: 10
Time: 0
6060
Recording AnimationRecording Animation Create animation on-the-fly.Create animation on-the-fly. Create all the sources/filters needed.Create all the sources/filters needed. Start recording by clicking Start recording by clicking Change Source/Filter parameter.Change Source/Filter parameter. Accept changes.Accept changes. Record changes to parameters as key Record changes to parameters as key
frames by clicking frames by clicking Stop recording by clicking Stop recording by clicking
6161
Record changes
Animate Contour Animate Contour ValuesValues
Start Recording
Record changes
Stop Recording
6262
Animate Contour Animate Contour ValuesValues
Time: 5 Time: 9Time: 2
6363
Default AnimationDefault Animation Automatically adds animation for Automatically adds animation for
datasets with timesteps.datasets with timesteps. Duration set to number of Duration set to number of
timesteps.timesteps. eg. Load data eg. Load data series_0.vtuseries_0.vtu
6464
Animation SettingsAnimation Settings Cache GeometryCache Geometry
– Use cache while playingUse cache while playing Record All PropertiesRecord All Properties
– While recording, create key frames for all While recording, create key frames for all property changes, otherwise only active track property changes, otherwise only active track property is observed.property is observed.
Show all animatable propertiesShow all animatable properties– Show all available tracks in Track Editor, Show all available tracks in Track Editor,
otherwise only a selected few are shown.otherwise only a selected few are shown.
6565
Extending ParaViewExtending ParaView New VTK filters/readers/writers…New VTK filters/readers/writers… New GUI elementsNew GUI elements New rendering techniquesNew rendering techniques Custom ClientsCustom Clients
6666
ServerManager XMLServerManager XML ParaView/Servers/ServerManager/ParaView/Servers/ServerManager/
ResourcesResources <SourceProxy name=“<SourceProxy name=“ProxyNameProxyName" class=“" class=“vtkClassvtkClass">"> <InputProperty name="Input" <InputProperty name="Input"
command="SetInput">command="SetInput"> <ProxyGroupDomain name="groups"><ProxyGroupDomain name="groups"> <Group name="sources"/><Group name="sources"/> <Group name="filters"/><Group name="filters"/> </ProxyGroupDomain></ProxyGroupDomain> <DataTypeDomain name="input_type"><DataTypeDomain name="input_type"> <DataType value=“<DataType value=“InputDataTypeInputDataType"/>"/> </DataTypeDomain></DataTypeDomain> </InputProperty></InputProperty> <IntVectorProperty name=“<IntVectorProperty name=“PropertyNamePropertyName" " command="command="SetCommandSetCommand" " number_of_elements=“number_of_elements=“numbernumber"" default_values=“default_values=“val1 val2 …val1 val2 …" > " > </IntVectorProperty> </IntVectorProperty> </SourceProxy></SourceProxy>
6767
GUI XMLGUI XML ParaView/GUI/Client/ResourcesParaView/GUI/Client/Resources
<Module name=“ProxyName" root_name=“ProxyName" module_type="Filter“ menu_name=“MenuName" long_help=“Long Help“ short_help=“Short Help"> <Filter class=“vtkClass"> <Input name="Input" class=“InputDataType"/> </Filter> <InputMenu trace_name="Input" label="Input"
property="Input" help=“Help for the input.“ input_name="Input"/> <VectorEntry label=“Label" trace_name=“TraceName" property=“PropertyName" type=“PropertyType"/> <Documentation> Documentation for the module </Documentation> </Module>
6868
Importing ModulesImporting Modules At compile timeAt compile time
– Create Create ModuleParaViewImport.cmakeModuleParaViewImport.cmake
SET (Sample_SRCS ${Sample_SOURCE_DIR}/vtkFilter1.cxx)
INCLUDE_DIRECTORIES(${Sample_SOURCE_DIR})
PARAVIEW_INCLUDE_WRAPPED_SOURCES( "${Sample_WRAPPED_SRCS}")
PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES( "${Sample_SOURCE_DIR}/ServerManagerXML.xml") PARAVIEW_INCLUDE_GUI_RESOURCES( "${Sample_SOURCE_DIR}/GUIXML.xml")
6969
Importing ModulesImporting Modules At compile timeAt compile time
– Create Create ModuleParaViewImport.cmakeModuleParaViewImport.cmake
– Create ServerManager and GUI XML Create ServerManager and GUI XML filesfiles<ModuleInterface>
<ServerManagerFile name=“ServerManagerFile.pvsm" />…</ModuleInterface>
7070
Importing ModulesImporting Modules At compile timeAt compile time
– Create ModuleParaViewImport.cmakeCreate ModuleParaViewImport.cmake– Create ServerManager and GUI XML Create ServerManager and GUI XML
filesfiles– Import into ParaViewImport into ParaView– CMake variable:CMake variable:
PARAVIEW_EXTRA_EXTERNAL_MODULEPARAVIEW_EXTRA_EXTERNAL_MODULE PARAVIEW_USE_PARAVIEW_USE_<ModuleName><ModuleName> <ModuleName><ModuleName>_SOURCE_DIR_SOURCE_DIR
7171
Importing ModulesImporting Modules At run timeAt run time
– Create CMakeLists.txtCreate CMakeLists.txtPROJECT(Sample)
FIND_PACKAGE(ParaView REQUIRED)INCLUDE(${PARAVIEW_USE_FILE})
SET(mySrcs “vtkSample.cxx")
VTK_WRAP_ClientServer(“Sample" wrappedSrcs "${mySrcs}")
ADD_LIBRARY(“Sample" MODULE ${wrappedSrcs} ${mySrcs})TARGET_LINK_LIBRARIES(“Sample" vtkClientServer vtkPVServerManager)
7272
Importing ModulesImporting Modules At run timeAt run time
– Create CMakeLists.txtCreate CMakeLists.txt– Create ServerManager and GUI XML Create ServerManager and GUI XML
filesfiles<ModuleInterface> <Library name=“SomeLibrary.so” directory=“/location/of/library” /> <ServerManagerFile name=“ServerManagerFile.pvsm" />…</ModuleInterface>
7373
Importing ModulesImporting Modules At run timeAt run time
– Create CMakeLists.txtCreate CMakeLists.txt– Create ServerManager and GUI XML filesCreate ServerManager and GUI XML files– Run CMakeRun CMake– BuildBuild– Load into ParaViewLoad into ParaView
Menu: File->Import PackageMenu: File->Import Package PV_INTERFACE_PATHPV_INTERFACE_PATH
7474
Parallel Visualization with Parallel Visualization with ParaView – Case StudyParaView – Case Study
Ken Moreland (Sandia National Labs)Ken Moreland (Sandia National Labs)Berk Geveci (Kitware Inc.)Berk Geveci (Kitware Inc.)
7575
Open a PLOT3D FileOpen a PLOT3D File Load combxyz.binLoad combxyz.bin
– Choose “All Files”Choose “All Files”– Manually select reader: PLOT3DManually select reader: PLOT3D
Select Q File: combq.binSelect Q File: combq.bin Rotate the outline using the left Rotate the outline using the left
mouse button and dragging in 3D mouse button and dragging in 3D windowwindow
7676
Open a PLOT3D FileOpen a PLOT3D File
7777
Create a Cut PlaneCreate a Cut Plane Create a cut filter with Filter -> Create a cut filter with Filter ->
CutCut Move the cut plane by interacting Move the cut plane by interacting
with the 3D widgetwith the 3D widget Choose the display tab and:Choose the display tab and:
– Color by densityColor by density– Turn on the scalar barTurn on the scalar bar
7878
Create a Cut PlaneCreate a Cut Plane
7979
Apply a Contour FilterApply a Contour Filter Select combq.bin from the selection Select combq.bin from the selection
windowwindow Turn off the visibility of the cut filter (the Turn off the visibility of the cut filter (the
eye icon on the left, in the selection eye icon on the left, in the selection window)window)
Apply contour: Filter -> ContourApply contour: Filter -> Contour Select “Compute Scalars”Select “Compute Scalars” Create 5 contoursCreate 5 contours AcceptAccept Display -> Color by densityDisplay -> Color by density
8080
Apply Contour FilterApply Contour Filter
8181
Clip the IsosurfacesClip the Isosurfaces
Try switching from selection to Try switching from selection to navigation windownavigation window
Make sure Contour0 is selectedMake sure Contour0 is selected Clip: Filter -> ClipClip: Filter -> Clip
8282
Clip the IsosurfacesClip the Isosurfaces
8383
Pick a CellPick a Cell Switch to selection windowSwitch to selection window Select combq.binSelect combq.bin Filter -> pickFilter -> pick Move the pick point by either 3D Move the pick point by either 3D
interaction or ‘p’ in 3D windowinteraction or ‘p’ in 3D window
8484
Pick a CellPick a Cell
8585
Probe With a LineProbe With a Line Delete the pick filterDelete the pick filter Filter -> ProbeFilter -> Probe Select lineSelect line AcceptAccept Move the xy plotMove the xy plot File -> Save StateFile -> Save State
8686
Probe With a LineProbe With a Line
8787
Generate StreamlinesGenerate Streamlines Delete probeDelete probe Filter -> Stream TracerFilter -> Stream Tracer Change number of streamlines to Change number of streamlines to
1010 Filter -> TubeFilter -> Tube Adjust radiusAdjust radius
8888
Generate StreamlinesGenerate Streamlines
8989
Animate the Cut PlaneAnimate the Cut Plane Turn off clipTurn off clip Turn on cutTurn on cut View -> Keyframe AnimationView -> Keyframe Animation Select Source: Cut1Select Source: Cut1 Select Property: Plane : OffsetSelect Property: Plane : Offset Add key frameAdd key frame PlayPlay
9090
Animate the Cut PlaneAnimate the Cut Plane