the p-grade visual parallel programming environment

73
Computer and Automation Research Institute Computer and Automation Research Institute Hungarian Academy of Sciences Hungarian Academy of Sciences The P-GRADE The P-GRADE Visual Parallel Programming Visual Parallel Programming Environment Environment Péter Kacsuk Laboratory of Parallel and Distributed Systems MTA SZTAKI Research Institute [email protected] www.lpds.sztaki.hu

Upload: moanna

Post on 30-Jan-2016

30 views

Category:

Documents


0 download

DESCRIPTION

The P-GRADE Visual Parallel Programming Environment. Péter Kacsuk Laboratory of Parallel and Distributed Systems MTA SZTAKI Research Institute [email protected] www.lpds.sztaki.hu. Programming?. Observing?. Problems of Developing Parallel Programs. High-Speed Switch. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The P-GRADE  Visual Parallel Programming Environment

Computer and Automation Research InstituteComputer and Automation Research Institute

Hungarian Academy of SciencesHungarian Academy of Sciences

The P-GRADE The P-GRADE Visual Parallel Programming EnvironmentVisual Parallel Programming Environment

Péter KacsukLaboratory of Parallel and Distributed Systems

MTA SZTAKI Research Institute

[email protected]

www.lpds.sztaki.hu

Page 2: The P-GRADE  Visual Parallel Programming Environment

Problems of Developing Parallel Problems of Developing Parallel ProgramsPrograms

High-SpeedSwitch

Observing?

Programming?

Page 3: The P-GRADE  Visual Parallel Programming Environment

Our Solution: P-GRADEOur 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

Page 4: The P-GRADE  Visual Parallel Programming Environment

Tools of P-GRADETools 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

Page 5: The P-GRADE  Visual Parallel Programming Environment

Parallel Program Design

GRAPNEL

GRED

Mapping

User mapping

GRP file

Pre-compilation

GRP2C

C source code, Cross-ref file, Make file

Building executables

C compiler, linker

GRP-PVM

GRM Library

PVM Library

GRP-MPI

GRM Library

MPI Library

executables

Trace file

Monitoring

GRM

Visualisation

PROVE

Life-cycle of Life-cycle of Parallel Parallel Program Program Development Development and its and its support in support in P-GRADEP-GRADE

GRP file

Debugging

DIWIDE

Page 6: The P-GRADE  Visual Parallel Programming Environment

Design Goals of GRAPNELDesign 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

Page 7: The P-GRADE  Visual Parallel Programming Environment

GRAPNEL: GRaphical Process NEt LanguageGRAPNEL: 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

Page 8: The P-GRADE  Visual Parallel Programming Environment

Three layers of GRAPNELThree layers of GRAPNEL

Page 9: The P-GRADE  Visual Parallel Programming Environment

GRAPNELGRAPNEL

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

Page 10: The P-GRADE  Visual Parallel Programming Environment

Communication TemplatesCommunication Templates

• Pre-defined regular process topologies– process farm– pipeline– 2D mesh– tree

• User defines: – representative

processes– actual size

• Automatic scaling

Page 11: The P-GRADE  Visual Parallel Programming Environment

Mesh TemplateMesh Template

Page 12: The P-GRADE  Visual Parallel Programming Environment

Tree TemplateTree Template

Page 13: The P-GRADE  Visual Parallel Programming Environment

The process farm The process farm parallelisation approachparallelisation approach

Master

Send work packagessend();

Collect resultsrecv();

Slave1 Slave2 SlaveN

spawn(N);

The code of each slave is the same.

Page 14: The P-GRADE  Visual Parallel Programming Environment

Parallelising the Mandelbrot set Parallelising the Mandelbrot set computationcomputation

Page 15: The P-GRADE  Visual Parallel Programming Environment

Draw process outputDraw process output

Page 16: The P-GRADE  Visual Parallel Programming Environment

Compute process inputCompute process input

Page 17: The P-GRADE  Visual Parallel Programming Environment

Compute process outputCompute process output

Page 18: The P-GRADE  Visual Parallel Programming Environment

Draw process inputDraw process input

Page 19: The P-GRADE  Visual Parallel Programming Environment

Process GroupsProcess Groups

• Hierarchical design(subgraph abstraction)

• Collective communication(group ports)– multicast– scatter– gather– reduce

Page 20: The P-GRADE  Visual Parallel Programming Environment

GRAPNELGRAPNEL

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

Page 21: The P-GRADE  Visual Parallel Programming Environment

GRAPNELGRAPNEL

Structuring facility by macro graphs

