Supercomputing 2016 Tutorial: Large Scale Visualization With Paraview
Supercomputing 2016 Tutorial: Large Scale Visualization With Paraview
Swiss National
Supercomputing
Centre
Current ParaView Usage
•Used by academic, government, and
commercial institutions worldwide.
•Downloaded ~100K times per year.
•HPCwire Editors’ Choice 2010 and
HPCwire Readers’ Choice 2010/2012
Awards for Best Visualization Product or
Technology.
Data Ranges
•Used for all ranges of data size.
•Landmarks of usage:
–6 billion structured cells (2005).
–250 million unstructured cells (2005).
–Billions of AMR cells (2008).
–Scaling test over 1 Trillion cells (2010).
–6.33 billion unstructured cells in Catalyst
(2016).
ParaView Application Architecture
ParaView Server
VTK
Multi-block
Hierarchical Adaptive
Mesh Refinement
(AMR)
Hierarchical Uniform
Polygonal Unstructured Grid AMR
(vtkPolyData) (vtkUnstructuredGrid) Octree
More Information
•Online Help – F1
•The ParaView User’s Guide
– http://www.paraview.org/paraview-guide/
•Tutorials
–http://www.paraview.org/tutorials/
•The ParaView web page
–www.paraview.org
•ParaView mailing list
–[email protected]
Help Menu
If You Need Help
Toolbars
Pipeline Browser
3D View
Properties Panel
Advanced Toggle
Getting Back GUI Components
Creating a Cylinder Source
1. Go to the Source menu and select
Cylinder.
2. Click the Apply button to accept the
default parameters.
Simple Camera Manipulation
•Drag left, middle, right buttons for
rotate, pan, zoom.
–Also use Shift, Ctrl, Alt modifiers.
–Also try holding down x, y, or z.
Creating a Cylinder Source
1. Go to the Source menu and select
Cylinder.
2. Click the Apply button to accept the
default parameters.
3. Increase the Resolution parameter.
Toggle
Search
Advanced
Properties
Properties
Searching Properties
1. Type “specular” in the properties
search box
2. Change Specular value to 1 (makes
the cylinder shiny)
Searching Properties
1. Type “specular” in the properties
search box
2. Change Specular value to 1 (makes
the cylinder shiny)
Undo Redo
Camera Camera
Undo Redo
Creating a Cylinder Source
1. Go to the Source menu and select
Cylinder.
2. Click the Apply button to accept the
default parameters.
3. Increase the Resolution parameter.
3. Click
Data Representation
Geometry Representations
Extract Subset
Filters Menu
Quick Launch
Change to Temp
Change to 400
Apply a Filter
1. Make sure that disk_out_ref.ex2 is
selected in the pipeline browser.
2. Select the contour filter.
3. Change parameters to create an
isosurface at Temp = 400K.
4.
Create a Cutaway Surface
1. Select disk_out_ref.ex2 in the
pipeline browser.
2. From the quick launch, select
Extract Surface.
3.
Create a Cutaway Surface
1. Select disk_out_ref.ex2 in the
pipeline browser.
2. From the quick launch, select
Extract Surface.
3.
4. Create a clip filter.
5. Uncheck Show Plane.
6.
Pipeline Browser Structure
disk_out_ref.ex2
Contour1 ExtractSurface1
Clip1
Reset ParaView
Probe Location
Plotting
1. Open disk_out_ref.ex2. Load all
variables.
2. Clip, uncheck, ,
3. Select disk_out_ref.ex2.
4. Add Plot Over Line filter.
3D Widgets
Placing 3D Line Widget Endpoints
• Use the p key to place alternating points.
–Ctrl+p places at nearest mesh point.
• Use the 1 or 2 key to place the start or end
point.
–Ctrl+1 or Ctrl+2 places at mesh point.
• Drag the endpoints.
–Use x, y, or z key to constrain to axis.
• Use widgets in Properties panel
–E.g. Use Z Axis button and then edit points
to place from (0,0,0) to (0, 0, 10).
Plotting
1. Open disk_out_ref.ex2. Load all
variables.
2. Clip, uncheck, ,
3. Select disk_out_ref.ex2.
4. Add Plot Over Line filter.
5. Once line is satisfactorily located,
Interacting with Plots
•Left, middle, right buttons to pan, zoom.
•Mouse wheel to zoom.
•Reset view to plot ranges.
Plots are Views
•Move them like Views.
•Save screenshots.
Adjusting Plots
1. In Display section of properties
panel, turn off all variables except
Temp and Pres.
2. Select Pres in the Display options.
3. Change Chart Axis to
Bottom – Right.
4. Verify the relationship between
temperature and pressure.
Histogram / Bar Chart
1. Select disk_out_ref.ex2.
2. Filters → Data Analysis →
Histogram
3. Change Input Array to Temp.
4.
Reset ParaView
Pros: Cons:
• Pretty • Garish
• Good dynamic range • Bad for color blindness
• No implicit order
• Not perceptually even
Rainbow: Color Deficiencies
Rainbow: Implicit Ordering
✗
Rainbow: Implicit Ordering
Rainbow: Perceptually Uneven
Client
Data Render
Server Server
Client-Server
Data Render
Client
Server Server
Client-Render Server-Data Server
Data Render
Client
Server Server
How to Visualize Large Data?
•Run server on large machine
–Aggregate memory
–MPI for communication
Kitware binaries have MPI
but
not tuned to any particular machine
Microsoft MPI (free) not packaged
Requirements for
Installing ParaView Server
•C++
•CMake (www.cmake.org)
•MPI
•OpenGL (or Mesa3D www.mesa3d.org)
•Python +NumPy +Matplotlib (optional)
•Qt 4.7 (optional)
• http://www.paraview.org/Wiki/Setting_up_a_ParaView_Server#Compiling
Connecting to a ParaView Server
http://www.paraview.org/Wiki/Setting_up_a_ParaView_Server#Running_the_Server
Batch Parallel Processing
• parasphere.py paraview script
from paraview.simple import *
sphere = Sphere()
rep = Show()
ColorBy(rep, (’POINTS’, ’vtkProcessId’))
Render() rep.RescaleTransferFunctionToDataRange(True) Render()
WriteImage("parasphere.png")
• Run it in parallel
<path to>mpiexec -np 4 \
<path to>pvbatch parasphere.py
Batch Parallel Processing
• More generally
qsub -A <project to charge compute time to> \
-N <number of nodes> \
-n <number of processors on each node> \
mpiexec -np <N*n> \
pvbatch <arguments for pvbatch> \
script.py <arguments for Python script>
$ /Applications/paraview.app/Contents/MacOS/mpiexec -np 4 \
/Applications/paraview.app/Contents/bin/pvserver &
Waiting for client...
Connection URL: cs://kaltuel.local:11111
Accepting connection(s): kaltuel.local:11111
Interactive Parallel Processing
• Start ParaView GUI
• Connect
• Add Server
Interactive Parallel Processing
• Specify an TCP/IP path
• Just change nick name to “my computer” in this case
my computer
Interactive Parallel Processing
• pvserver already waiting, so keep Manual connection
Try a Remote Server Configuration
• Start ParaView GUI
• Connect
• Fetch Servers
Try a Remote Server Configuration
• Select one
• Import it
Try a Remote Server Configuration
• Click Connect then
• Configure session
– Local terminal and ssh exes
– ParaView version
– Remote username
– Number of nodes
– Amount of time
– Remote project
– Site specific options
• Click OK
Try a Remote Server Configuration
• Enter credentials
Original Data Subsample Rate: 2 pixels Subsample Rate: 4 pixels Subsample Rate: 8 pixels
Parallel Rendering Parameters
Edit → Settings, Render View
Parameters for Large Data
•Use display lists for GPU, off for CPU.
•Try outline instead of decimated
geometry.
–Also try lowering decimation factor.
•Avoid shipping large data back to client.
•Turn on subsampling.
•Image Compression on.
Parameters for Low Bandwidth
• Try larger subsampling rates.
•Try Zlib compression and fewer bits.
Parameters for High Latency
•Turn up Remote Render Threshold.
–Allow more data to go to client.
•Play with the LOD Threshold and LOD
Resolution to control geometry sent to
client.
•Turn on Use outline for LOD rendering if
decimated geometry too big for client.
•Try turning on interactive render delay.
Why In Situ?
System Parameter 2011 “2018” Factor
Change
System peak 2 PF 1 EF 500
Power 6 MW ≤20 MW 3
System Memory 0.3 PB 32-64 PB 33
Node Performance 0.125 Tf/s 1 TF 10 TF 8-80
Node Concurrency 12 1,000 10,000 83-830
Network BW 1.5 GB/s 100 GB/s 1,000 GB/s 66-660
System Size (nodes) 18,700 1M 100k 50
Total Concurrency 225 K 10 B 100 B 40k-400k
Storage Capacity 15 PB 300-1,000 PB 20-67
I/O BW 0.2 TB/s 20-60 TB/s 100-300
Source: “Scientific Discovery at the Exascale: Report from the DOE ASCR 2011 Workshop on Exascale Data Management, Analysis and Visualization.”
Why In Situ?
Need a supercomputer to analyze results from a hero run
ParaView
Catalyst
Output
Processed
Data
Polygonal Output
with Field Data
Statistics
Series Data
Rendered Images
Reduced File IO Costs
Time of Type of Size per Size per Time per
Processin File File 1000 time File to
g steps Write at
Simulation
Dump
Times
Post-processing In situ processing
CTH (Sandia) simulation with roughly equal data stored at simulation time
25
data generation
annotations
20
write
render
Seconds per Time Step
15
10
0
16 32 64 128 256 512 1024 2048
Cores
ParaView
range = arrayInfo.GetComponentRange(-1)
lut = servermanager.rendering.PVLookupTable()
lut.RGBPoints = [range[0], 0.0, 0.0, 1.0,
range[1], 1.0, 0.0, 0.0]
Catalyst
lut.VectorMode = "Magnitude"
repr.LookupTable = lut
repr.ColorArrayName = "displacement9"
repr.ColorAttributeType = "POINT_DATA"
Output
Processed
Data
Polygonal Output
with Field Data
Statistics
Series Data
Rendered Images
In Situ Exercise
• $PVSOURCE/Examples/Catalyst/PythonFullExample
– fedriver.py - simulation main loop
– fedatastructures.py - toy simulation kernel on regular grid
– coprocessing.py - generic adaptor that runs catalyst scripts
– gridwriter.py - Catalyst script with simple pipeline to output full grid
– cpscript.py – Catalyst script with simple pipeline to output slices
• Run it in parallel
<path to>mpiexec -np 2 \
<path to>pvbatch --symmetric \
fedriver.py gridwriter.py