Analysis and Visualization Algorithms in VMD

Similar documents
John E. Stone. S03: High Performance Computing with CUDA. Heterogeneous GPU Computing for Molecular Modeling

Faster, Cheaper, Better: Biomolecular Simulation with NAMD, VMD, and CUDA

In-Situ Visualization and Analysis of Petascale Molecular Dynamics Simulations with VMD

High Performance Molecular Visualization and Analysis on GPUs

High Performance Molecular Simulation, Visualization, and Analysis on GPUs

GPU-Accelerated Analysis of Petascale Molecular Dynamics Simulations

GPU-Accelerated Molecular Visualization and Analysis with VMD

Accelerating Molecular Modeling Applications with Graphics Processors

Accelerating Molecular Modeling Applications with GPU Computing

Using GPUs to compute the multilevel summation of electrostatic forces

Visualization and Analysis of Petascale Molecular Dynamics Simulations

GPU Histogramming: Radial Distribution Functions

Accelerating Molecular Modeling Applications with GPU Computing

Case Study: Molecular Modeling Applications John E. Stone

GPU-Accelerated Visualization and Analysis of Petascale Molecular Dynamics Simulations

Early Experiences Scaling VMD Molecular Visualization and Analysis Jobs on Blue Waters

Multilevel Summation of Electrostatic Potentials Using GPUs

GPU Accelerated Visualization and Analysis in VMD

S4410: Visualization and Analysis of Petascale Molecular Simulations with VMD

VMD: Immersive Molecular Visualization and Interactive Ray Tracing for Domes, Panoramic Theaters, and Head Mounted Displays

B. Evaluation and Exploration of Next Generation Systems for Applicability and Performance (Volodymyr Kindratenko, Guochun Shi)

VMD Key Features of Recent Release

Broadening the Use of Scalable Kernels in NAMD/VMD

Experiences Developing and Maintaining Scientific Applications on GPU-Accelerated Platforms

Scaling in a Heterogeneous Environment with GPUs: GPU Architecture, Concepts, and Strategies

Using GPUs to Supercharge Visualization and Analysis of Molecular Dynamics Simulations with VMD

GPU-Accelerated Analysis of Large Biomolecular Complexes

Portland State University ECE 588/688. Graphics Processors

Journal of Computational Physics

High Performance Molecular Visualization and Analysis with GPU Computing

Improving NAMD Performance on Volta GPUs

Lecture 1: Introduction and Computational Thinking

High Performance Computing with Accelerators

CSE 591/392: GPU Programming. Introduction. Klaus Mueller. Computer Science Department Stony Brook University

Interactive Supercomputing for State-of-the-art Biomolecular Simulation

CUDA Applications I. John E. Stone

General Purpose GPU Computing in Partial Wave Analysis

Presenting: Comparing the Power and Performance of Intel's SCC to State-of-the-Art CPUs and GPUs

S5386 Publication-Quality Ray Tracing of Molecular Graphics with OptiX

NVIDIA GTX200: TeraFLOPS Visual Computing. August 26, 2008 John Tynefield

CS 179: GPU Computing LECTURE 4: GPU MEMORY SYSTEMS

Tesla GPU Computing A Revolution in High Performance Computing

CME 213 S PRING Eric Darve

CUDA Experiences: Over-Optimization and Future HPC

Adaptive-Mesh-Refinement Hydrodynamic GPU Computation in Astrophysics

Large scale Imaging on Current Many- Core Platforms

Accelerating CFD with Graphics Hardware

CS427 Multicore Architecture and Parallel Computing

CSE 591: GPU Programming. Introduction. Entertainment Graphics: Virtual Realism for the Masses. Computer games need to have: Klaus Mueller

GPU Acceleration of Particle Advection Workloads in a Parallel, Distributed Memory Setting

2006: Short-Range Molecular Dynamics on GPU. San Jose, CA September 22, 2010 Peng Wang, NVIDIA

Technology for a better society. hetcomp.com

Performance potential for simulating spin models on GPU

Tesla GPU Computing A Revolution in High Performance Computing

Lecture 13: Memory Consistency. + a Course-So-Far Review. Parallel Computer Architecture and Programming CMU , Spring 2013

Immersive Out-of-Core Visualization of Large-Size and Long-Timescale Molecular Dynamics Trajectories

CUDA PROGRAMMING MODEL Chaithanya Gadiyam Swapnil S Jadhav

Accelerating Scientific Applications with GPUs

GPUs and GPGPUs. Greg Blanton John T. Lubia

Kernel optimizations Launch configuration Global memory throughput Shared memory access Instruction throughput / control flow