Page 22: The P-GRADE  Visual Parallel Programming Environment

multicastgather

Userdef(grp_in)

reduce

scatter

Point-point

gatherscatter

Userdef(grp_out)

GRAPNELGRAPNEL

Page 23: The P-GRADE  Visual Parallel Programming Environment

Parallelising the Parallelising the Mandelbrot set Mandelbrot set

computationcomputation

Page 24: The P-GRADE  Visual Parallel Programming Environment

Parallelising the Parallelising the Mandelbrot set Mandelbrot set

computationcomputation

Page 25: The P-GRADE  Visual Parallel Programming Environment

Parallelising the Parallelising the Mandelbrot set Mandelbrot set

computationcomputation

Page 26: The P-GRADE  Visual Parallel Programming Environment

Parallelising the Parallelising the Mandelbrot set Mandelbrot set

computationcomputation

Page 27: The P-GRADE  Visual Parallel Programming Environment

GRED EditorGRED 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

Page 28: The P-GRADE  Visual Parallel Programming Environment

GRED EditorGRED 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

Page 29: The P-GRADE  Visual Parallel Programming Environment

GRP2C Pre-compilerGRP2C Pre-compiler

• Automatic generation of PVM and MPI calls based on GRAPNEL graphics

GRP2CC/C++

graphics

GRAPNEL

• Automatic code instrumentation for debugging and performance monitoring

C/C++

PVM/MPI

Generated code

Page 30: The P-GRADE  Visual Parallel Programming Environment

Debugging Parallel ProgramsDebugging Parallel Programs

High-SpeedSwitch

Observing?

Page 31: The P-GRADE  Visual Parallel Programming Environment

Principle of sequential program Principle of sequential program debuggingdebugging

• 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

Page 32: The P-GRADE  Visual Parallel Programming Environment

Problem of parallel program Problem of parallel program debuggingdebugging

• 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

Page 33: The P-GRADE  Visual Parallel Programming Environment

Classification of parallel Classification of parallel debuggersdebuggers

Parallel runningseq. debuggers

Replayabledebuggers

Monitor&replay Control&replay

Page 34: The P-GRADE  Visual Parallel Programming Environment

DIWIDEDIWIDE DebuggerDebugger

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

Page 35: The P-GRADE  Visual Parallel Programming Environment

Hierarchical Hierarchical Debugging by Debugging by

DIWIDEDIWIDE

Page 36: The P-GRADE  Visual Parallel Programming Environment

Classification of parallel Classification of parallel debuggersdebuggers

Parallel runningseq. debuggers

Replayabledebuggers

Monitor&replay Control&replay

Page 37: The P-GRADE  Visual Parallel Programming Environment

Classification of parallel Classification of parallel breakpointsbreakpoints

Local breakpoints

Global breakpoints

Individual breakpoints

Collectivebreakpoints

Page 38: The P-GRADE  Visual Parallel Programming Environment

Principle of Macrostep DebuggingPrinciple of Macrostep Debugging

Parallel debugging is as easy as debugging traditional sequential programs.

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

whereSi = Starti and Ei = Endi

P1 P2 P3

S1

A1

B1

E1

S2 S3

A2

A3

B2

C2

D2

E2

B3

E3

Page 39: The P-GRADE  Visual Parallel Programming Environment

Macrostep DebuggingMacrostep Debugging

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

Page 40: The P-GRADE  Visual Parallel Programming Environment

Automatic Deadlock Detection by Automatic Deadlock Detection by Macrostep DebuggingMacrostep Debugging

Page 41: The P-GRADE  Visual Parallel Programming Environment

Integration of Integration of Macrostep Macrostep Debugging Debugging and PROVEand PROVE

Page 42: The P-GRADE  Visual Parallel Programming Environment

Performance monitoring and analysis Performance monitoring and analysis of Parallel Programsof Parallel Programs

High-SpeedSwitch

Observing?

Page 43: The P-GRADE  Visual Parallel Programming Environment

Visualisation SystemsVisualisation Systems

Scientific (Data

Oriented) Visualisation

Scientific (Data

Oriented) Visualisation

Program Visualisation

Program Visualisation

Problem Visualisation

(Alg. Animation)

Problem Visualisation

(Alg. Animation)

Correctness Debugging

Correctness Debugging

Performance (Debugging) Visualisation

Performance (Debugging) Visualisation

Combined Visualisation

Combined Visualisation

Goal of visualisation?

What to visualise?

Page 44: The P-GRADE  Visual Parallel Programming Environment

Program Visualisation

Program Visualisation

