Performance Oriented Parallel Program Design in the CAPSE Environment A. Ferscha, G. Kotsis
Institut fur angewandte Informatik und Informationssysteme, Universitat Wien Lenaugasse 2/8, A-1080 Vienna, AUSTRIA Tel.: +43 1 408 63 66 14, Fax: +43 1 408 04 50 e-mail:
[email protected]
Abstract
Performance orientation in the development process of parallel software is motivated by outlining the misconception of current approaches where performance activies come in at the very end of the development, mainly in terms of measurement or monitoring after the implementation phase. At that time major part of the development work is already done, and performance pitfalls are very hard to repair - if this is possible at all. A development process for parallel programs that launches performance engineering in the early design phase is proposed. The systematic integration of a set of tools supporting performance oriented parallel programming results in the CAPSE (Computer Aided Parallel Software Engineering) environment.
1 Introduction Having in mind the traditional (sequential) software development process where performance issues are insuciently considered Fox 89], one is now (naturally) convinced that performance analysis is a critical factor in the upcoming parallel software development methodology. Today major challenges are to support the process of developing parallel software by eective (automated) performance prediction tools during the whole software development cycle: Performance engineering approaches in the early design phases of parallel software, accompanying this process until the completion of the parallel application. Performance engineering activities range from performance prediction in early development stages, modeling (analytical modeling and simulation) in the detailed design and coding phase, to nally monitoring and measurements in the testing and correction phase.
2 A Performance Oriented Development Cycle There are no general rules guiding the designer of a parallel program or algorithm for a given instance of problem. The possibilities range from parallelizing a sequential program, nding a new parallel solution or transform the problem to one for which a parallel solution is known. Assuming that this process - whatever way the designer decided to approach - has lead to an algorithmic idea which he is now willing to implement, the following steps are to be taken towards an ecient application in the performance sense: (Figure 1 shows development phases as well as useful, possible and demanded tool support.) 1
TOOLSUPPORT Algorithm Idea Hybrid Editing, Diagramming Prove Functional Validity Performance Prediction
High Level Specification Implementation Skeleton
Editing Code Generation Compiling, Debugging, Testing Reusability, Library Management Performance Prediction
Coding Executable Program
By Hand Placement Data Partitioning & Mapping Program Decomposition & Mapping Automated Mapping
Assignment Running Version of Application Tuning
Performance Measurement Visualization
Efficient Parallel Application
User Interface
Figure1: Phases of Parallel Program Development. For expressing the rough idea of a parallel program the designer for rst should not have to use traditional programing languages and immediately start with an implementation, as this is usually time consuming and errorprone. A high level specication method based on the PRMnet formalism is used to support automatic verication of functional validity and performance predicition, simultaneously gaining from its graphical expressiveness and hence preventing the designer from getting lost in implementation details. Thus graphical and hybrid (graphical combined with textual) editing tools are demanded. After arriving at an implementation skeleton in the specication phase, the designer is now interested whether the predicted performance is justifying to make a working program out of the high level specication. To this end he requires advanced editing facilities, now primarily hybrid or textual, which are consistent with the specication methods used. Code generators translating from specications into high level languages, the use of several programming language paradigms, facilities and formalism for language denitions by the user and library maintenance tools get essential. The reuse of specications as well as program fragments has to be supported by retrieval and adaption facilities. Performance prediction is most critical in this phase and relies on additional user information, hence interactive tools for the specication of the expected dynamic program behaviour are necessary. On the other hand the designer may whish to improve the predicted performance by experimentally modifying implementations, again by using performance prediction tools. If functional validity of the program is assured and performance gures are acceptable, the designer can now turn to assign components of his program to devices of the target architecture. Tool support can be by either totally automatic - but generally inecient - process-to-processor or data-to-processor mappers, by providing a set of standard mappings, or by facilitating to nd an optimum mapping by experimentation. In the latter case an object oriented, graphical, direct manipulative user interface with associated assignement-code generators and instrumentation tools are required. Finally, if a running parallel program has been achieved, performance studies using monitoring techniques can be fruitful in detecting system bottlenecks and aid in `ne-tuning' the application. Further toolsupport in this phase are required for visualizing the running system on 2
GRAPHICAL, OBJECT ORIENTED USER INTERFACE X-Windows
CODING
DESIGN
HierarchyDiagram Editor
Textual/Graphical Editor Compiler Debugger Library Manager
PERFORMANCE PREDICT./MEASUREM. Model Generator
Model Editor
Evaluator Analysis/Simulation Software Monitor
Performance Viewer
PERFORMANCE MODELS
SPECIFICATION
LIBRARIES CODE EXECUTABLES
VIEW SETTINGS
EXECUTION VISUALIZATION
ASSIGNMENT
View Specifier
Process/Data Placer
Event Tracer
Process/Data Mapper
Execution Viewer
Mapping Library Manager
PERFORMANCE DATA
MAPPING BASE
TRACE INFORMATION
Figure2: Architecture of the CAPSE Environment the basis of computation and communication events. The result of this phase is either an ecient parallel application, or the nding that the implementation has to be modied or rebuilt.
3 The CAPSE Environment The emerging technology of computer aided software engineering (CASE Fish 88]) provides automated tools for software development, supporting several traditional methodologies. The major facilities are tool support during requirement analysis (for information modeling (entity relationship diagrams), user interface prototyping etc.), graphical, structured methods in the design phase programming support by editors, high level language compilers, codegenerators, execution prolers and debugging environments, nally maintenance and documentation tools. The integration of automated performance tools Nich 90] and the CASE methodology Oman 90] is of outstanding importance for future software development environments, which in turn represent the basis for successfull parallel software development. Sophisticated, ergonomic user interfaces play an important role in development environments There is the need for graphical program development tools i.e. using graphics for visualization of parallel programs as well as expressing parallel algorithms by grahical representations (visual programming). On the other hand performance visualization is necessary to provide a comprehensive and realistic view of the performance behaviour of a parallel system using animation and colours rather than bulks of numbers. Algorithm animation is a powerful means in getting insight in the behaviour of a parallel algorithm evolving in time. All these aspects are addressed with the Computer Aided Parallel Software Engineering environment Fers 91]. The CAPSE environment integrates a Petri net based specication method for parallel programs with Petri net related structural and performance analysis methods into a compound toolset assisting the development process of parallel application programs in all development phases (g. 1). The architecture of the toolset comprises graphical editing facilities using a Petri net metaphor, tools for automatic generation of the performance model out of a high level program specication along with its evaluation and result interpretation for performance prediction, tools for automated mapping support, program code generation, mea3
surement and monitoring facilities and a set of tools for visualising multiprocessor performance and the runtime behavior of parallel programs. The interdependencies and henceforth connectivity of the tools described above is given in gure 2. All the tool functionality is hidden behind a unique, graphical, window-oriented user interface. The design tools are used to work out a specication of the parallel application which is used by coding tools to generate or develop program code, and by the performance tools to derive performance models. Coding is assisted by multilingual language support (compilers) and reusable includes. The performance toolset allows automatic performance model generation as well as the creation of performance models by the user himself via a model editor. Model evaluators either on an analytical or simulation basis create performance data which is viewed via the performance viewer following user dened settings, and is drawn by assignment tools to automatically nd mappings (mapper). The mapping data base (MODULE-BASE) is used to recall assignments which have proven ecient in previous applications. Placement of partitioned data or programs in a direct manipulative fashion is implemented with the placer tool. Trace information is generated and accessed both by performance and execution visualization tools. Up to date summaries of working projects on performance tools Nich 90], design tools Oman 90] and parallel processing tools Harr 90] reveal the lack of integration and necessary consideration of coincidences between several tool purposes. CAPSE aims integration by introducing cooperation of tool components (methods) on the basis of common and uniform interfaces, data formats and styles of operation. The concept of modularity of methods will oer independence from user interface realizations and provide extendability in that unforeseen or new methods can easily be added to the environment. The decoupling of methods and the user interface will allow running the environment under several shapes and modes of interaction. Changing user requirements can be satised by tuning only the interface shape. A variety of views to methods is simultaneously possible: methods can be completely hidden or be made totally transparent to the user. The degree of user interaction can range between silent (background) runs and high interaction.
References
Fers 91] A. Ferscha. \Private communication". April 1991. Fish 88] A. S. Fisher. CASE. Using Software Development Tools. John Wiley and Sons, New York, 1988. Fox 89] G. Fox. \Performance Engineering as a Part of the Development Life Cycle for Large-Scale Software Systems". In: Proc. of the 11th Int. Conf. on Software Engineering, Pittsburgh, pp. 85{94, IEEE Computer Society Press, 1989. Harr 90] W. Harrison. \Tools for Multiple CPU Environments". IEEE Software, Vol. 7, No. 3, pp. 45{51, May 1990. Nich 90] K. Nichols. \Performance Tools". IEEE Software, Vol. 7, No. 3, pp. 21{30, May 1990. Oman 90] P. Oman. \CASE Analysis and Design Tools". IEEE Software, Vol. 7, No. 3, pp. 37{43, May 1990.
4