230 likes | 349 Views
Practical Tools for Computational Steering. Computational steering within the RealityGrid project. S. M. Pickles, R. Haines, R. L. Pinning and A. R. Porter UK e-Science All Hands Meeting, 2004 2 nd September 2004. Overview. Computational steering in RealityGrid
E N D
Practical Tools for Computational Steering Computational steering within the RealityGrid project S. M. Pickles, R. Haines, R. L. Pinning and A. R. Porter UK e-Science All Hands Meeting, 2004 2nd September 2004
Overview • Computational steering in RealityGrid • RealityGrid Steering API basics • On-line Visualization • Steering clients • Some examples • Summary Supercomputing, Visualization and e-Science Group, Manchester Computing
Computational Steering in RealityGrid Motivation, approach and architecture…
Motivation • RealityGrid is a 3 year EPSRC e-Science pilot project • Intended to bring Grid technology to bear in the field of condensed-matter physics, especially large-scale computer simulation • We deal with existing scientific codes, typically parallel and written in F90, C or C++ • Aim to provide generic tools to enable a physicist to make their own code steerable • They retain ownership of the code and the changes • They choose how much to implement • Avoid branching the source code into steerable and non-steerable versions • They are able to maintain the code in the future • Performance is important – allow steering clients/visualizations to be attached and detached as required Supercomputing, Visualization and e-Science Group, Manchester Computing
Approach • Wish to retain flexibility while making it as easy as possible for a scientist to begin using computational steering • Computational steering systems often tie the user to a specific visualization package or development/runtime environment • We explicitly separate the steering functionality from any visualization capability • Can do one without the other • Reduces software dependencies • Lowers barrier to initial uptake of steering • Adopt a component-based approach • Simulation, visualization & steering client are distinct components • Components can be run on different machines to suit their requirements • Allows our work to be taken-up in component-based frameworks • Range of codes, platforms and languages steering library in C Supercomputing, Visualization and e-Science Group, Manchester Computing
Steering library Steering library Steering library Architecture – user’s view Simulation message transfer (XML) Client data transfer (binary) Visualization Visualization Supercomputing, Visualization and e-Science Group, Manchester Computing
RealityGrid Steering library • Steering API implemented as a library in C • Can be called from F90, C and C++ • Library distribution includes F90 and C examples • Library provides: • Pause/resume and stop • Set values of steerable parameters • Report values of monitored (read-only) parameters • Emit "samples" to remote systems for e.g. on-line visualization • Consume "samples" from remote systems for e.g. resetting boundary conditions • Checkpoint and restart • Automatic emit/consume with steerable frequency Supercomputing, Visualization and e-Science Group, Manchester Computing
RealityGrid Steering API Basics - walkthrough • Initialize lib & register supported commands (e.g. stop, pause) • Register any steerable/monitored variables • Register any “IOTypes” – used for emitting/consuming data sets • e.g. for sending data out for on-line visualization • Register any “ChkTypes” – used for checkpoint management • Call “Steering_control” from within the main loop of the code • Respond to any commands received from steering client • e.g. emit a data set, create and register a checkpoint, stop etc. • Clean up when program finished Supercomputing, Visualization and e-Science Group, Manchester Computing
RealityGrid Steering Library continued… • No restriction on paradigm or harness for parallel codes • Basic instrumentation is achieved with five calls to the library • Reverse communication used • Library passes back instructions to the application (e.g. “take a checkpoint now”) • Library contains both file- and SOAP/socket implementations • Steering messages read from/written to file or sent as SOAP messages to a Grid service interface to the application • Data sets read from/written to file or sent down a socket connection between applications • Code development can be performed free of Grid/networking complexity Supercomputing, Visualization and e-Science Group, Manchester Computing
On-line Visualization Obtaining visual feedback from a simulation
On-line Visualization • Often, but not always, an important part of computational steering • Provides feedback to the scientist on the state of the simulation and the effect of any steering activity • A useful debugging aid • RealityGrid steering library provides support for emitting and consuming data • May be used to construct the communication channel between simulation and visualization • Alternatively, any existing visualization functionality may be used • The steering API is neutral to the implementation of the data IO • Steering library supports both file- and socket-based data transfer (chosen at compile time) • Socket connection established automatically if using Grid-service steering interface Supercomputing, Visualization and e-Science Group, Manchester Computing
On-line Visualization cont’d… • Typically use vtk with reader implemented using RealityGrid steering library • Work underway on a data reader for AVS/Express • In principle, visualization can be steerable but is normal to use visualization-specific GUI • Component based architecture allows visualization to be run on any suitable machine • Images brought back to desktop using e.g. SGI VizServer, Chromium • Images broadcast to AccessGrid Supercomputing, Visualization and e-Science Group, Manchester Computing
Steering clients Qt-based desktop steering client from MC .Net-based PDA steering client from Loughborough Web portal steering client from epcc
Steering clients • Desktop, Qt-based steering client • Real-time plotting of monitored parameters • Buffered data may be saved to file • Multiple simulations may be steered simultaneously • Can steer local & remote jobs • Control of IO and checkpointing • Requires Qt and Qwt to build • Has been ported to Windows XP Supercomputing, Visualization and e-Science Group, Manchester Computing
Steering in Starbucks - PDA client Parameter screen Job screen Graph screen Supercomputing, Visualization and e-Science Group, Manchester Computing
Steering over the web • Developed by M Egbert of epcc • Written in Java using GridSphere • Minimal dependencies on client-side software Supercomputing, Visualization and e-Science Group, Manchester Computing
LBE3D - Lattice Boltzmann simulation of miscible fluids • Parallel (MPI), F90 code • Large number of steerable/monitored parameters (configured in input file) • Control of output of ‘colour’ data field – allows progress of e.g. phase separation to be monitored via on-line visualization • visualization is bespoke vtk application using steering library to read data • Uses Tcl for GUI and event loop to allow automatic updates when new data available • Have integrated with Chromium for higher-resolution AG displays • Pause facility (useful for demonstrations/deliberations) Supercomputing, Visualization and e-Science Group, Manchester Computing
LBE3D functionality… • Checkpoint, restart and rewind • LB3D registers all checkpoints it creates with the steering library • Checkpoint tree built up over time • Persistent record of work done (including all steering activity) • A running LBE3D can be requested to rewind • Steering used to investigate phase space of oil/water/surfactant systems by adjusting strength of oil-water interaction • used with small models to inform what jobs to run with large models Supercomputing, Visualization and e-Science Group, Manchester Computing
Supercomputing, Visualization and e-Science Group, Manchester Computing
Summary • RealityGrid takes a component-based approach to steering and on-line visualization • Application is instrumented by making calls to steering library • Emphasis on enabling the scientist to do this themselves • Steering library can also be used to send data to remote visualization • Code and documentation available from http://www.sve.man.ac.uk/Research/AtoZ/RealityGrid/ • Variety of steering clients available Supercomputing, Visualization and e-Science Group, Manchester Computing