Correctness Debugging

Correctness Debugging

Performance Visualisation

Performance Visualisation

Combined Visualisation

Combined Visualisation

Goal of visualisation?

Off-lineOff-lineOn-lineOn-line Semi On-lineSemi On-line

When to visualise?

Page 45: The P-GRADE  Visual Parallel Programming Environment

Phases of Performance Visualisation

Source CodeInstrumentation

(GRAPNEL/GRED)

Runtime Monitoring

(GRM)

Visualisation

(PROVE)

Data Analysis

(PROVE)

Page 46: The P-GRADE  Visual Parallel Programming Environment

Performance

Visualisation

Performance

Visualisation

Scalability(Data handling)

Scalability(Data handling)

Source CodeInstrumentation

Source CodeInstrumentation

Versatility(Visualisation)

Versatility(Visualisation)

Evaluation Criteria

Page 47: The P-GRADE  Visual Parallel Programming Environment

Source Code Instrumentation

Source Code Instrumentation

Manual or Automatic

Manual or Automatic

Monitoring modes

Monitoring modes

FilteringFiltering Click-back facility

Click-back facility

Selectable program

units

Selectable program

units

Individual Events

Individual Events

On/off facility

On/off facility

StatisticsStatistics

Page 48: The P-GRADE  Visual Parallel Programming Environment

ScalabilityScalability

Data Acquisition

Data Acquisition

Data Analysis & Display

Data Analysis & Display

Turning tracing on/off

Turning tracing on/off

FilteringFiltering Zooming Zooming FilteringFiltering

Interactive Interactive Non-Interactive Non-Interactive

VISTOP Nupshot

Page 49: The P-GRADE  Visual Parallel Programming Environment

VersatilityVersatility

Interoperate with other tools

Interoperate with other tools

Different viewsDifferent views

Event views

Event views

NoNoStatistics views

Statistics views

YesYes

Page 50: The P-GRADE  Visual Parallel Programming Environment

Standalone Performance Standalone Performance Analysis ToolsAnalysis Tools

• VAMPIR• Pablo• ParaGraph• AIMS• Paradyn

Page 51: The P-GRADE  Visual Parallel Programming Environment

VAMPIRVAMPIR

Page 52: The P-GRADE  Visual Parallel Programming Environment

Integrated Performance Integrated Performance Analysis ToolsAnalysis Tools

• VISTOP (TOPSYS)

• PVMVis (EDPEPPS)

• PROVE (GRADE)

Page 53: The P-GRADE  Visual Parallel Programming Environment

Source Code Instrumentation

Source Code Instrumentation

Automatic Automatic Monitoring modes

Monitoring modes

FilteringFiltering Click-back facility

Click-back facility

Selectable program

units

Selectable program

units

Individual Events

Individual Events

On/off facility

On/off facility

StatisticsStatistics

Page 54: The P-GRADE  Visual Parallel Programming Environment

Source Code Instrumentation

Source Code Instrumentation

Automatic Automatic Monitoring modes

Monitoring modes

FilteringFiltering Click-back facility

Click-back facility

Selectable program

units

Selectable program

units

Individual Events

Individual Events

On/off facility

On/off facility

StatisticsStatistics

Page 55: The P-GRADE  Visual Parallel Programming Environment

Source code click-back Source code click-back facility and click-forwardfacility and click-forward

facilityfacility

Page 56: The P-GRADE  Visual Parallel Programming Environment

ScalabilityScalability

Data Acquisition

Data Acquisition

Data Analysis & Display

Data Analysis & Display

Turning tracing on/off

Turning tracing on/off

FilteringFiltering Zooming Zooming FilteringFiltering

Interactive Interactive Non-Interactive Non-Interactive

Page 57: The P-GRADE  Visual Parallel Programming Environment

ScalabilityScalability

Data Acquisition

Data Acquisition

Data Analysis & Display

Data Analysis & Display

Turning tracing on/off

Turning tracing on/off

FilteringFiltering Zooming Zooming FilteringFiltering

Interactive Interactive Non-Interactive Non-Interactive

Page 58: The P-GRADE  Visual Parallel Programming Environment

Behaviour Window of PROVEBehaviour Window of PROVE

Scrolling visualisation windows forward and backwards User controlled focus on processors, processes and messages Zooming, event filtering facilities

Page 59: The P-GRADE  Visual Parallel Programming Environment

ScalabilityScalability

Data Acquisition

Data Acquisition

Data Analysis & Display

Data Analysis & Display

Turning tracing on/off

Turning tracing on/off

