260 likes | 375 Views
This document discusses the implementation of interactive computational steering in molecular dynamics (MD) simulations, particularly leveraging the CUMULVS framework. It outlines how parameters can be adjusted in real-time to enhance understanding of complex systems, allowing for "what-if" analyses and experimentation with dynamic program characteristics. The CUMULVS architecture facilitates collaborative visualization and steering, utilizing loose synchronization for consistent application states. Key advantages include fault tolerance and dynamic viewer connections, contributing to more effective explorations of molecular dynamics, including temperature management and force calculations.
E N D
Computational Steering Sathish Vadhiyar Sources/Credits: CUMULVS web sites and papers
Introduction • Parameters of the computation are adjusted on-the-fly to gain understanding of the problem • Respond to simulation results as they occur by manipulating the input parameters • For carrying out “what if” analysis • For experimenting with program characteristics whose effects are not easily understood • Allows interactive exploration of simulation in time and/or space
Motivation: Falcon Molecular Dynamics (MD) • Simulation of system containing 4800 particles representing an alkane film layered on 2700 particles representing a crystalline base • Simulation steps • Obtain location information from neighboring particles • Calculate intra-molecular forces • Calculate inter-molecular forces • Apply forces to yield new particle position • Publish particle’s new position • Other steps • Determining system-wide characteristics such as atomic temperature • Performing on-line data analysis and visualization • Simulation algorithm • Domain decomposition • Domains assigned to parallel processors • Cut-off radius in force calculation
Steering opportunities in MD • Changing decomposition geometries • Changing cut-off radius – speed/fidelity tradeoffs • Changing frequency of global temperature calculations based on temperature stability of the system
CUMULVS • Collaborative User Migration, User Library for Visualization and Steering • Provides 2 libraries • For application program • For visualization and steering front end • Can dynamically attach multiple viewer front ends to a running parallel application • Viewer programs can also steer one or more user-defined parameters • Also provides fault tolerance and migration across heterogeneous systems
CUMULVS – Application and Visualization Specification • Programmer specifies • Data distributions • Which parameters are allowed to be steered • To reduce network traffic, front-end viewers can specify a region for visualization including the granularity of the desired data
CUMULVS – Visualization and Steering – Coordination and Synchronization • Consistent view of the application’s state by the viewer through loose synchronization with the application • A viewer brackets the timesteps and ensures that all tasks are on one of the timesteps • Tasks A, B, and C can be at timesteps 10,12,11 • Steering parameter updates are marked with “apply-at” timestep
Viewer and steering interface • Viewer programs • Text-based • AVS-compatible viewer • Custom TCL/TK viewer • Token scheme prevents conflicting adjustments to the same steering parameter by different users • All tasks apply the steering changes in unison
Viewer and Steering Interface • Interfaces for • Initializing communications with the user application • Requesting data fields • Collecting data frames • Allocating data frame storage • Dumping data field values • User’s data field requests: • Set of data fields • Specific region of computational domain • Frequency of “data frames” • Cell size for each axis, i.e., data stride • Supports different Data decompositions
Viewer interfaces • stv_viewer_init • Initializes link with a specific user application • Gathers information about the data fields and parameters that are available from that application • Returns instance identifying a particular application • Another call for selecting data fields and specifying visualization regions • Data type and storage order can be specified • Set of fields specified in a single field request is called “view field group” • Also specifies visualization regions – bounds and cell sizes of data fields
Viewer Interfaces • stv_viewer_request_field() • Field request • Returns VFG instance that represents the group of data fields requested • stv_viewer_send_XON • Sends “XON” to the application • Application waits for XON message, polls for permission to continue with the next iteration
Viewer Interfaces - Miscellanious • stv_viewer_set_VisRegion() • For modifying visualization region of a VFG on the fly • Records new set of visualization bounds and cell sizes and sends update to the application • set_viewer_set_VisFrequency() • Controlling frequency of data frames
Steering interfaces • For iterative control • stv_viewer_steering_init • Creates loosely synchronized connection with the user application • Performs equivalent of special data field request • stv_viewer_steering_request • Obtains steering token for a particular parameter • If token unavailable, i.e. another viewer possesses it • When the possessing viewer releases the token, CUMULVS will broadcast a message informing all the requesting viewers
Steering Interfaces • stv_viewer_steer_parameter, stv_viewer_steer_vparameter • Changes values of parameters • The routines copy viewer data to an internal data structure • stv_viewer_send_NewParams() • Changed parameters are sent • stv_viewer_steering_release • Will relinquish steering token
Protocols for attaching to running application • CUMULVS uses application name supplied in the init call in the application for attaching • Application name registered in a database that indicates how to contact instance 0 of the application • Different phases – inquiry, request for attachment, data transfer, detachment
Protocols - Inquiry • Inquiry • Viewer looks up the application name, message context • Sends init0 message to task 0. • Task0 reply: total number of tasks, data decompositions, steering parameter particulars, current time step • Task0 forwards init0 message to other tasks • Other tasks contact the viewer and send their data and steering parameters
Protocols – Field Request • Field request – 3 phases • Viewer sends which fields are required. Tasks return their current time steps, timestep0. tasks compute till timestep0+1. • After viewer hears from all tasks, it calculates maximum of timestep0s, timestep1. sends timestep1 to tasks • Tasks compute until timestep1 and then send requested data fields to viewers
Example • Simulating propagation of an acoustic signal through a heterogeneous media • Solved by finite difference equations • Equation has pressure fields and sources • CUMULVS used to introduce arbitrary “thumps”
Example – CFD code Supercomputing Conference (from CUMULVS web site) CFD code for simulation of airflow over jet wing Peak in residual field due to an omitted column in computation
References / Sources / Credits • P. M. Papadopoulos, J. A. Kohl, B. D. Semeraro, ``CUMULVS: Extending a Generic Steering and Visualization Middleware for Application Fault-Tolerance,'' Proceedings of the 31st Hawaii International Conference on System Sciences (HICSS-31), Kona, Hawaii, January 1998. • G. A. Geist, J. A. Kohl, P. M. Papadopoulos, ``CUMULVS: Providing Fault-Tolerance, Visualization and Steering of Parallel Applications,'' International Journal of High Performance Computing Applications, Volume 11, Number 3, August 1997, pp. 224-236. • Falcon: On-line Monitoring and Steering of Parallel Programs, Weiming Gu, Greg Eisenhauer and Karsten Schwan, submitted to the IEEE Transactions on Parallel and Distributed Systems November 1994, revised September 1995.