Dr. Marcus D. Hanwell [email protected]
Salishan Conference Gleneden Beach, OR
28 April, 2016
1
Open, Reproducible HPC Data Analysis and Visualization: Minimizing Data Movement
Kitware,)Inc.)• Founded)in)1998)by)five)former)GE)Research)employees)• 114)current)employees;)40)with)PhDs)• Privately)held,)profitable)from)creaGon,)no)debt)• Offices)
– CliKon)Park,)NY)– Carrboro,)NC)– Santa)Fe,)NM)– Lyon,)France)
2
• 2011 Small Business Administration’s Tibbetts Award
• HPCWire Readers and Editor’s Choice
• Inc’s 5000 List since 2008
Kitware’s)customers)&)collaborators)Over)75)academic'insGtuGons)including…)• Harvard)• MassachuseYs)InsGtute)of)Technology)• University)of)California,)Berkeley)• Stanford)University)• California)InsGtute)of)Technology)• Imperial)College)London)• Johns)Hopkins)University)• Cornell)University)• Columbia)University)• Robarts)Research)InsGtute)• University)of)Pennsylvania)• Rensselaer)Polytechnic)InsGtute)• University)of)Utah)• University)of)North)Carolina)
Over 50 government agencies and labs including… • National Institutes of Health (NIH) • National Science Foundation (NSF) • National Library of Medicine (NLM) • Department of Defense (DOD) • Department of Energy (DOE) • Defense Advanced Research
Projects Agency (DARPA) • Army Research Lab (ARL) • Air Force Research Lab (AFRL) • Sandia (SNL) • Los Alamos National Labs (LANL) • Argonne (ANL) • Oak Ridge (ORNL) • Lawrence Livermore (LLNL)
Over 100 commercial companies in fields including… • Automotive • Aircraft • Defense • Energy technology • Environmental sciences • Finance • Industrial inspection • Oil & gas • Pharmaceuticals • Publishing • 3D Mapping • Medical devices • Security • Simulation
4
Going)From)Data)to)VisualizaGon)
5
The)VisualizaGon)Toolkit)• Founded)in)1993)as)example)code)for)“The)VisualizaGon)Textbook”)
• Used)in)many)projects)developed)all)over)the)world:)– ParaView,)VisIt)– Osirix,)3D)Slicer)– Mayavi,)MOOSE)
6
ParaView)–)Parallel)VisualizaGon)• Open)source,)BSD)licensed)• Turngkey)applicaGon)wrapper)around)VTK)• Parallel)data)processing)and)rendering)
http://www.paraview.org/
Reader)
Contour)
White)Box)
Reader)
Contour)
White)Box)
MPI)X/N))GB) X/N)GB)
N)component)Data)Parallelism)for)X)GByte)
…)
Render)Server)Render)Server)Render)Server)Render)Server)
Client)Data)Server)Data)Server)Data)Server)Data)Server)Data)Server)Data)Server)
Depth Composite
Tile Display
Control, Display and Rendering of Small Data
VTK/ParaView)VisualizaGons)
9
HPC Visualization
Large Displays and Virtual Reality
Mobile Visualization
Interactive Medical Application and Visualization
VTK)Rendering)Rewrite)• New)minimum)OpenGL)version)
– OpenGL)2.1,)OpenGL)ES)2.0)• Rewrite)to)use)minimal)common)subset)• Major)overhaul)of)the)rendering)code)
– Use)VBOs,)VAOs,)shaders,)“new”)OpenGL)• Retain)same)high)level)VTK)API)
10
VTK)Performance)Improvements)• OpenGL)rendering)rewriYen)–)OpenGL)2.1+)• In)many)cases)now)GPU)bound)
– Previously)large)systems)CPU)bound)• Large)polygonal)models)>100x)faster!)• Reduced)memory)footprint)significantly)• IniGal)render)Gmes)reduced)
11
Benchmarking)Tools)(Polygonal))• Added)some)new)benchmarking)tools)• Aim)to)provide)systemaGc)comparison)
12
Time)For)First)Frame)(K6000))
0)
2)
4)
6)
8)
10)
12)
14)
16)
1)million) 5)million) 20)million) 30)million)
Time'(s)'
Triangles'
Legacy)
Rewrite)
13
Time)for)Subsequent)Frames)(K6000))
0)
0.5)
1)
1.5)
2)
2.5)
3)
3.5)
1)million) 5)million) 20)million) 30)million)
Time'(s)'
Triangles'
Legacy)
Rewrite)
14
Comparison)of)Cards)(Rewrite))
15
0)0.5)1)
1.5)2)
2.5)3)
3.5)
1) 2) 3) 5) 10) 20) 30) 50) 100) 200)
Triangles'p
er'Secon
d'(B)'
Number'of'Triangles'(M)'
K2200)
K5200)
K6000)
VisualizaGon)on)HPC)• Hardware)accelerated)rendering)without)X)
– NVIDIA)hardware)with)EGL)API)• Accelerated)soKware)rendering)
– Intel)OpenSWR)improved)speed)over)Mesa)
• Other)approaches)for)acceleraGon/rendering)– Intel)OSPRay,)NVIDIA)IndeX)
16
Exascale)is)Coming…)• ComputaGonal)power)outstripping)I/O)• Moving)to)more)in#situ'approaches)
– Closer)integraGon)with)simulaGon)codes)– Minimize)ongnode)and)intergnode)data)movement)
• When)do)we)process)data?)– At)compleGon,)point)of)generaGon,)burst)buffers,)?)
17
ParaView)Catalyst)Architecture)
ParaView Catalyst
Python Wrappings
ParaView Server Parallel Abstractions and Controls
VTK Core Visualization Algorithms
18
)SimulaGon)
))))
Disk)Storage)
VisualizaGon)
)))
SimulaGon)))))))Disk)
Storage)
VisualizaGon)
Separate MPI
Running)SimulaGon)with)Catalyst)
In Situ In Transit 19
Why)In'Situ?)
))))))))))))))))))))))))))))))))
20
Need a supercomputer to analyze results from a hero run 2 orders of magnitude difference between each level
Access)to)More)Data)
21
Post-processing In situ processing CTH (Sandia) simulation with roughly equal data stored at simulation time Reflections and shadows added in post-processing for both examples
Dump)Times)
Quick)and)Easy)RungTime)Checks)
MPAS-O (LANL) simulation MPAS-O (LANL) simulation
MPAS-O (LANL) simulation
Faster)Time)to)SoluGon)
CTH)(Sandia))simulaGons)comparing)different)workflows)23
0
5
10
15
20
25
16 32 64 128 256 512 1024 2048
Sec
onds
per
Tim
e S
tep
Cores
data generation annotations write render cell to point contour
Small)RungTime)Overhead)
XRAGE (LANL) simulation 24
Reduced)File)IO)Costs)Time'of'Processing'
Type'of'File' Size'per'File' Size'per'1000'?me'steps'
Time'per'File'to'Write'at'Simula?on'
Post) Restart) 1,300)MB) 1,300,000)MB) 1g20)seconds)
Post) Ensight)Dump)
200)MB) 200,000)MB) >)10)seconds)
In'Situ'' PNG) .25)MB) 250)MB) <)1)second)
XRAGE (LANL) simulation 25
SimulaGon,)Adaptor)and)Catalyst)InteracGons)
• Typically)3)calls)between)simulaGon)code)and)adaptor)
– IniGalize())• MPI)communicator)(opGonal))• Add)analysis)scripts)
– CoProcess())• Does)the)work)(potenGally))
– Finalize())• InformaGon)provided)by)solver)to)adaptor)
– Time,)Gme)step,)force)output)– Grids)and)fields)
• InformaGon)provided)by)adaptor))– Pipelines)to)execute)– Time,)Gme)step,)force)output)– Grid)and)fields)when)needed)– MPI)communicator)
• InformaGon)provided)by)Catalyst))– If)cogprocessing)needs)to)be)done)– What)grids)and)fields)are)needed)
• User)data)can)be)shared)both)ways)
Solver Adaptor
CoProcess)Flow)• Called)every)Gme)
step)• Negligible)compute)
Gme)if)no)output)is)requested)
• Only)create)VTK)objects)if)there)is)in'situ'work)
SimulaGon)
CoProcess(grid, fields, time, timeStep)
Catalyst)Adaptor)
RequestDataDescription(description)
hasWork
CreateGridAndFields()
CoProcess(description)
opt hasWork
Going)to)Exascale)• Freeze)Python)• Process)0)reads)
Python)script)and)broadcasts)to)other)processes)
• Don’t)generate).pyc)files)
• PHASTA)run)with)256K)MPI)ranks)on)Mira)at)ANL)(BG/Q)))
Where)is)Catalyst)Used?)
29
CAM5)–)atmospheric)modeling,)UCAR)HydraFTH'–)nuclear)reactor)thermal)hydraulics,)LANL)and)CASL)MPASFOcean)–)ocean)simulaGon,)LANL)and)NCAR)HELIOS)–)rotorcraK)simulaGon,)DOD)PHASTA)–)NaviergStokes,)UC)Boulder)Code_Saturne)–)NaviergStokes)equaGons,)EDF)RAGE)–)hydrodynamics,)LANL)Calore)–)heat)transfer,)SNL)Zapotec)–)coupled)mechanics/fluids,)SNL)))))
CTH–)solid)mechanics,)SNL)Alegra)–)shock)physics,)SNL)Albany)–)mulGgphysics,)SNL)Sparta)–)DSMC,)SNL)Nalu)–)NaviergStokes)equaGons,)SNL)Aero)–)NaviergStokes)equaGons,)SNL)Adagio)–)solid)mechanics,)SNL)UH3D)–)plasma)simulaGon,)SciberQuest)VPIC)–)plasma)simulaGon,)LANL)Aria)–)NaviergStokes)equaGons,)SNL)Fuego)–)combusGon,)SNL))))
Changing)Face)of)HPC)• HPC)is)geyng)more)complex)
– GPGPU)– Manygcore)– Burst)buffers)– Persistent)memory)stores)
• MPI)per)core)will)not)yield)best)performance)
30
What)We)Program)For)
31
What)We)Don’t)Program)For)
32
What)We)Don’t)Program)For)
33
Why)VTKgm?)GPU'(NVIDIA)'• Subgarchitectures:)
– Fermi,)Kepler,)Maxwell,)Pascal)• MulGple)Memory)Types:)
– Global,)shared,)constant,)texture)
• Limited)Memory)Size)• 1000s)of)threads)
– Grids,)blocks,)and)warps)
CPU/MIC'• MulGple)ISAs:)
– Vector)unit)widths:)2,4,8)/)16)• Single)Memory)Type)
– Except)for)cache)&)HSM)• “Unlimited”)Memory)Size)• Up)to)60/260)threads)
– No)explicit)organizaGon)• Except)for)Xeon)Phi)KNL?)
)
Current)Trends)
35
Jaguar'–'XT5' Titan'–'XK7' Exascale*'
Cores) 224,256) 299,008)CPU)and)18,688)GPU)
1)billion)
Concurrency) 224,256)way) 70)–)500)million)way) 10)–)100)billion)way)
Memory) 300)Terabytes) 700)Terabytes) 128)Petabytes)
VTKgm)• Collaborate,)contribute,)and)leverage)threaded)algorithms)• SimulaGon)codes)use)parallel)analysis)and)visualizaGon)• Algorithms)on)all)nextggeneraGon)hardware)• Data)parallel)primiGves)provide)an)abstracGon)layer)
))
)))
VTKgm)Architecture)
IngSitu)
ExecuGon)Data)Parallel)Algorithms) Arrays)
Post)Processing)
Worklets)
)DataModel)
Filters)
• Combines)strengths)of)mulGple)projects:)– EAVL,)Oak)Ridge)NaGonal)Laboratory)– DAX,)Sandia)NaGonal)Laboratory)– PISTON,)Los)Alamos)NaGonal)Laboratory)
VTKgm)Arbitrary)ComposiGon)• Access)memory)layouts)–)Array)Handle)and)Dynamic)Array)Handle)
– Allows)for)efficient)ingsitu)integraGon)– Allows)for)reduced)data)transfer)
Control)Environment) ExecuGon)Environment)Transfer
Control)Environment) ExecuGon)Environment)Transfer
Performance)Portability)
A) B) C) D) E) F)Algorithm)
Architecture)
Performance)Portability)
A) B) C) D) E) F)Algorithm)
Backend)
VTKgm)
ExecuGon)Environment)
)Cell Operations
Field Operations Basic Math Make Cells
))
)
Control)Environment)
)Grid Topology Array Handle Invoke
Device)Adapter)Allocate)Transfer)Schedule)Sort)…)
Worklet)
VTKgm)Framework)
cont) exec)
Isosurface)
Algorithm Device TimevtkMarchingCubes Serial 11.917 svtkMarchingCubes 32 MPI Ranks 1.352 svtkMarchingCubes 64 MPI Ranks 1.922 sPISTON Serial 19.895 sPISTON CUDA 0.514 sPISTON TBB 0.955 sVTK-m Serial 20.784 sVTK-m CUDA 0.560 sVTK-m TBB 1.161 s
Surface)SimplificaGon)
Algorithm DeviceVTK Serial 3.65 s 11.40 sVTK-m Serial 2.73 s 2.93 s 5.22 sVTK-m TBB 36 threads 0.36 s 0.45 s 0.72 sVTK-m TBB 72 threads 0.41 s 0.49 s 0.74 sVTK-m CUDA 0.18 s 0.19 s 0.20 s
5123 10243 20483
Ray)Tracing)Data Set Algorithm
Embree 51.9EAVL 27.7VTK-m 38.5Embree 56.5EAVL 26.1VTK-m 36.0Embree 64.8EAVL 33.3VTK-m 47.8Embree 65.9EAVL 35.6VTK-m 49.1Embree 59.1EAVL 29.3VTK-m 41.0Embree 52.4EAVL 27.0VTK-m 37.8Embree 48.4EAVL 28.3VTK-m 33.9Embree 43.2EAVL 25.2VTK-m 34.5
Millions of Rays Per SecondLT_350K
LT_372K
RM_350K
RM_650K
RM_970K
RM_1.7M
RM_3.2M
Seismic
Data Set AlgorithmOptiX Prime 357.6EAVL 150.8VTK-m 164.5OptiX Prime 322.4EAVL 124.7VTK-m 140.8OptiX Prime 436.5EAVL 197.5VTK-m 200.8OptiX Prime 420.4EAVL 172.9VTK-m 166.0OptiX Prime 347.1EAVL 152.8VTK-m 163.5OptiX Prime 266.8EAVL 136.6VTK-m 148.8OptiX Prime 264.5EAVL 124.8VTK-m 134.5OptiX Prime 267.8EAVL 106.3VTK-m 119.4
Millions of Rays Per SecondLT_350K
LT_372K
RM_350K
RM_650K
RM_970K
RM_1.7M
RM_3.2M
Seismic
Direct)Volume)Rendering)
Device AlgorithmVTK 2.08VTK-m 1.25Dax 3.55VTK-m 6.79Dax 0.07VTK-m 0.28
Frames Per SecondCPU
GPU
MIC
47
Reader)
Filter)
Filter)
Filter)
Rendering)
Algorithm)
SimulaGon)
Closing)Thoughts)• Permissively)licensed)open)source)projects)• Need)for)deeper)collaboraGons)
– Develop)simulaGons)with)data)processing/viz)in)mind)– Develop)improved)data)structures,)formats,)exchange)
• Gaining)insight)from)increasingly)complex)data)– SimulaGons,)experiments,)validaGon,)reproducibility)
• Need)support)for)C++11,)even)C++14)on)HPC)• More)frequent)updates)on)HPC)
– Compilers,)dependencies,)drivers,)etc))
50