GPU-accelerated data expansion for the Marching Cubes algorithm

Fundamental Optimizations

Supercomputing, Tutorial S03 New Orleans, Nov 14, 2010

CUDA Accelerated Linpack on Clusters. E. Phillips, NVIDIA Corporation

Accelerating Image Feature Comparisons using CUDA on Commodity Hardware

Advanced CUDA: Application Examples

Proteins and Mesoscale Data: Visualization of Molecular Dynamics

Lecture 5: Input Binning

Simulating Life at the Atomic Scale

Optimisation Myths and Facts as Seen in Statistical Physics

GPU Clusters for High- Performance Computing Jeremy Enos Innovative Systems Laboratory

Optimization solutions for the segmented sum algorithmic function

Lecture 15: Introduction to GPU programming. Lecture 15: Introduction to GPU programming p. 1

CUDA Optimization with NVIDIA Nsight Visual Studio Edition 3.0. Julien Demouth, NVIDIA

GRAPHICS PROCESSING UNITS

ParalleX. A Cure for Scaling Impaired Parallel Applications. Hartmut Kaiser

International Supercomputing Conference 2009

Tuning CUDA Applications for Fermi. Version 1.2

ECE 498AL. Lecture 21-22: Application Performance Case Studies: Molecular Visualization and Analysis

CUDA. Schedule API. Language extensions. nvcc. Function type qualifiers (1) CUDA compiler to handle the standard C extensions.

Graphics Processor Acceleration and YOU

Particle-in-Cell Simulations on Modern Computing Platforms. Viktor K. Decyk and Tajendra V. Singh UCLA

The Uintah Framework: A Unified Heterogeneous Task Scheduling and Runtime System

OPTIMIZING HPC SIMULATION AND VISUALIZATION CODE USING NVIDIA NSIGHT SYSTEMS

When MPPDB Meets GPU:

Building NVLink for Developers

Parallelising Pipelined Wavefront Computations on the GPU

Accelerating the Implicit Integration of Stiff Chemical Systems with Emerging Multi-core Technologies

Scalable Multi Agent Simulation on the GPU. Avi Bleiweiss NVIDIA Corporation San Jose, 2009

GPU Computing: Development and Analysis. Part 1. Anton Wijs Muhammad Osama. Marieke Huisman Sebastiaan Joosten

S05: High Performance Computing with CUDA. Case Study: Molecular Visualization and Analysis

Evaluation and Exploration of Next Generation Systems for Applicability and Performance Volodymyr Kindratenko Guochun Shi

Accelerating Computational Biology by 100x Using CUDA. John Stone Theoretical and Computational Biophysics Group, University of Illinois

Threading Hardware in G80

Parallel FFT Program Optimizations on Heterogeneous Computers

Parallel Programming Principle and Practice. Lecture 9 Introduction to GPGPUs and CUDA Programming Model

B. Tech. Project Second Stage Report on

GPU Acceleration of Molecular Modeling Applications

2009: The GPU Computing Tipping Point. Jen-Hsun Huang, CEO

J. Blair Perot. Ali Khajeh-Saeed. Software Engineer CD-adapco. Mechanical Engineering UMASS, Amherst

Transcription:

1 Analysis and Visualization Algorithms in VMD David Hardy Research/~dhardy/ NAIS: State-of-the-Art Algorithms for Molecular Dynamics (Presenting the work of John Stone.)

VMD Visual Molecular Dynamics Visualization and analysis of molecular dynamics simulations, sequence data, volumetric data, quantum chemistry simulations, particle systems, User extensible with scripting and plugins Research/vmd/ 2

GPU Accelerated Trajectory Analysis and Visualization in VMD 3 GPU-Accelerated Feature Molecular orbital display Radial distribution function Electrostatic field calculation Molecular surface display Ion placement MDFF density map synthesis Implicit ligand sampling Root mean squared fluctuation Radius of gyration Close contact determination Dipole moment calculation GPU Speedup 120x 92x 44x 40x 26x 26x 25x 25x 21x 20x 15x

VMD for Demanding Analysis Tasks Parallel VMD Analysis w/ MPI Analyze trajectory frames, structures, or sequences in parallel on clusters and supercomputers: Compute time-averaged electrostatic fields, MDFF quality-of-fit, etc. Parallel rendering, movie making Addresses computing requirements beyond desktop User-defined parallel reduction operations, data types Dynamic load balancing: Tested with up to 15,360 CPU cores Supports GPU-accelerated clusters and supercomputers Sequence/Structure Data, Trajectory Frames, etc VMD VMD VMD Gathered Results Data-Parallel Analysis in VMD 4

