July 07, 2016 Slide 1
Introduction to Scientific Visualization
with ParaView
July 07, 2016 | Dr. Herwig Zilken
Introduction to Scientific Visualization with ParaView July 07, 2016 - - PowerPoint PPT Presentation
Introduction to Scientific Visualization with ParaView July 07, 2016 | Dr. Herwig Zilken July 07, 2016 Slide 1 Overview Introduction to ParaView Introduction to remote rendering with VNC (on JURECA) Hands On: visualizing sample
July 07, 2016 Slide 1
July 07, 2016 | Dr. Herwig Zilken
July 07, 2016 Slide 2
July 07, 2016 Slide 3
three‐dimensional data sets) built on top of VTK on top of OpenGL
data sets.
July 07, 2016 Slide 4
Laboratory, funding provided by the US Department of Energy ASCI program
Sandia National Lab. and other partners user interface more user friendly quantitative analysis framework
more cohesive GUI controls better multiblock interaction In situ integration into simulation and other applications (Catalyst)
new VR backend (multi screen 3D projection, VR devices)
July 07, 2016 Slide 5
initial data input or generated modify the data in some way convert data into visible „objects“ Adjust the visible properties Create image
Sources Filters Mappers Actors Renderers
July 07, 2016 Slide 6
ParaView Client
ParaView Server VTK pvpython OpenGL MPI ParaWeb Catalyst Custom App IceT … more … UI (Qt Widgets, Python Wrappings)
July 07, 2016 Slide 7
1. Geometry: defines the (3D) location 2. Topology: describes the connectivity (neighborhood) of points Example: three points at (x1,y1,z1), (x2,y2,z2), (x3,y3,z3) forming a triangle
July 07, 2016 Slide 8
Uniform Rectilinear Grid (Image Data) (vtkImageData) Non‐uniform Rectilinear Grid (Rectilinear Grid) (vtkRectilinearData) Structured (Curvilinear) Grid (vtkStructuredData)
July 07, 2016 Slide 9
Polygonal Mesh (Poly Data) (vtkPolyData) Unstructured Grid (vtkUnstructuredGrid) Multi‐Block (several data sets grouped together) Hierarchical Adaptive Mesh Refinement (AMR)
July 07, 2016 Slide 10
Scalar Vector Tensor (nxn matrix)
Normals (3D vector) 2D or 3D texture coordinates
July 07, 2016 Slide 11
July 07, 2016 Slide 12
Advanced toggle: Shows/hides advanced controls
Menu Bar Pipeline Browser Properties & Information Panel Toolbars
Menu Bar: access the majority of features Toolbars: quick access to the most commonly used Pipeline Browser: Overview about the data processing pipeline Properties & Information Panel: Parameters of the selected object in the pipeline
3D View
July 07, 2016 Slide 13
structure
visualization pipeline
active
like adding a filter
July 07, 2016 Slide 14
various parameters of the active object
appearance of the active
Color, Annotation, …)
adjust global visualization parameters, e.g. background color
July 07, 2016 Slide 15
July 07, 2016 Slide 16
structure of the active object
July 07, 2016 Slide 17
Toggle Color Legend Edit Color Map
Reset Scalar Range
Representation: Surface, Wire Frame, Surface with Edges, Points,… Mapped Variable Vector Component
Can also be found in the display group of the properties panel!
July 07, 2016 Slide 18
(2D and 3D views)
vertically/horizontally
July 07, 2016 Slide 19
Reset camera (all visible objects) maintains view but repositions camera, that entire objects are visible Zoom to box Align view to coordinate axis Zoom to data camera is placed to look at data (selected in pipeline browser)
July 07, 2016 Slide 20
Camera Undo Camera Redo Adjust camera Toggle 3D/2D Interaction Mode
July 07, 2016 Slide 21
(loading data, applying filters, setting preferences etc)
July 07, 2016 Slide 22
July 07, 2016 Slide 23
many filters in the Filters Menu
ParaView (alphabetical)
connected to the current active object the entry is disabled
July 07, 2016 Slide 24
expression on a per‐point or per‐cell basis
a function of given attributes
the “Scalars” and “Vectors” combo boxes
July 07, 2016 Slide 25
where a scalar field is equal to a user‐defined value
isosurface
July 07, 2016 Slide 26
user‐defined plane, box, sphere or cylinder
side of this plane (box, sphere, …)
July 07, 2016 Slide 27
user‐defined plane, box, sphere
that remains is the geometry where the plane is located.
July 07, 2016 Slide 28
specified range of values
July 07, 2016 Slide 29
defining a volume of interest and a sampling rate
July 07, 2016 Slide 30
each point in a mesh
vector and scaled by a vector or scalar.
July 07, 2016 Slide 31
then traces those seed points through the (steady state) vector field creating streamlines
July 07, 2016 Slide 32
a given vector field.
July 07, 2016 Slide 33
several pipeline objects into a single multi block data set
July 07, 2016 Slide 34
(about 1 billion cells on 256 nodes)
July 07, 2016 Slide 35
Scenario:
slow, maybe incompatible bad idea
apps (ParaView, VisIt) on JURECA and their client components on your local machine
image of this desktop to your local VNC‐viewer. All vis software (client+server) is installed on JURECA: our recommendation.
July 07, 2016 Slide 36
12 Visualization Nodes
jurecavis02.fz‐juelich.de (jrc1384)
(for security reasons) Visualization also possible on nodes without GPU’s (software rendering)
July 07, 2016 Slide 37
Base Software: X‐Server, X‐Client (Window‐Manager) OpenGL (libGL.so, libGLU.so, libglx.so), Nvidia Middleware: Virtual Network Computing: VNC‐Server, VNC‐Client VirtualGL Strudel Parallel and Remote Rendering Apps, In‐Situ Visualization ParaView VisIt
Vis Nodes are available for JURECA, JUQUEEN and Non‐Project users VisIt
July 07, 2016 Slide 38
Docu related to VisIt: https://trac.version.fz‐juelich.de/vis/wiki/VisIt/Jureca Docu related to ParaView: https://trac.version.fz‐juelich.de/vis/wiki/ParaView/Jureca
July 07, 2016 Slide 39
Firewall
User’s Work‐ station user interface display images Data GPFS
vis login node vis batch node compute node
data access + image generation Jureca
‐ direct user access ‐ no accounting ‐ shared with other users ‐ no parallel jobs (no srun)
‐ access via batch system ‐ accounting ‐ exclusive usage ‐ parallel jobs possible
July 07, 2016 Slide 40
Our recommendation is to use VNC for remote rendering on JURECA
(GPU acceleration) with VirtualGL
solution for many common OpenGL applications, e.g. IDL, Vapor, …
frontend of “remote aware” applications like ParaView and VisIt
hand can be avoided by using Strudel to establish the connection
July 07, 2016 Slide 41
developed for the
complex VNC scenarios become easy to use for any user
1. ssh to HPC system 2. authenticate via ssh key pair 3. submit job via slurm 4. wait for job to start (keep user informed) 5. start VNC server on node 6. establish ssh tunnel 7. start TurboVNC client and connect
complete configuration is stored in a JSON file Download JSC version of Strudel here: https://trac.version.fz‐juelich.de/vis/wiki/vnc3d/strudel
https://www.massive.org.au
July 07, 2016 Slide 42
JSC extension to VNC: vncserver –profile vis Your benefits: nice blue JSC background clock counting up/down MOTD window CPU, memory utilization GPU utilization VNC utilization desktop symbels for vis apps, LLview, …
July 07, 2016 Slide 43
Data GPFS
vis login node vis batch node compute node
data access + image generation Jureca
User’s Work‐ station ssh + VNC tunnel (port 590<d>) Firewall + user does not need to install the vis app (ParaView, VisIt, …) + rendering on GPU + large memory + no batch job needed + no accounting ‐ resources shared between users ‐ tunnel has to be established
July 07, 2016 Slide 44
1.a. Using Strudel (very easy) ‐ https://trac.version.fz‐juelich.de/vis/wiki/vnc3d/strudel 1.b. Manually ‐ https://trac.version.fz‐juelich.de/vis/wiki/vnc3d/manual Necessary Steps: ‐ login to jurecavis ‐ create vnc password (if not already done) ‐ start vncserver, notice the display number ‐ establish a ssh tunnel with the correct port to the vis login node ‐ start local vncviewer with proper connection information
‐ load necessary modules (see documentation or use “module spider”) ‐ start “vglrun paraview” or “vglrun visit –hw‐accel”
July 07, 2016 Slide 45
Data GPFS
vis batch node compute node
data access + image generation Jureca User’s Work‐ station ssh + VNC tunnel (port 590<d>) Firewall + user does not need to install Vis‐App (ParaView, VisIt, …) + rendering on GPU, large memory + vis server can be run in parallel (but number of vis nodes limited to 4) ‐ batch job needed, accounting ‐ tunnel has to be established
vis login node
login node
July 07, 2016 Slide 46
1.a. Using Strudel (very easy) ‐ https://trac.version.fz‐juelich.de/vis/wiki/vnc3d/strudel 1.b. Manually ‐ https://trac.version.fz‐juelich.de/vis/wiki/vnc3d/manual Necessary Steps: ‐ login to any JURECA login node (vis or non‐vis) ‐ create vnc password (if not already done) ‐ generate small batch script for vnc server (if not already done) Note: you can allocate more the one vis node (max. 4) ‐ start vncserver with “sbatch ‐‐start‐x server name_of_jobscript”, notice the node name and the display number in the slurm output ‐ establish a ssh tunnel with the correct node name and port ‐ start local vncviewer with proper connection information
‐ load necessary modules (see documentation or use “module spider”) ‐ start “vglrun paraview” or “vglrun visit –hw‐accel”
July 07, 2016 Slide 47
Once you have established a VNC session on one (or more) vis batch nodes, you can start ParaView in parallel. Notice: all resources (nodes) are already allocated after starting the vnc server with sbatch (see step 1.a., 1.b.), so just use “srun”.
‐ open command shell, load necessary modules ‐ export DISPLAY=:0.0 ‐ start servers e.g. by “srun ‐‐cpu_bind=none ‐‐ntasks=24 ‐‐gres=gpu:0 vglrun pvserver ‐‐use‐offscreen‐rendering”
July 07, 2016 Slide 48
Once you have established a VNC session on one (or more) vis batch nodes, you can start VisIt in parallel. Notice: all resources (nodes) are already allocated after starting the vnc server with sbatch (see step 1.a., 1.b.) .
(documentation and download link for predefined host profiles here: https://trac.version.fz‐juelich.de/vis/wiki/VisIt/Jureca)
July 07, 2016 Slide 49
July 07, 2016 Slide 50
Data GPFS
vis login node vis batch node compute node
data access + image generation Jureca
User’s Work‐ station ssh + VNC tunnel (port 590<d>) Firewall + user does not need to install vis app + rendering on GPU + vis app server can be run in parallel (but number of vis nodes limited) ‐ batch job needed
July 07, 2016 Slide 51
Data GPFS
vis login node vis batch node compute node
data access + image generation Jureca
User’s Work‐ station ssh + VNC tunnel (port 590<d>) Firewall + user does not need to install vis app + vis app server can be run in parallel on a really huge number of nodes + in situ visualization possible ‐ batch job needed ‐ only software rendering (but probably not the bottleneck)
July 07, 2016 Slide 52
Data GPFS
login node vis batch node compute node
data access + image generation Jureca
User’s Work‐ station ssh + tunnel (ParaView: port 11111) Firewall
Example: ParaView
+ rendering on GPU
+ ParaView server can be run in parallel (but number of vis nodes limited) ‐ user has to install ParaView or VisIt on his workstation ‐ batch job needed ‐ ssh tunnel needed
July 07, 2016 Slide 53
July 07, 2016 Slide 54
usage)
clipping
and without D3:
July 07, 2016 Slide 55
July 07, 2016 Slide 56
(local data)
what the color of each pixel is based on the depth value
July 07, 2016 Slide 57
data set: structured grid of size 1024^3 with one float value per grid point 4 GByte data
distance from the grid center
July 07, 2016 Slide 58
# vtk DataFile Version 2.0 Really cool data ASCII|BINARY DATASET type … POINT_DATA n … CELL DATA n …
Header Title Data type, either ASCII or BINARY Geometry/Topology, Type is one of STRUCTURED_POINTS STRUCTURED_GRID UNSTRUCTURED_GRID POLYDATA RECTILINEAR_GRID FIELD Dataset attributes Number of data items n of each type must match the number of points or cells in the dataset
July 07, 2016 Slide 59
load data rotate image create iso surface rotate image delete pipeline
Example VTK legacy, structured data: all processes read all data, the data is cropped after reading high intermediate memory consumption, poor I/O performance.
July 07, 2016 Slide 60
July 07, 2016 Slide 61
hid_t file_id = H5Fcreate(“dset.h5”, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
hsize_t dims[2]; dims[0] = n; dims[1] = 3; hid_t dataspace_id = H5Screate_simple(2, dims, NULL);
hid_t dataset_id = H5Dcreate2(file_id, "/vx", H5T_NATIVE_DOUBLE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
herr_t status = H5Dwrite(dataset_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, &(vx[0]));
status = H5Dclose(dataset_id); status = H5Sclose(dataspace_id); status = H5Fclose(file_id);
July 07, 2016 Slide 62
July 07, 2016 Slide 63
<?xml version ="1.0" ?> <!DOCTYPE xdmf SYSTEM "Xdmf.dtd" []> <Xdmf Version="2.0"> <Domain> <Grid Name="sphere" GridType="Uniform"> <Topology TopologyType="3DCoRectMesh" NumberOfElements="1024 1024 1024"/> <Geometry GeometryType="ORIGIN_DXDYDZ"> <DataItem Dimensions="3" NumberType="Float" Precision="4" Format="XML">
</DataItem> <DataItem Dimensions="3" NumberType="Float" Precision="4" Format="XML"> 1.000000 1.000000 1.000000 </DataItem> </Geometry> <Attribute Name="distance" AttributeType="Scalar" Center="Node"> <DataItem Dimensions="1024 1024 1024" NumberType="Float" Precision="4" Format="HDF"> /viswork/testDataZilken/test_4GB.h5:/sphere </DataItem> </Attribute> </Grid> </Domain> </Xdmf>
July 07, 2016 Slide 64
domini@node07:/viswork/testDataZilken> h5dump --header test_4GB.h5 HDF5 "test_4GB.h5" { GROUP "/" { DATASET "sphere" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 1024, 1024, 1024 ) / ( 1024, 1024, 1024 ) } } } }
July 07, 2016 Slide 65