Scientific Visualization
Scientific Visualization
Dr. Tanja BodeCenter for Relativistic Astrophysics, Georgia Tech
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization ET Output Overview
Now that your simulation runs, how do you get somethingmeaningful out of it?
Data Output Pipelines
Cactus & Carpet Output Utils for GFs and GAs
Info: Runtime reductions of GFs included in the stdout.Scalar/0D: Reductions of GFs1D/2D/3D: Subsets of GFs
Direct Thorn Output
Any other type of output, e.g. AHFinderDirect BH data.
Visualization Tools
ASCII Output: gnuplot, ygraph, xgraph, matplotlib, ...
HDF5 Output: VisIt
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization ET Output Overview
Now that your simulation runs, how do you get somethingmeaningful out of it?
Data Output Pipelines
Cactus & Carpet Output Utils for GFs and GAs
Info: Runtime reductions of GFs included in the stdout.Scalar/0D: Reductions of GFs1D/2D/3D: Subsets of GFs
Direct Thorn Output
Any other type of output, e.g. AHFinderDirect BH data.
Visualization Tools
ASCII Output: gnuplot, ygraph, xgraph, matplotlib, ...
HDF5 Output: VisIt
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Thorn-Specific Output
Thorn-Specific Output
Players: AHFinderDirect, Multipole, ...
Pros:1 More compact or convenient datafile formats2 Reduce postprocessing: Runtime calculations and data organization
Cons:1 Writing own I/O interface2 Be careful of scheduling!
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
Overview of Cactus & Carpet Output
Thorns IO* & CarpetIO* include the capabilities for:
Standard OutputCheckpointingFilereader
Check what, if any, output to write at the end of each timestep
Gridfunctions, Gridfunctions, Gridfunctions, ... and Grid Arrays
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
Reductions (Scalars)
Available for both screen (”Info”) and scalar output
Type specified by CarpetIOScalar::outScalar reductions orIOBasic::outScalar reductions
Options include count, minimum, maximum, sum, average, norm2
Output Files of form <thorn>::<variable/group>.<reduction>.asc
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
Reductions (Scalars)
Gnuplot tips: http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
1D Data – Lines
Output line parameters *IOASCII::out1d *
Buffer zones, ghost zones, and boundary points→ Know what you’re looking at!
Output Files of form <thorn>::<variable/group>.[xyzd].asc
Information overload! (Unless you’re debugging)
# 1:it 2:tl 3:rl 4:c 5:ml 6:ix 7:iy 8:iz 9:time 10:x 11:y 12:z
13:data
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
1D Data – Lines
Brief offline foray into 1D animations with ygraph
Useful for debugging, but requires postprocessing scripts
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
2D Data – Planes or 2d Grid Arrays
Up to 3 simultaneous 2d planes (xy / xz / yz)
Output Files of form <thorn>::<variable/group>.(xy,xz,yz).asc
Grid arrays can use this pipeline
2D ASCII output for GFs is discouraged ...
Files get very big!Files get very big!Gnuplot can handle nice surface plots (via e.g. pm3d) ...
We can do better ....
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
Hierarchical Data Format 5 (HDF5)
File format containings groups and datasets with attributes.
tbode6@CRA:$ h5ls rho.xy.h5HYDROBASE::rho it=0 tl=0 rl=0 c=22 Dataset 27, 25HYDROBASE::rho it=0 tl=0 rl=0 c=23 Dataset 27, 28HYDROBASE::rho it=0 tl=0 rl=0 c=24 Dataset 27, 25...HYDROBASE::rho it=1 tl=0 rl=8 c=88 Dataset 19, 21HYDROBASE::rho it=1 tl=0 rl=8 c=89 Dataset 19, 20HYDROBASE::rho it=1 tl=0 rl=8 c=9 Dataset 19, 20Parameters and Global Attributes Group
Careful!
HDF5 files are by nature easy to corrupt. If metadata I/O errors, entiredata file can become useless.
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Data: Cactus & Carpet
Hierarchical Data Format 5 (HDF5)
During builds, simfactory also builds any utilities intoCactus/exe/<config>
Some key tools to working with HDF5 data
h5ls: Lists contents of HDF5 datah5dump: Like cat, dumps entire file contents to stdouthdf5 extract: Extract a dataset fromhdf5 slicer: Take a 2d slice from 3d output filehdf5 merge: Combine files (e.g. to combine variables or data fromchained runs)
Checkpointing is done in HDF5!
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Visualization – 2D & 3D
VisIt
Developed since 2000 by DOE’s Advanced Simulation and ComputingInitiative for terascale simulation data
Features:
It’s open source and free under the BSD license
Supports a large variety of formats (reader for Carpet is available separately)
Parallel compute engine support (distributed support as well)
Plot Scalar, Vector, or Tensor quantities
Allows remote access to files (don’t have to bring them locally!)
Python interface allows incorporating into scripts (e.g. for generatinganimations)
Also have C++ and Java support
Available and supported on clusters such as TACC’s Spur VisualizationCluster
Extendable via plug-ins if you’re adventurous to add ... C++ code heart
with autogenerated interface code
Tanja Bode Scientific Visualization 5. April 2012
Scientific Visualization Visualization – 2D & 3D
VisIt
Basic Usage Concepts:
1 Open a database (file), whether it’s local or not
2 Create a plot object for variable or expression (e.g., Pseudocolor, Volume)
3 Add Operators to the plot
Box – Restrict to subregionElevate – Create surface plot from pseudocolor plotReflect – Fill in for missing imaginationThreshold – Consider a range of data, ignoring the rest completely
4 Queries are possible (e.g. min/max for automating colorscales/heights)
5 Iterating through ”states” (time)
6 Save Plots
Allows multiple plots, comparing data in different files, much freedom inexpressions ....
Tanja Bode Scientific Visualization 5. April 2012