Time-Averaged Electrostatics Analysis on Energy-Efficient GPU Cluster 1.5 hour job (CPUs) reduced to 3 min (CPUs+GPU) Electrostatics of thousands of trajectory frames averaged Per-node power consumption on NCSA AC GPU cluster: CPUs-only: 299 watts CPUs+GPUs: 742 watts GPU Speedup: 25.5x Power efficiency gain: 10.5x 5 Quantifying the Impact of GPUs on Performance and Energy Efficiency in HPC Clusters. J. Enos, C. Steffen, J. Fullop, M. Showerman, G. Shi, K. Esler, V. Kindratenko, J. Stone, J. Phillips. The Work in Progress in Green Computing, pp. 317-324, 2010.

6 Time-Averaged Electrostatics Analysis on NCSA Blue Waters Early Science System NCSA Blue Waters Node Type Cray XE6 Compute Node: 32 CPU cores (2xAMD 6200 CPUs) Cray XK6 GPU-accelerated Compute Node: 16 CPU cores + NVIDIA X2090 (Fermi) GPU Speedup for GPU XK6 nodes vs. CPU XE6 nodes Seconds per trajectory frame for one compute node 9.33 2.25 GPU nodes are 4.15x faster overall Preliminary performance for VMD time-averaged electrostatics w/ Multilevel Summation Method running Blue Waters Early Science System

7 Visualizing Molecular Orbitals Visualization of MOs aids in understanding the chemistry of molecular system Display of MOs can require tens to hundreds of seconds on multi-core CPUs, even with hand-coded SSE GPUs enable MOs to be computed and displayed in a fraction of a second, fully interactively

8 Small 8x8 thread blocks afford large per-thread register count, shared memory Each thread computes one MO lattice point. MO GPU Parallel Decomposition MO 3-D lattice decomposes into 2-D slices (CUDA grids) 0,0 0,1 1,0 1,1 GPU 2 GPU 1 GPU 0 Lattice can be computed using multiple GPUs Threads producing results that are used Padding optimizes global memory performance, guaranteeing coalesced global memory accesses Grid of thread blocks Threads producing results that are discarded

VMD MO GPU Kernel Snippet: Loading Tiles Into Shared Memory On-Demand Shared memory tiles: Tiles are checked and loaded, if necessary, immediately prior to entering key arithmetic loops Adds additional control overhead to loops, even with optimized implementation 9

VMD MO GPU Kernel Snippet: Fermi kernel based on L1 cache L1 cache: Simplifies code! Reduces control overhead Gracefully handles arbitrary-sized problems 10 Matches performance of constant memory

VMD Single-GPU Molecular Orbital 11 Performance Results for C 60 Intel X5550 CPU, GeForce GTX 480 GPU Kernel Cores/GPUs Runtime (s) Speedup Xeon 5550 ICC-SSE 1 30.64 1.0 Xeon 5550 ICC-SSE 8 4.13 7.4 CUDA shared mem 1 0.37 83 CUDA L1-cache (16KB) 1 0.27 113 CUDA const-cache 1 0.26 117 CUDA const-cache, zero-copy 1 0.25 122 Fermi GPUs have caches: may outperform hand-coded shared memory kernels. Zero-copy memory transfers improve overlap of computation and host-gpu I/Os.

VMD Multi-GPU Molecular Orbital 12 Performance Results for C 60 Intel X5550 CPU, 4x GeForce GTX 480 GPUs, Kernel Cores/GPUs Runtime (s) Speedup Intel X5550-SSE 1 30.64 1.0 Intel X5550-SSE 8 4.13 7.4 GeForce GTX 480 1 0.255 120 GeForce GTX 480 2 0.136 225 GeForce GTX 480 3 0.098 312 GeForce GTX 480 4 0.081 378 Uses persistent thread pool to avoid GPU init overhead, dynamic scheduler distributes work to GPUs

13 Molecular Orbital Computation and Display Process One-time initialization Initialize Pool of GPU Worker Threads Read QM simulation log file, trajectory Preprocess MO coefficient data eliminate duplicates, sort by type, etc For current frame and MO index, retrieve MO wavefunction coefficients For each trj frame, for each MO shown Compute 3-D grid of MO wavefunction amplitudes Most performance-demanding step, run on GPU Extract isosurface mesh from 3-D MO grid Apply user coloring/texturing and render the resulting surface

