730 likes | 858 Vues
The P-GRADE Visual Parallel Programming Environment. Péter Kacsuk Laboratory of Parallel and Distributed Systems MTA SZTAKI Research Institute kacsuk@sztaki.hu www.lpds.sztaki.hu. Programming?. Observing?. Problems of Developing Parallel Programs. High-Speed Switch.
E N D
The P-GRADE Visual Parallel Programming Environment Péter Kacsuk Laboratory of Parallel and Distributed Systems MTA SZTAKI Research Institute kacsuk@sztaki.hu www.lpds.sztaki.hu
Programming? Observing? Problems of Developing Parallel Programs High-Speed Switch
Our Solution: P-GRADE • P-GRADE is a parallel programming environment which supports the whole life-cycle of parallel program development • For non-specialist programmers it provides a complete solution for efficient and easy parallel program development • Fast reengineering of sequential programs for parallel computers • Unified graphical support in program design, debugging and performance analysis • Portability on supercomputers and heterogeneous workstation/PC clusters based on PVM and MPI
Tools of P-GRADE • GRAPNEL: Hybrid Parallel Prog. Language • Graphics to express parallelism • C/C++ to describe sequential parts • GRED: Graphical Editor • GRP2C: Pre-compiler to (C/C++)+(PVM/MPI) • DIWIDE: Integrated distributed debugger and animation system • GRM: distributed monitoring system • PROVE: Integrated visualisation tool
Parallel Program Design GRAPNEL GRED GRP file Mapping User mapping GRP file Pre-compilation PVM Library MPI Library GRP2C C source code, Cross-ref file, Make file GRM Library GRM Library Building executables GRP-PVM C compiler, linker GRP-MPI executables Debugging Monitoring DIWIDE GRM Trace file Visualisation PROVE Life-cycle of Parallel Program Development and its support in P-GRADE
Design Goals of GRAPNEL • Graphical interface • to define all parallel activities • Strong support for hierarchical design • Visual abstractions to hide the low level details of message-passing • C/C++ (or Fortran) to describe sequential parts • Strong support for parallelizing sequential applications • Support for programming in large • No steep learning curve • GRAPNEL = (C/C++) + graphics
GRAPNEL: GRaphical Process NEt Language • Programming paradigm: message-passing • component processes run in parallel and can interact only by means of sending and receiving messages • Communication model: • point-to-point, synchronous/asynchronous • collective (e.g. multicast, scatter, reduce, etc.) • Process model: • single processes • process groups • predefined process communication templates
GRAPNEL • Hierarchical design levels: • Graphics used at application level: • Defines interprocess communication topology • Port protocols • Graphics hides PVM/MPI function calls • Support for SPMD programming style • Predefined communication patterns • Automatic scaling of parallel programs
Communication Templates • Pre-defined regular process topologies • process farm • pipeline • 2D mesh • tree • User defines: • representative processes • actual size • Automatic scaling
spawn(N); Master Send work packages send(); Slave1 Slave2 SlaveN recv(); Collect results The process farm parallelisation approach The code of each slave is the same.
Process Groups • Hierarchical design(subgraph abstraction) • Collective communication(group ports) • multicast • scatter • gather • reduce
GRAPNEL • Hierarchical design levels: • Graphics used at process internal level • C/C++ used at the text level • Synch/asynch. comm. • Programming in large: • Any C/C++ library call can be included in text blocks • Graphical support for object-based programming
GRAPNEL • Structuring facility by macro graphs
multicast scatter gather GRAPNEL reduce Userdef (grp_in) Point-point Userdef (grp_out) gather scatter
GRED Editor • Supports the creation of all the elements of GRAPNEL • Drag-and-drop style of drawing • Cut/copy/paste/move on graphical objects • Automatic port positioning with minimal lengths and crossing of communication channels
GRED Editor • Extremely easy and fast construction of process graph • Automatic arrange of the process graph • Automatic resizing of process windows • Cut/copy/paste on graphical objects • Macro graph construction at arbitrarily nested level • C/C++ code can be edited by any standard text editor
GRAPNEL Generated code C/C++ C/C++ graphics GRP2C PVM/MPI GRP2C Pre-compiler • Automatic generation of PVM and MPI calls based on GRAPNEL graphics • Automatic code instrumentation for debugging and performance monitoring
Observing? Debugging Parallel Programs High-Speed Switch
Principle of sequential program debugging • Reproducibility - determinism • For the same input set the sequential program delivers always the same output set (even if the program is incorrect) • Used technique: cyclic debugging • breakpoints • step-by-step execution
Problem of parallel program debugging • Non-reproducibility (non-determinism) • For the same input set the incorrect parallel program can deliver different output sets • Cyclic debugging cannot be used • breakpoints • step-by-step execution
Classification of parallel debuggers Parallel running seq. debuggers Replayable debuggers Monitor&replay Control&replay
DIWIDEDebugger • Graphical and C/C++ level debug support (breakpoints, variable inspection, etc.) • 3 kinds of “step by step execution”, according to the programmer’s demand: • Instruction by instruction, • Graphical item by graphical item, • Macrostep by macrostep • Visualisation and animation support
Classification of parallel debuggers Parallel running seq. debuggers Replayable debuggers Monitor&replay Control&replay
Classification of parallel breakpoints Local breakpoints Global breakpoints Individual breakpoints Collective breakpoints
P2 P3 P1 S2 S3 S1 A3 A1 A2 B2 C2 B3 B1 D2 E3 E1 E2 Principle of Macrostep Debugging Macrosteps Collective Breakpoints M0 = {S1-> A1, S2-> A2, S3-> A3} A1 A2 A3 M1 = {A1-> B1, A2-> B2, A3-> B3} B1 B2 B3 M2 = {B1-> B1, B2-> C2, B3-> B3} B1 C2 B3 M3 = {B1-> B1, C2-> D2, B3-> E3} B1 D2 E3 M4 = {B1-> E1, D2-> E2} E1 E2 where Si = Starti and Ei = Endi • Parallel debugging is as easy as debugging traditional sequential programs.
Support for systematic debugging to handle non-deterministic behaviour of parallel applications Systematic and automatic generation of Execution Trees Testing parallel programs for all time conditions Replay technique with collective breakpoints Macrostep Debugging
Observing? Performance monitoring and analysis of Parallel Programs High-Speed Switch
Visualisation Systems What to visualise? Scientific (Data Oriented) Visualisation Program Visualisation Problem Visualisation (Alg. Animation) Goal of visualisation? Correctness Debugging Performance (Debugging) Visualisation Combined Visualisation
Program Visualisation Goal of visualisation? Correctness Debugging Performance Visualisation Combined Visualisation When to visualise? On-line Off-line Semi On-line
Phases of Performance Visualisation Source Code Instrumentation (GRAPNEL/GRED) Runtime Monitoring (GRM) Visualisation (PROVE) Data Analysis (PROVE)
Performance Visualisation Evaluation Criteria Source Code Instrumentation Scalability (Data handling) Versatility (Visualisation)
Source Code Instrumentation Manual or Automatic Filtering Monitoring modes Click-back facility Selectable program units On/off facility Individual Events Statistics
Scalability Data Acquisition Data Analysis & Display Filtering Turning tracing on/off Zooming Filtering Interactive Non-Interactive VISTOP Nupshot
Versatility Different views Interoperate with other tools Event views Statistics views No Yes
Standalone Performance Analysis Tools • VAMPIR • Pablo • ParaGraph • AIMS • Paradyn