introduction to scientific visualization in the …...ssh tunneling • we can use a gui and...
TRANSCRIPT
11/4/2008
1
Introduction to Scientific Visualization in the WestGrid Environment
Introduction to Scientific Visualization in the WestGrid Environment
Jon JohanssonJon Johansson
November 5, 2008November 5, 2008
Jon JohanssonAcademic Information and
Communication TechnologiesUniversity of Alberta
Jon JohanssonAcademic Information and
Communication TechnologiesUniversity of Alberta
Visualization in WestGridSlide 1 of 75
Visualization in WestGridSlide 1 of 75
What is Scientific Visualization?What is Scientific Visualization?
• convert scientific data into visual form– use computers to process data
• convert scientific data into visual form– use computers to process datap p
• numerical algorithms such as marching cubes to extract features
• add color, lights, camera view (create a 3D scene)• graphics techniques to render
– the data sets can be large – many gigabytes or more• the resulting image is presented to the human
visual processing system for the direct analysis
p p• numerical algorithms such as marching cubes to
extract features• add color, lights, camera view (create a 3D scene)• graphics techniques to render
– the data sets can be large – many gigabytes or more• the resulting image is presented to the human
visual processing system for the direct analysis
November 5, 2008November 5, 2008
visual processing system for the direct analysis and interpretation of the informationvisual processing system for the direct analysis and interpretation of the information
Visualization in WestGridSlide 2 of 75
Visualization in WestGridSlide 2 of 75
11/4/2008
2
What is Scientific Visualization?What is Scientific Visualization?
• a successful visualization is a representation of data which
• a successful visualization is a representation of data whichrepresentation of data which– allows the user to gain some insight into the
data– communicates the insight to others
• frequently deal with data that has a natural geometric structure
representation of data which– allows the user to gain some insight into the
data– communicates the insight to others
• frequently deal with data that has a natural geometric structure
November 5, 2008November 5, 2008
natural geometric structure • MRI, CAT data (measured)• weather simulations (computed)
natural geometric structure • MRI, CAT data (measured)• weather simulations (computed)
Visualization in WestGridSlide 3 of 75
Visualization in WestGridSlide 3 of 75
What is Scientific Visualization?What is Scientific Visualization?
• the key point is that we can understand data in a picture much better than we
• the key point is that we can understand data in a picture much better than we data in a picture much better than we can understand a bunch of numbers
• WestGrid resources can generate a lot of numbers!!
data in a picture much better than we can understand a bunch of numbers
• WestGrid resources can generate a lot of numbers!!
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 4 of 75Visualization in WestGrid
Slide 4 of 75
11/4/2008
3
What is Scientific Visualization?What is Scientific Visualization?
• use well understood algorithms to extract features from data sets
• use well understood algorithms to extract features from data sets
• goals– understand the data (exploration)
• interactively examine the data looking for the parts that are interesting
– communicate the data to peers• publications• conferences
• goals– understand the data (exploration)
• interactively examine the data looking for the parts that are interesting
– communicate the data to peers• publications• conferences
November 5, 2008November 5, 2008
conferences• NOTE: the exploration phase is usually interactive
so we need to generate images in (almost) real time– humans in the loop have limited tolerance for delay
conferences• NOTE: the exploration phase is usually interactive
so we need to generate images in (almost) real time– humans in the loop have limited tolerance for delay
Visualization in WestGridSlide 5 of 75
Visualization in WestGridSlide 5 of 75
What is Scientific Visualization?What is Scientific Visualization?
• once we find interesting structures in the data we have the freedom to arrange
• once we find interesting structures in the data we have the freedom to arrangehave the freedom to arrange– colors– lights– transparency– camera views
• this should clarify what we are looking at
have the freedom to arrange– colors– lights– transparency– camera views
• this should clarify what we are looking at
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 6 of 75Visualization in WestGrid
Slide 6 of 75
11/4/2008
4
WestGrid Visualization ResourcesWestGrid Visualization Resources
• WestGrid provides a visualization server located at Simon Fraser U i it
• WestGrid provides a visualization server located at Simon Fraser U i itUniversity
• the machine can be accessed as:–– hydra.westgrid.cahydra.westgrid.ca–– vizserver.westgrid.cavizserver.westgrid.ca–– IP address: 206.12.24.8IP address: 206.12.24.8
• Hydra is an SGI Onyx UltimateVision graphics supercomputer
University• the machine can be accessed as:
–– hydra.westgrid.cahydra.westgrid.ca–– vizserver.westgrid.cavizserver.westgrid.ca–– IP address: 206.12.24.8IP address: 206.12.24.8
• Hydra is an SGI Onyx UltimateVision graphics supercomputer
– 24 processors– 14 GB RAM – 10 graphics pipes
– 24 processors– 14 GB RAM – 10 graphics pipes
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 7 of 75Visualization in WestGrid
Slide 7 of 75
WestGrid Visualization ResourcesWestGrid Visualization Resources
• You should have access to hydra automatically by being granted access
• You should have access to hydra automatically by being granted access automatically by being granted access to WestGrid resources
• Info about accounts:– http://www.westgrid.ca/support/accounts
• Apply for an account at:– http://www.westgrid.ca/support/accounts/applying for an a
automatically by being granted access to WestGrid resources
• Info about accounts:– http://www.westgrid.ca/support/accounts
• Apply for an account at:– http://www.westgrid.ca/support/accounts/applying for an a
November 5, 2008November 5, 2008
p // g / pp / / pp y g_ _ _ccount
p // g / pp / / pp y g_ _ _ccount
Visualization in WestGridSlide 8 of 75
Visualization in WestGridSlide 8 of 75
11/4/2008
5
WestGrid Visualization ResourcesWestGrid Visualization Resources
Web links for more information:Web links for more information:• WestGrid Collaboration/VisualizationWeb links for more information:Web links for more information:• WestGrid Collaboration/VisualizationWestGrid Collaboration/Visualization
– http://www.westgrid.ca/support/visualization/• Visualization Visualization Server Page
– http://www.westgrid.ca/support/visualization/visualization_server/using_vizserver
• WestGrid Visualization Facilities– http://www.westgrid.ca/support/visualization/visualizati
on_facilities
WestGrid Collaboration/Visualization– http://www.westgrid.ca/support/visualization/
• Visualization Visualization Server Page – http://www.westgrid.ca/support/visualization/visualizati
on_server/using_vizserver• WestGrid Visualization Facilities
– http://www.westgrid.ca/support/visualization/visualization_facilities
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 9 of 75Visualization in WestGrid
Slide 9 of 75
Visual ServingVisual Serving
• OpenGL Vizserver 1.1 released by SGI in April 2000
• OpenGL Vizserver 1.1 released by SGI in April 2000April 2000
• users are able to interact with visualization supercomputers from anywhere in the world – connect individually
connect as a collaborative community
April 2000• users are able to interact with
visualization supercomputers from anywhere in the world – connect individually
connect as a collaborative community
November 5, 2008November 5, 2008
– connect as a collaborative community• rebranded as Visual Area Networking
(VAN) in 2002– hardware coupled with OpenGL Vizserver 2.0
– connect as a collaborative community• rebranded as Visual Area Networking
(VAN) in 2002– hardware coupled with OpenGL Vizserver 2.0
Visualization in WestGridSlide 10 of 75
Visualization in WestGridSlide 10 of 75
11/4/2008
6
WestGrid Visual Area NetworkWestGrid Visual Area Network
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 11 of 75Visualization in WestGrid
Slide 11 of 75
SGI OpenGL VizserverSGI OpenGL Vizserver
• SGI Vizserver is client-server software that allows you to run fully hardware
• SGI Vizserver is client-server software that allows you to run fully hardwareallows you to run fully hardware-accelerated graphics applications on a remote machine and have images delivered to your desktop
• the server is installed on – hydra westgrid ca
allows you to run fully hardware-accelerated graphics applications on a remote machine and have images delivered to your desktop
• the server is installed on – hydra westgrid ca
November 5, 2008November 5, 2008
– hydra.westgrid.ca • the client is installed on your workstation
– hydra.westgrid.ca • the client is installed on your workstation
Visualization in WestGridSlide 12 of 75
Visualization in WestGridSlide 12 of 75
11/4/2008
7
SGI OpenGL VizserverSGI OpenGL Vizserver
• OpenGL VizServerthe server software runs on the WestGrid
• OpenGL VizServerthe server software runs on the WestGrid – the server software runs on the WestGrid Visualization Server machine
– the client runs on the users desktop machine– http://www.sgi.com/products/software/vizserver/
• there are currently 5 licenses for the Vizserver software on hydra
– the server software runs on the WestGrid Visualization Server machine
– the client runs on the users desktop machine– http://www.sgi.com/products/software/vizserver/
• there are currently 5 licenses for the Vizserver software on hydra
November 5, 2008November 5, 2008
yy
Visualization in WestGridSlide 13 of 75
Visualization in WestGridSlide 13 of 75
SGI OpenGL VizserverSGI OpenGL Vizserver
• Application-transparentOpenGL Vizserver runs existing OpenGL® API
• Application-transparentOpenGL Vizserver runs existing OpenGL® API– OpenGL Vizserver runs existing OpenGL® API-based applications without modification
• Shared application control– OpenGL Vizserver instantly turns existing
stand-alone applications into collaborative applications with up to five remote sites
– OpenGL Vizserver runs existing OpenGL® API-based applications without modification
• Shared application control– OpenGL Vizserver instantly turns existing
stand-alone applications into collaborative applications with up to five remote sites
November 5, 2008November 5, 2008
sharing control of a single interactive application sharing control of a single interactive application
Visualization in WestGridSlide 14 of 75
Visualization in WestGridSlide 14 of 75
11/4/2008
8
SGI OpenGL VizserverSGI OpenGL Vizserver
• Platform/system independentOpenGL Vizserver gives existing workstations
• Platform/system independentOpenGL Vizserver gives existing workstations – OpenGL Vizserver gives existing workstations, personal computers, and even wireless handheld devices the power of a Silicon Graphics Prism or SGI Onyx family system
– the application uses the resources on the server
CPU d hi i
– OpenGL Vizserver gives existing workstations, personal computers, and even wireless handheld devices the power of a Silicon Graphics Prism or SGI Onyx family system
– the application uses the resources on the server
CPU d hi i
November 5, 2008November 5, 2008
• CPUs and graphics pipes– images are sent to the client machine
• no need for much graphic power
• CPUs and graphics pipes– images are sent to the client machine
• no need for much graphic power
Visualization in WestGridSlide 15 of 75
Visualization in WestGridSlide 15 of 75
SGI OpenGL VizserverSGI OpenGL Vizserver
• you can run nearly any graphics or visualization application on the remote
• you can run nearly any graphics or visualization application on the remote visualization application on the remote SGI host (hydra.westgrid.ca), and have the resulting imagery delivered to your desktop
• the client machine simply decompresses and displays the image created by the
visualization application on the remote SGI host (hydra.westgrid.ca), and have the resulting imagery delivered to your desktop
• the client machine simply decompresses and displays the image created by the
November 5, 2008November 5, 2008
and displays the image created by the serverand displays the image created by the server
Visualization in WestGridSlide 16 of 75
Visualization in WestGridSlide 16 of 75
11/4/2008
9
SGI OpenGL VizserverSGI OpenGL Vizserver
• why the Vizserver approach is better:– X doesn't support hardware accelerated 3D graphics
• why the Vizserver approach is better:– X doesn't support hardware accelerated 3D graphicspp g p
• OpenGL function calls are passed to the graphics card on your desktop
– the X protocol is horribly inefficient• Vizserver uses a much more streamlined (custom)
protocol to move events and payload image data• data compression is available
– Vizserver lets multiple users interact simultaneously with i l li ti i th hi
pp g p• OpenGL function calls are passed to the graphics
card on your desktop– the X protocol is horribly inefficient
• Vizserver uses a much more streamlined (custom) protocol to move events and payload image data
• data compression is available– Vizserver lets multiple users interact simultaneously with
i l li ti i th hi
November 5, 2008November 5, 2008
a single application running on the graphics server• each connection has a dedicated graphics pipe
a single application running on the graphics server• each connection has a dedicated graphics pipe
Visualization in WestGridSlide 17 of 75
Visualization in WestGridSlide 17 of 75
SGI OpenGL VizserverSGI OpenGL Vizserver
• OpenGL Vizserver clients are available for – SGI® IRIX® OS-based systems such as Silicon
• OpenGL Vizserver clients are available for – SGI® IRIX® OS-based systems such as Silicon – SGI® IRIX® OS-based systems, such as Silicon
Graphics Octane2, Silicon Graphics Fuel, Silicon Graphics® O2+™, and the SGI Onyx family
– Linux®– Solaris™– Windows NT®, Windows® 2000, Windows® XP,
– SGI® IRIX® OS-based systems, such as Silicon Graphics Octane2, Silicon Graphics Fuel, Silicon Graphics® O2+™, and the SGI Onyx family
– Linux®– Solaris™– Windows NT®, Windows® 2000, Windows® XP,
November 5, 2008November 5, 2008
, , ,and Windows® XP Tablet PC Edition
– Mac OS X
, , ,and Windows® XP Tablet PC Edition
– Mac OS X
Visualization in WestGridSlide 18 of 75
Visualization in WestGridSlide 18 of 75
11/4/2008
10
SGI OpenGL VizserverSGI OpenGL Vizserver
• the OpenGL Vizserver client is a free download from the SGI website
• the OpenGL Vizserver client is a free download from the SGI websitedownload from the SGI website– https://support.sgi.com/login
• note that you must create a Supportfolio ID to be able to download the client– this is free
download from the SGI website– https://support.sgi.com/login
• note that you must create a Supportfolio ID to be able to download the client– this is free
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 19 of 75Visualization in WestGrid
Slide 19 of 75
Connection to HydraConnection to Hydra
• you need to create an SSH tunnel to hydra to be able to use it
• you need to create an SSH tunnel to hydra to be able to use ithydra to be able to use it.
• from a Linux/Unix machine:–– sshssh --L 7051:hydra.westgrid.ca:7051L 7051:hydra.westgrid.ca:7051
--N [email protected] [email protected]– replace “username” with your WestGrid
username and you will be prompted for your password
hydra to be able to use it.• from a Linux/Unix machine:
–– sshssh --L 7051:hydra.westgrid.ca:7051L 7051:hydra.westgrid.ca:7051--N [email protected] [email protected]
– replace “username” with your WestGrid username and you will be prompted for your password
November 5, 2008November 5, 2008
password• 7051 is the port that vizserver uses to
make connections
password• 7051 is the port that vizserver uses to
make connections
Visualization in WestGridSlide 20 of 75
Visualization in WestGridSlide 20 of 75
11/4/2008
11
Connection to HydraConnection to Hydra
• look at this connection command:–– sshssh --L 7051:hydra westgrid ca:7051L 7051:hydra westgrid ca:7051
• look at this connection command:–– sshssh --L 7051:hydra westgrid ca:7051L 7051:hydra westgrid ca:7051–– sshssh --L 7051:hydra.westgrid.ca:7051L 7051:hydra.westgrid.ca:7051
--N [email protected] [email protected]•• --L 7051:hydra.westgrid.ca:7051L 7051:hydra.westgrid.ca:7051
– specifies that port 7051 on the local (client) machine is to be forwarded to the given host and port on the remote machine
– this is an “outgoing tunnel”•• --NN means “do not execute a remote command”
– for an “incoming tunnel” (the given port on
–– sshssh --L 7051:hydra.westgrid.ca:7051L 7051:hydra.westgrid.ca:7051--N [email protected] [email protected]
•• --L 7051:hydra.westgrid.ca:7051L 7051:hydra.westgrid.ca:7051– specifies that port 7051 on the local (client) machine is to be
forwarded to the given host and port on the remote machine– this is an “outgoing tunnel”
•• --NN means “do not execute a remote command” – for an “incoming tunnel” (the given port on
November 5, 2008November 5, 2008
for an incoming tunnel (the given port on the remote (server) machine is to be forwarded to the given port on the local machine) use --RR instead of --LL
for an incoming tunnel (the given port on the remote (server) machine is to be forwarded to the given port on the local machine) use --RR instead of --LL
Visualization in WestGridSlide 21 of 75
Visualization in WestGridSlide 21 of 75
Connection to HydraConnection to Hydra• you will need to set an environment
variable to be able start a vizserversession:
• you will need to set an environment variable to be able start a vizserversession:session:– VSX_SESSION_HOST = hydra.westgrid.ca
• launch the vizserver client– connect to “localhost” not to hydra– the connection is handled by the tunnel
• you still need to authenticate to Hydra
session:– VSX_SESSION_HOST = hydra.westgrid.ca
• launch the vizserver client– connect to “localhost” not to hydra– the connection is handled by the tunnel
• you still need to authenticate to Hydra
November 5, 2008November 5, 2008
y ywith your WestGrid username and password.– http://www.westgrid.ca/files/webfm/support/visualizati
on/vizserver_tunnel.pdf
y ywith your WestGrid username and password.– http://www.westgrid.ca/files/webfm/support/visualizati
on/vizserver_tunnel.pdfVisualization in WestGrid
Slide 22 of 75Visualization in WestGrid
Slide 22 of 75
11/4/2008
12
Connection to HydraConnection to Hydra
Sample session startSample session start• set up the SSH tunnel
–– sshssh --L 7051:hydra.westgrid.ca:7051 L 7051:hydra.westgrid.ca:7051 --N [email protected] [email protected]
• set the environment variable (Bash shell)–– export VSX_SESSION_HOST=hydra.westgrid.caexport VSX_SESSION_HOST=hydra.westgrid.ca
i
• set up the SSH tunnel–– sshssh --L 7051:hydra.westgrid.ca:7051 L 7051:hydra.westgrid.ca:7051
--N [email protected] [email protected]• set the environment variable (Bash shell)
–– export VSX_SESSION_HOST=hydra.westgrid.caexport VSX_SESSION_HOST=hydra.westgrid.ca
i
November 5, 2008November 5, 2008
• launch the client–– vizservervizserver --h h localhostlocalhost
• launch the client–– vizservervizserver --h h localhostlocalhost
Visualization in WestGridSlide 23 of 75
Visualization in WestGridSlide 23 of 75
OpenGL VizserverOpenGL Vizserver
• Sample session start (cont.)• enter your WestGrid user id and password • Sample session start (cont.)• enter your WestGrid user id and password • enter your WestGrid user id and password
to login to hydra• start a session• select parameters for the session• launch applications from the vizserver
console window
• enter your WestGrid user id and password to login to hydra
• start a session• select parameters for the session• launch applications from the vizserver
console window
November 5, 2008November 5, 2008
console windowconsole window
Visualization in WestGridSlide 24 of 75
Visualization in WestGridSlide 24 of 75
11/4/2008
13
SSH tunnelingSSH tunneling
• also called “port forwarding” or “port mapping”
• also called “port forwarding” or “port mapping”mapping
• forward a network port from one network node to another
• used to carry insecure network traffic over the Internet in a secure way
• users outside a firewall can access a
mapping• forward a network port from one network
node to another• used to carry insecure network traffic over
the Internet in a secure way • users outside a firewall can access a
November 5, 2008November 5, 2008
service inside the firewallservice inside the firewall
Visualization in WestGridSlide 25 of 75
Visualization in WestGridSlide 25 of 75
SSH tunnelingSSH tunneling
• ssh connects using port 22 – connection is encrypted and secure
• vizserver connects using port 7051
• ssh connects using port 22 – connection is encrypted and secure
• vizserver connects using port 7051
November 5, 2008November 5, 2008
• vizserver connects using port 7051– connection is not encrypted
• to make a vizserver session secure, wrap the vizserver session inside ssh
• vizserver connects using port 7051– connection is not encrypted
• to make a vizserver session secure, wrap the vizserver session inside ssh
Visualization in WestGridSlide 26 of 75
Visualization in WestGridSlide 26 of 75
11/4/2008
14
SSH tunnelingSSH tunneling
• on the source machine – ssh listens for packets addressed to port 7051
• on the source machine – ssh listens for packets addressed to port 7051
November 5, 2008November 5, 2008
– all those packets are encrypted and addressed to the destination using port 22
• on the destination machine– when the packets are received, ssh decrypts them– packets are then sent to the destination port
– all those packets are encrypted and addressed to the destination using port 22
• on the destination machine– when the packets are received, ssh decrypts them– packets are then sent to the destination port
Visualization in WestGridSlide 27 of 75
Visualization in WestGridSlide 27 of 75
SSH tunnelingSSH tunneling• We can use a GUI and manually assign port
forwarding – port 7051 on localhost is forwarded to 7051 on the
• We can use a GUI and manually assign port forwarding – port 7051 on localhost is forwarded to 7051 on the p
remote host• this is an “outgoing tunnel”• outgoing tunnels protect the data that your local
computer sends to the remote host computer– we don’t need an incoming (reverse) tunnel for port
7051 - only an outgoing tunnel to the server• incoming tunnels protect the data that your local
t i i i f th t h t
premote host
• this is an “outgoing tunnel”• outgoing tunnels protect the data that your local
computer sends to the remote host computer– we don’t need an incoming (reverse) tunnel for port
7051 - only an outgoing tunnel to the server• incoming tunnels protect the data that your local
t i i i f th t h t
November 5, 2008November 5, 2008
computer is receiving from the remote host computer.
• our main concern is that the username and password used to authenticate to hydra be encrypted
computer is receiving from the remote host computer.
• our main concern is that the username and password used to authenticate to hydra be encrypted
Visualization in WestGridSlide 28 of 75
Visualization in WestGridSlide 28 of 75
11/4/2008
15
Scientific VisualizationScientific Visualization
• Having opened a connection to hydra we would like to use a visualization application – what’s
• Having opened a connection to hydra we would like to use a visualization application – what’s like to use a visualization application what s available?like to use a visualization application what s available?
Package Name Start Command
AVS/Express 6.2 express
OpenDX 4.3.2 dx
November 5, 2008November 5, 2008
• if something is not configured correctly, please send a message to [email protected]
• if something is not configured correctly, please send a message to [email protected]
VTK vtk (the tcl shell for vtk)
Visualization in WestGridSlide 29 of 75
Visualization in WestGridSlide 29 of 75
Viz PackagesViz Packages
• OpenDX, VTK and AVS Express use a pipelined, component-based architecture
• OpenDX, VTK and AVS Express use a pipelined, component-based architecture
• a user can quickly assemble modular software components into a “finished application.”
• these systems are flexible - components can be combined in a multitude of ways, thereby allowing an application developer to accomplish a wide variety of visualization tasks
• they are extensible - they offer the means for developers to add new components to the
• a user can quickly assemble modular software components into a “finished application.”
• these systems are flexible - components can be combined in a multitude of ways, thereby allowing an application developer to accomplish a wide variety of visualization tasks
• they are extensible - they offer the means for developers to add new components to the
November 5, 2008November 5, 2008
developers to add new components to the system, thereby extending the system’s functionality
developers to add new components to the system, thereby extending the system’s functionality
Visualization in WestGridSlide 30 of 75
Visualization in WestGridSlide 30 of 75
11/4/2008
16
OpenDXOpenDX
• to be able to run OpenDX on hydra:set the environment variable DXROOT to
• to be able to run OpenDX on hydra:set the environment variable DXROOT to – set the environment variable DXROOT to
• setenv DXROOT /usr/local/dx (tcsh)• export DXROOT=/usr/local/dx (bash)
– add the following directory to your library path• setenv LD_LIBRARY_PATH
{$LD_LIBRARY_PATH}:/usr/local/lib/ (tcsh)– add the bin directories to your path
– set the environment variable DXROOT to • setenv DXROOT /usr/local/dx (tcsh)• export DXROOT=/usr/local/dx (bash)
– add the following directory to your library path• setenv LD_LIBRARY_PATH
{$LD_LIBRARY_PATH}:/usr/local/lib/ (tcsh)– add the bin directories to your path
November 5, 2008November 5, 2008
• setenv PATH {$PATH}:/usr/local/dx/bin:/usr/local/dx/bin_sgi
• setenv PATH {$PATH}:/usr/local/dx/bin:/usr/local/dx/bin_sgi
Visualization in WestGridSlide 31 of 75
Visualization in WestGridSlide 31 of 75
Scientific VisualizationScientific Visualization
• In order to create a visualization:– import your data into the package
• In order to create a visualization:– import your data into the packageimport your data into the package– explore the data looking for the interesting features
• lots of work here– having found interesting features set up the view to
show them clearly. Select:• colors/surface properties• camera view
import your data into the package– explore the data looking for the interesting features
• lots of work here– having found interesting features set up the view to
show them clearly. Select:• colors/surface properties• camera view
November 5, 2008November 5, 2008
• lights (these have some properties to adjust)– export images/animations
• lights (these have some properties to adjust)– export images/animations
Visualization in WestGridSlide 32 of 75
Visualization in WestGridSlide 32 of 75
11/4/2008
17
Scientific VisualizationScientific Visualization
• color choice can help to clarify a visualization• a handy guide is the online paper “A Rule based • color choice can help to clarify a visualization• a handy guide is the online paper “A Rule based • a handy guide is the online paper A Rule-based
Tool for Assisting Colormap Selection” by Lawrence D. Bergman, Bernice E. Rogowitz and Lloyd A. Treinish, all from IBM
• http://www.research.ibm.com/dx/proceedings/pravda/index.htm
• lots of interesting references at the end
• a handy guide is the online paper A Rule-based Tool for Assisting Colormap Selection” by Lawrence D. Bergman, Bernice E. Rogowitz and Lloyd A. Treinish, all from IBM
• http://www.research.ibm.com/dx/proceedings/pravda/index.htm
• lots of interesting references at the end
November 5, 2008November 5, 2008
• lots of interesting references at the end• lots of interesting references at the end
Visualization in WestGridSlide 33 of 75
Visualization in WestGridSlide 33 of 75
Scientific VisualizationScientific Visualization
• another very nice online publication is “How NOT to Lie with Visualization” by Bernice E. Rogowitz
• another very nice online publication is “How NOT to Lie with Visualization” by Bernice E. Rogowitzto Lie with Visualization by Bernice E. Rogowitzand Lloyd A. Treinish, from IBM
• http://www.research.ibm.com/dx/proceedings/pravda/truevis.htm– PRAVDA is intellectual property (IBM’s) separate from
OpenDX and isn’t freely available– the papers are still worth reading
to Lie with Visualization by Bernice E. Rogowitzand Lloyd A. Treinish, from IBM
• http://www.research.ibm.com/dx/proceedings/pravda/truevis.htm– PRAVDA is intellectual property (IBM’s) separate from
OpenDX and isn’t freely available– the papers are still worth reading
November 5, 2008November 5, 2008
p p gp p g
Visualization in WestGridSlide 34 of 75
Visualization in WestGridSlide 34 of 75
11/4/2008
18
Scientific VisualizationScientific Visualization
November 5, 2008November 5, 2008Source: http://www.research.ibm.com/dx/proceedings/pravda/truevis.htm
Visualization in WestGridSlide 35 of 75
Visualization in WestGridSlide 35 of 75
Sample Data SetSample Data Set
• We have the electric potential due to a dielectric cylinder introduced into a
• We have the electric potential due to a dielectric cylinder introduced into a dielectric cylinder introduced into a constant electric field E0
• the parameters I used are:– E0 = 50 V/m– dielectric constant = 5 F/m
R = 10 m
dielectric cylinder introduced into a constant electric field E0
• the parameters I used are:– E0 = 50 V/m– dielectric constant = 5 F/m
R = 10 m
November 5, 2008November 5, 2008
– Rcyl = 10 m– -50 m ≤ x, y, z ≤ 50 m– Rcyl = 10 m– -50 m ≤ x, y, z ≤ 50 m
Visualization in WestGridSlide 36 of 75
Visualization in WestGridSlide 36 of 75
11/4/2008
19
Sample Data SetSample Data Set
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 37 of 75Visualization in WestGrid
Slide 37 of 75
OpenDX Data ImportOpenDX Data Import• a data file might consist of ascii values, each line containing 4 values
…-8.50000000 14.72243186 48.00000000 326.96078431 8 50000000 14 72243186 49 00000000 326 96078431
• a data file might consist of ascii values, each line containing 4 values…
-8.50000000 14.72243186 48.00000000 326.96078431 8 50000000 14 72243186 49 00000000 326 96078431 -8.50000000 14.72243186 49.00000000 326.96078431
-8.50000000 14.72243186 50.00000000 326.96078431 -9.50627936 14.09363873 -50.00000000 365.66830060 -9.50627936 14.09363873 -49.00000000 365.66830060 -9.50627936 14.09363873 -48.00000000 365.66830060 …
• it’s important know how the file was written:• row major:
for( i = 0; i < nx; i++){for( j = 0; j < ny; j++){
for( k = 0; k < nz; k++){fprintf( outfh, "%12.8f %12.8f %12.8f %12.8f \n", x, y, z, V );
-8.50000000 14.72243186 49.00000000 326.96078431 -8.50000000 14.72243186 50.00000000 326.96078431 -9.50627936 14.09363873 -50.00000000 365.66830060 -9.50627936 14.09363873 -49.00000000 365.66830060 -9.50627936 14.09363873 -48.00000000 365.66830060 …
• it’s important know how the file was written:• row major:
for( i = 0; i < nx; i++){for( j = 0; j < ny; j++){
for( k = 0; k < nz; k++){fprintf( outfh, "%12.8f %12.8f %12.8f %12.8f \n", x, y, z, V );
November 5, 2008November 5, 2008
p ( , \ , , y, , );}
}}
• row major is defined by the last index varying the fastest
p ( , \ , , y, , );}
}}
• row major is defined by the last index varying the fastest
Visualization in WestGridSlide 38 of 75
Visualization in WestGridSlide 38 of 75
11/4/2008
20
OpenDX Data ImportOpenDX Data Import
• We have a data set that has regular spacings in the x, y and z directions• We don’t need to read the coordinates for each point from a file• The general header file to read in this data is:
• We have a data set that has regular spacings in the x, y and z directions• We don’t need to read the coordinates for each point from a file• The general header file to read in this data is:e ge e a eade e o ead s da a s:
• file = ./pot_cart.dat• grid = 101 x 101 x 101• format = ascii• interleaving = field• majority = row• header = lines 0• field = potential• structure = scalar• type = float
i i
e ge e a eade e o ead s da a s:• file = ./pot_cart.dat• grid = 101 x 101 x 101• format = ascii• interleaving = field• majority = row• header = lines 0• field = potential• structure = scalar• type = float
i i
November 5, 2008November 5, 2008
• dependency = positions• positions = regular, regular, regular, -50.0, 1.0, -50.0, 1.0, -50.0, 1.0• end
• dependency = positions• positions = regular, regular, regular, -50.0, 1.0, -50.0, 1.0, -50.0, 1.0• end
Visualization in WestGridSlide 39 of 75
Visualization in WestGridSlide 39 of 75
Sample Data SetSample Data Set
• the connections between the points
• the connections between the points between the points are inferred when you tell OpenDX that the data are “row major”
• these are Cartesian connections
between the points are inferred when you tell OpenDX that the data are “row major”
• these are Cartesian connections
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 40 of 75Visualization in WestGrid
Slide 40 of 75
11/4/2008
21
Sample Data SetSample Data Set
• you can also work in non-Cartesian
• you can also work in non-Cartesian non Cartesian coordinates
• the grid is row major in cylindrical coordinates (r, phi, z)
• write Cartesian coordinates in the file
non Cartesian coordinates
• the grid is row major in cylindrical coordinates (r, phi, z)
• write Cartesian coordinates in the file
November 5, 2008November 5, 2008
coordinates in the file and connections are inferred from the cylindrical grid
coordinates in the file and connections are inferred from the cylindrical grid
Visualization in WestGridSlide 41 of 75
Visualization in WestGridSlide 41 of 75
Sample Data SetSample Data Set
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 42 of 75Visualization in WestGrid
Slide 42 of 75
11/4/2008
22
Sample Data SetSample Data Set
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 43 of 75Visualization in WestGrid
Slide 43 of 75
Data ImportData Import
• Start with a FileSelector module to browse to the general file describing the data set
• Start with a FileSelector module to browse to the general file describing the data set and connect it to an import module which actually does the reading
• Double click on the FileSelector to get a widget to browse the file system
• When the data is in the package we can start applying algorithms to it and look for interesting features
and connect it to an import module which actually does the reading
• Double click on the FileSelector to get a widget to browse the file system
• When the data is in the package we can start applying algorithms to it and look for interesting features
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 44 of 75Visualization in WestGrid
Slide 44 of 75
11/4/2008
23
Components of the visualizationComponents of the visualization
• Isovalues of the electric potential• The lower slice shows the electric • Isovalues of the electric potential• The lower slice shows the electric • The lower slice shows the electric
potential with contour lines to give a sense of the shape change close to the cylinder– Use a slab module to extract a slice of the
potential fieldUse the Isosurface module to extract contour
• The lower slice shows the electric potential with contour lines to give a sense of the shape change close to the cylinder– Use a slab module to extract a slice of the
potential fieldUse the Isosurface module to extract contour
November 5, 2008November 5, 2008
– Use the Isosurface module to extract contour lines at values
• -1750, -1250, -750, -250, 250, 750, 1250, 1750 volts
– Use the Isosurface module to extract contour lines at values
• -1750, -1250, -750, -250, 250, 750, 1250, 1750 volts
Visualization in WestGridSlide 45 of 75
Visualization in WestGridSlide 45 of 75
Components of the visualizationComponents of the visualization
• In the Slab module set the parameters:
• In the Slab module set the parameters:parameters:– dimension: “z”– position: 0– thickness: (0 or 1)
• this is the default• The AutoColor module generates
a color map so that we have
parameters:– dimension: “z”– position: 0– thickness: (0 or 1)
• this is the default• The AutoColor module generates
a color map so that we have
November 5, 2008November 5, 2008
a color map so that we have something to seea color map so that we have something to see
Visualization in WestGridSlide 46 of 75
Visualization in WestGridSlide 46 of 75
11/4/2008
24
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 47 of 75Visualization in WestGrid
Slide 47 of 75
Components of the visualizationComponents of the visualization
• Take the output of the Slab module and attach it to the input of an Isosurface
• Take the output of the Slab module and attach it to the input of an Isosurface module– The 2D slab data will result in contour lines– Set the isovalues at
• -1750, -1250, -750, -250, 250, 750, 1250, 1750 volts
• The contour lines are then passed to a Tube module
module– The 2D slab data will result in contour lines– Set the isovalues at
• -1750, -1250, -750, -250, 250, 750, 1250, 1750 volts
• The contour lines are then passed to a Tube module
November 5, 2008November 5, 2008
– Set the diameter of the tube to 1.0– Set the diameter of the tube to 1.0
Visualization in WestGridSlide 48 of 75
Visualization in WestGridSlide 48 of 75
11/4/2008
25
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 49 of 75Visualization in WestGrid
Slide 49 of 75
Components of the visualizationComponents of the visualization
• Electric field linesTh iddl li i l d t th
• Electric field linesTh iddl li i l d t th • The middle slice is color mapped to the magnitude of the electric field and shows some field lines– The lines are diverted in the region of the
cylinder• Use the Gradient module and the
• The middle slice is color mapped to the magnitude of the electric field and shows some field lines– The lines are diverted in the region of the
cylinder• Use the Gradient module and the
November 5, 2008November 5, 2008
• Use the Gradient module and the Compute module to calculate the electric field from the electric potential
E = - grad ϕ
• Use the Gradient module and the Compute module to calculate the electric field from the electric potential
E = - grad ϕ
Visualization in WestGridSlide 50 of 75
Visualization in WestGridSlide 50 of 75
11/4/2008
26
Components of the visualizationComponents of the visualization
– Use a Slab module to extract a slice of the electric field
– Use a Slab module to extract a slice of the electric fieldelectric field
– Use the Streamline module to extract contour lines at values
• The Streamline module needs the vector field as one input, and a set of seed points as the next input
Use the Tube module to produce lines with
electric field– Use the Streamline module to extract contour
lines at values• The Streamline module needs the vector
field as one input, and a set of seed points as the next input
Use the Tube module to produce lines with
November 5, 2008November 5, 2008
– Use the Tube module to produce lines with some thickness
– Use the Tube module to produce lines with some thickness
Visualization in WestGridSlide 51 of 75
Visualization in WestGridSlide 51 of 75
Components of the visualizationComponents of the visualization
• Use the Compute module after the gradient to negate the vector
• Use the Compute module after the gradient to negate the vector gradient to negate the vector components
• In the Compute module set “expression” to
[-a.x, -a.y, -a.z]• In Slab set
dimension: “z”
gradient to negate the vector components
• In the Compute module set “expression” to
[-a.x, -a.y, -a.z]• In Slab set
dimension: “z”
November 5, 2008November 5, 2008
– dimension: z– position: 50– thickness: (0 or 1)
• this is the default
– dimension: z– position: 50– thickness: (0 or 1)
• this is the default
Visualization in WestGridSlide 52 of 75
Visualization in WestGridSlide 52 of 75
11/4/2008
27
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 53 of 75Visualization in WestGrid
Slide 53 of 75
Components of the visualizationComponents of the visualization
• To calculate streamlines connect the Electric Field (output of
• To calculate streamlines connect the Electric Field (output of Compute) to the left input of the Streamlines module
• Use another Slab module to extract a line of points to use as seeds for the stream line– Dimension: “x”– Position: 0
Compute) to the left input of the Streamlines module
• Use another Slab module to extract a line of points to use as seeds for the stream line– Dimension: “x”– Position: 0
November 5, 2008November 5, 2008
• Use Reduce to decrease the number of points by 4
• Use Tube with diameter 1.0
• Use Reduce to decrease the number of points by 4
• Use Tube with diameter 1.0
Visualization in WestGridSlide 54 of 75
Visualization in WestGridSlide 54 of 75
11/4/2008
28
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 55 of 75Visualization in WestGrid
Slide 55 of 75
Components of the visualizationComponents of the visualization
• The top slice shows vector glyphs at some grid points of the electric field
• The top slice shows vector glyphs at some grid points of the electric fieldgrid points of the electric field– The glyphs show the direction of the field– The size of the glyphs is scaled to the
magnitude of the field
grid points of the electric field– The glyphs show the direction of the field– The size of the glyphs is scaled to the
magnitude of the field
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 56 of 75Visualization in WestGrid
Slide 56 of 75
11/4/2008
29
Components of the visualizationComponents of the visualization
• Insert a Reduce module and a Glyph module between Slab and Collect
• Insert a Reduce module and a Glyph module between Slab and Collect
• The Slab module parameters:– Dimension: “z”– Position: 100
• The Reduce module has – Factor: 4.0
• In the Glyph module– Type: “rocket”
• The Slab module parameters:– Dimension: “z”– Position: 100
• The Reduce module has – Factor: 4.0
• In the Glyph module– Type: “rocket”
November 5, 2008November 5, 2008
Type: rocket– Shape: 1.0– Scale: 0.15– Ratio: 0.1
Type: rocket– Shape: 1.0– Scale: 0.15– Ratio: 0.1
Visualization in WestGridSlide 57 of 75
Visualization in WestGridSlide 57 of 75
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 58 of 75Visualization in WestGrid
Slide 58 of 75
11/4/2008
30
Components of the visualizationComponents of the visualization
• We have applied some visualization techniques to
• We have applied some visualization techniques to the data and created 3 slices
• pretty, but what does it mean??
• this lacks context• need some information to
help the viewer
the data and created 3 slices
• pretty, but what does it mean??
• this lacks context• need some information to
help the viewer
November 5, 2008November 5, 2008
understand what we are looking atunderstand what we are looking at
Visualization in WestGridSlide 59 of 75
Visualization in WestGridSlide 59 of 75
Components of the visualizationComponents of the visualization
• Annotations – add these to provide the context for the visualization
• Annotations – add these to provide the context for the visualization
• ShowBox lets the viewer know the volume of space occupied by the data
• Text: titles, labels – explain a bit• Axes provide orientation and scale• ColorBar – shows how the numbers are mapped
to color• Draw the cylinder so we see the cause of all the
• ShowBox lets the viewer know the volume of space occupied by the data
• Text: titles, labels – explain a bit• Axes provide orientation and scale• ColorBar – shows how the numbers are mapped
to color• Draw the cylinder so we see the cause of all the
November 5, 2008November 5, 2008
Draw the cylinder so we see the cause of all the trouble in the fieldDraw the cylinder so we see the cause of all the trouble in the field
Visualization in WestGridSlide 60 of 75
Visualization in WestGridSlide 60 of 75
11/4/2008
31
Components of the visualizationComponents of the visualization
• The ShowBox module draws a box around the extents of
• The ShowBox module draws a box around the extents of the data set– Use a Tube module to get
nicely rendered lines• Caption modules allow you
to place text in the 2D plane of the screen– Set the text and location in the
the data set– Use a Tube module to get
nicely rendered lines• Caption modules allow you
to place text in the 2D plane of the screen– Set the text and location in the
November 5, 2008November 5, 2008
Set the text and location in the interfaceSet the text and location in the interface
Visualization in WestGridSlide 61 of 75
Visualization in WestGridSlide 61 of 75
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 62 of 75Visualization in WestGrid
Slide 62 of 75
11/4/2008
32
Components of the visualizationComponents of the visualization
• A very useful annotation in this
• A very useful annotation in this annotation in this visualization is some indication of where the cylinder actually is– It is, after all, the
source of all the i i i fi
annotation in this visualization is some indication of where the cylinder actually is– It is, after all, the
source of all the i i i fi
November 5, 2008November 5, 2008
disruption in the fielddisruption in the field
Visualization in WestGridSlide 63 of 75
Visualization in WestGridSlide 63 of 75
Components of the visualizationComponents of the visualization
• Use the Construct module to create a line– Origin: {[0 0 -50]}
• Use the Construct module to create a line– Origin: {[0 0 -50]}– Deltas: {[0 0 1]}– Counts: [1 1 101]– Data: {1}
• The Tube module creates a cylinder around the line– Diameter: 20.0– Ngon: 25
– Deltas: {[0 0 1]}– Counts: [1 1 101]– Data: {1}
• The Tube module creates a cylinder around the line– Diameter: 20.0– Ngon: 25
November 5, 2008November 5, 2008
g• The Color module does just that
– Color: “purple”– Opacity: 0.3
g• The Color module does just that
– Color: “purple”– Opacity: 0.3
Visualization in WestGridSlide 64 of 75
Visualization in WestGridSlide 64 of 75
11/4/2008
33
Components of the visualizationComponents of the visualization
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 65 of 75Visualization in WestGrid
Slide 65 of 75
Components of the visualizationComponents of the visualization
• When we put it all together and select the camera angle that we want we hopefully
• When we put it all together and select the camera angle that we want we hopefully camera angle that we want we hopefully have what we want …
• My goals– Show a variety of techniques that I can apply
to this data set– Provide enough annotation to orient the
camera angle that we want we hopefully have what we want …
• My goals– Show a variety of techniques that I can apply
to this data set– Provide enough annotation to orient the
November 5, 2008November 5, 2008
Provide enough annotation to orient the viewer
– Make it look nice
Provide enough annotation to orient the viewer
– Make it look nice
Visualization in WestGridSlide 66 of 75
Visualization in WestGridSlide 66 of 75
11/4/2008
34
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 67 of 75Visualization in WestGrid
Slide 67 of 75
DebuggingDebugging
• Debugging• Sometimes things aren’t working and you • Debugging• Sometimes things aren’t working and you • Sometimes things aren t working and you
just don’t know why• OpenDX’s equivalent of the “print”
statement is the Describe module• Attach the Describe module to the output
port of any module that is providing a
• Sometimes things aren t working and you just don’t know why
• OpenDX’s equivalent of the “print” statement is the Describe module
• Attach the Describe module to the output port of any module that is providing a
November 5, 2008November 5, 2008
p y p gfield and Describe will give you a summary of what the module is providing in the Message Window.
p y p gfield and Describe will give you a summary of what the module is providing in the Message Window.
Visualization in WestGridSlide 68 of 75
Visualization in WestGridSlide 68 of 75
11/4/2008
35
DebuggingDebugging
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 69 of 75Visualization in WestGrid
Slide 69 of 75
Scientific VisualizationScientific Visualization
• lots of info on the web h i t d t t
• lots of info on the web h i t d t t• we have some introductory pages at
– http://sciviz.aict.ualberta.ca• we have some introductory pages at
– http://sciviz.aict.ualberta.ca
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 70 of 75Visualization in WestGrid
Slide 70 of 75
11/4/2008
36
WestGrid Future VisualizationWestGrid Future Visualization
• nothing definite yet• vendors are supplying Viz Clusters to • nothing definite yet• vendors are supplying Viz Clusters to vendors are supplying Viz Clusters to
provide the functionality of the VAN• a Viz Cluster is:
– a bunch of PC parts– graphics processing units (GPUs) for rendering– software to tie it all together
vendors are supplying Viz Clusters to provide the functionality of the VAN
• a Viz Cluster is:– a bunch of PC parts– graphics processing units (GPUs) for rendering– software to tie it all togethersoftware to tie it all together
• a Viz Cluster– combines cpus for numerical computations– combines gpus for graphics rendering
software to tie it all together• a Viz Cluster
– combines cpus for numerical computations– combines gpus for graphics rendering
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 71 of 75Visualization in WestGrid
Slide 71 of 75
WestGrid Future VisualizationWestGrid Future Visualization• a viz cluster is generally running a version
of Linux with• a viz cluster is generally running a version
of Linux with– Message Passing Interface (MPI/Pro, Mpich or
LAM/MPI) for inter-process communication– Distributed MultiHead X (DMX) to create a
single X Windows session across multiple displays
– Chromium is used to distribute OpenGL work
– Message Passing Interface (MPI/Pro, Mpich or LAM/MPI) for inter-process communication
– Distributed MultiHead X (DMX) to create a single X Windows session across multiple displays
– Chromium is used to distribute OpenGL workChromium is used to distribute OpenGL work– VNC for remote access to the server
Chromium is used to distribute OpenGL work– VNC for remote access to the server
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 72 of 75Visualization in WestGrid
Slide 72 of 75
11/4/2008
37
WestGrid Future VisualizationWestGrid Future Visualization
Distributed Rendering Tile Display
November 5, 2008November 5, 2008
Remote CollaborationVisualization in WestGrid
Slide 73 of 75Visualization in WestGrid
Slide 73 of 75
VendorsVendors• HP Scalable Visualization Array
– http://h20311.www2.hp.com/HPC/cache/281• HP Scalable Visualization Array
– http://h20311.www2.hp.com/HPC/cache/281455-0-0-0-121.html
• IBM Deep Computing Visualization– http://www-
03.ibm.com/systems/deepcomputing/visualization/
S Vi li ti S t
455-0-0-0-121.html• IBM Deep Computing Visualization
– http://www-03.ibm.com/systems/deepcomputing/visualization/
S Vi li ti S t• Sun Visualization System– http://www.sun.com/servers/visualization/
• Sun Visualization System– http://www.sun.com/servers/visualization/
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 74 of 75Visualization in WestGrid
Slide 74 of 75
11/4/2008
38
The EndThe EndThe EndThe End•• Questions?Questions?•• Questions?Questions?
November 5, 2008November 5, 2008Visualization in WestGrid
Slide 75 of 75Visualization in WestGrid
Slide 75 of 75