14 Multi-GPU Load Balance Many early CUDA codes assumed all GPUs were identical Host machines may contain a diversity of GPUs of varying capability (discrete, IGP, etc) Different GPU on-chip and global memory capacities may need different problem tile sizes Static decomposition works poorly for non-uniform workload, or diverse GPUs GPU 1 14 SMs GPU N 30 SMs

15 Multi-GPU Dynamic Work Distribution // Each GPU worker thread loops over // subset 2-D planes in a 3-D cube while (!threadpool_next_tile(&parms, tilesize, &tile){ } // Process one plane of work // Launch one CUDA kernel for each // loop iteration taken // Shared iterator automatically // balances load on GPUs GPU 1 Dynamic work distribution GPU N

Example Multi-GPU Latencies Relevant to Interactive Sci-Viz, Script-Driven Analyses (4 Tesla C2050 GPUs, Intel Xeon 5550) 16 6.3us CUDA empty kernel (immediate return) 9.0us Sleeping barrier primitive (non-spinning barrier that uses POSIX condition variables to prevent idle CPU consumption while workers wait at the barrier) 14.8us pool wake, host fctn exec, sleep cycle (no CUDA) 30.6us pool wake, 1x(tile fetch, simple CUDA kernel launch), sleep 1817.0us pool wake, 100x(tile fetch, simple CUDA kernel launch), sleep

Multi-GPU Dynamic Scheduling Performance with Heterogeneous GPUs Kernel Cores/GPUs Runtime (s) Speedup Intel X5550-SSE 1 30.64 1.0 Quadro 5800 1 0.384 79 Tesla C2050 1 0.325 94 GeForce GTX 480 1 0.255 120 GeForce GTX 480 + Tesla C2050 + Quadro 5800 3 0.114 268 (91% of ideal perf) 17 Dynamic load balancing enables mixture of GPU generations, SM counts, and clock rates to perform well.

Multi-GPU Runtime Error/Exception Handling Competition for resources from other applications can cause runtime failures, e.g. GPU out of memory half way through an algorithm Handle exceptions, e.g. convergence failure, NaN result, insufficient compute capability/features Handle and/or reschedule failed tiles of work Retry Stack GPU 1 SM 1.1 128MB Original Workload GPU N SM 2.0 3072MB 18

19 Radial Distribution Functions RDFs describes how atom density varies with distance Can be compared with experiments Shape indicates phase of matter: sharp peaks appear for solids, smoother for liquids Quadratic time complexity O(N2) Solid Liquid

20 Computing RDFs Compute distances for all pairs of atoms between two groups of atoms A and B A and B may be the same, or different Use nearest image convention for periodic systems Each pair distance is inserted into a histogram Histogram is normalized one of several ways depending on use, but usually according to the volume of the spherical shells associated with each histogram bin

21 Multi-GPU RDF Performance 4 NVIDIA GTX480 GPUs 30 to 92x faster than 4-core Intel X5550 CPU Fermi GPUs ~3x faster than GT200 GPUs: larger on-chip shared memory Solid Liquid Fast Analysis of Molecular Dynamics Trajectories with Graphics Processing Units Radial Distribution Functions. B. Levine, J. Stone, and A. Kohlmeyer. 2010. (submitted)

Molecular Surface Display: QuickSurf Representation Displays continuum of structural detail: All-atom models Coarse-grained models Cellular scale models Multi-scale models: All-atom + CG, Brownian + Whole Cell Smoothly variable between full detail, and reduced resolution representations of very large complexes Uses multi-core CPUs and GPU acceleration to enable smooth real-time animation of MD trajectories Linear-time algorithm, scales to hundreds of millions of particles, as limited by memory capacity 22 Fast Visualization of Gaussian Density Surfaces for Molecular Dynamics and Particle System Trajectories. M. Krone, J. Stone, T. Ertl, K. Schulten. EuroVis 2012. (Submitted)

Recurring Algorithm Design Principles (1) 23 Extensive use of on-chip shared memory and constant memory to further amplify memory bandwidth Pre-processing and sorting of operands to organize computation for peak efficiency on the GPU, particularly for best use of L1 cache and shared mem Tiled/blocked data structures in GPU global memory for peak bandwidth utilization Use of CPU to regularize the work done by the GPU, handle exceptions & unusual work units Asynchronous operation of CPU/GPU enabling overlapping of computation and I/O on both ends

24 Recurring Algorithm Design Principles (2) Take advantage of special features of the GPU memory systems Broadcasts, wide loads/stores (float4, double2), texture interpolation, write combining, etc. Avoid doing complex array indexing arithmetic within the GPU threads, precompute as much as possible outside of the GPU kernel so the GPU is doing what it s best at: floating point arithmetic