FilteringFiltering Zooming Zooming FilteringFiltering

Interactive Interactive Non-Interactive Non-Interactive

Page 60: The P-GRADE  Visual Parallel Programming Environment

Filtering in PROVE

Page 61: The P-GRADE  Visual Parallel Programming Environment

VersatilityVersatility

Interoperate with other tools

Interoperate with other tools

Different viewsDifferent views

Event views

Event views

NoNoStatistics views

Statistics views

YesYes

Page 62: The P-GRADE  Visual Parallel Programming Environment

PROVE Performance analyserPROVE Performance analyser

• Various views for displaying performance information

Synchronised multi-window visualisation

Page 63: The P-GRADE  Visual Parallel Programming Environment

PROVE Summary WindowsPROVE Summary Windows

Various views for displaying summary information

Synchronised multi-window visualisation

Page 64: The P-GRADE  Visual Parallel Programming Environment

PROVE Statistics WindowsPROVE Statistics Windows

Profiling based on counters Analysis of very long running

programs is enabled

Page 65: The P-GRADE  Visual Parallel Programming Environment

VersatilityVersatility

Interoperate with other tools

Interoperate with other tools

Different viewsDifferent views

Event views

Event views

NoNoStatistics views

Statistics views

YesYes

P-GRADE

Page 66: The P-GRADE  Visual Parallel Programming Environment

The GRM MonitorThe GRM Monitor

• Off-line monitoring (GRADE)– stores trace events in a (local or global) storage and– makes it available after execution for post-mortem

processing.

• Semi-on-line monitoring (P-GRADE)– stores trace events in a storage but– makes it available for the visualisation tool any time

during execution if the user asks for it– interactive usage of PROVE– user can remove already inspected part of the trace– evaluation of long-running programs– macrostep debugging in P-GRADE with execution

visualisation

Page 67: The P-GRADE  Visual Parallel Programming Environment

• Application-level monitor• Tracing + statistics collection• Semi-on-line

P-GRADE

D IW ID E G R E D

G R M(M M ) Trace file

L M L M L M

H o st 1 H o st 2 H o st n

so ck e t f ile o p e ra tio n

L o ca l h o s t

S e rv e r h o s t

R em o te c lu s te r

P R O V E

P ro v e -rd d

GRM monitorGRM monitor

M M

L M

p ro c 1 p ro c 2

S h a re d -m e m o ry

b u ffe r

H o st

so ck e t

m em o ry o p .p ip e

Page 68: The P-GRADE  Visual Parallel Programming Environment

Buffer is full (to a certain threshold)

Trace collectionTrace collection

MM

LM LM

Process 1 Process 2 Process 3

Trace fileProcess notifies LM

LM notifies MM

MM asks all LMs to stop application

MM for each LM:

asks each LM to send trace

sets timestamps to a global time

writes trace into the trace file

receives trace from LM

MM asks LMs to continue application

Trace fileTrace file

Page 69: The P-GRADE  Visual Parallel Programming Environment

PortabilityPortabilitySupported Hardware/Software PlatformsSupported Hardware/Software Platforms

Workstation clusters SGI MIPS / IRIX 5.x/6.x (MTA SZTAKI, Univ. of Vienna) Sun UltraSPARC / Solaris 2.x (Univ. of Athens) Intel x86 / Linux (MTA SZTAKI)

Supercomputers Hitachi SR2201 / HI-UX/MPP (Polish-Japanese School,

Warsaw) Cray T3E / UNICOS(Jülich, Germany)

Page 70: The P-GRADE  Visual Parallel Programming Environment

International installationsInternational installations

• Current– UK– Austria – Spain– Portugal– Poland– Germany– Slovakia– Greece– Japan– Mexico– USA

• Planned– Australia– Korea

Page 71: The P-GRADE  Visual Parallel Programming Environment

Further DevelopmentsFurther Developments

• Family of parallel programming environments

P-GRADE VisualMP VisualGrid

- checkpointing

- dynamic load

balancing

- fault tolerance

- grid resource management

- grid monitoring

- mobile processes

Page 72: The P-GRADE  Visual Parallel Programming Environment

ConclusionConclusion

• Current applications in physics– Efficency lost due to high level graphical programming is

less than 2 %

• Weather forecast application under development

• Download version:– www.lpds.sztaki.hu

• P-GRADE (Professional GRADE)– Project with Silicon Graphics Hungary– Current developments to support

• SPMD style programming• Object based programming

Page 73: The P-GRADE  Visual Parallel Programming Environment

Thank You ...Thank You ...

?