Application of Design Patterns to Geometric Decompositions V. Balaji, Thomas L. Clune, Robert W. Numrich and Brice T. Womack.

Slides:



Advertisements
Similar presentations
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Potential Languages of the Future Chapel,
Advertisements

Autonomic Systems Justin Moles, Winter 2006 Enabling autonomic behavior in systems software with hot swapping Paper by: J. Appavoo, et al. Presentation.
1 Coven a Framework for High Performance Problem Solving Environments Nathan A. DeBardeleben Walter B. Ligon III Sourabh Pandit Dan C. Stanzione Jr. Parallel.
DESIGN PATTERNS OZGUR RAHMI DONMEZ.
CISC October Goals for today: Foster’s parallel algorithm design –Partitioning –Task dependency graph Granularity Concurrency Collective communication.
Reference: Message Passing Fundamentals.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
Efficient Parallelization for AMR MHD Multiphysics Calculations Implementation in AstroBEAR.
Course Instructor: Aisha Azeem
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
WP6: Grid Authorization Service Review meeting in Berlin, March 8 th 2004 Marcin Adamski Michał Chmielewski Sergiusz Fonrobert Jarek Nabrzyski Tomasz Nowocień.
Design Patterns.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
The Vesta Parallel File System Peter F. Corbett Dror G. Feithlson.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation.
Lecture 4 TTH 03:30AM-04:45PM Dr. Jianjun Hu CSCE569 Parallel Computing University of South Carolina Department of.
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
Domain Decomposition in High-Level Parallelizaton of PDE codes Xing Cai University of Oslo.
Department of Computer Science and Software Engineering
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
Finding concurrency Jakub Yaghob. Finding concurrency design space Starting point for design of a parallel solution Analysis The patterns will help identify.
Chapter 8 Object Design Reuse and Patterns. More Patterns Abstract Factory: Provide manufacturer independence Builder: Hide a complex creation process.
A Pattern Language for Parallel Programming Beverly Sanders University of Florida.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
Parallel Computing Presented by Justin Reschke
Concurrency and Performance Based on slides by Henri Casanova.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Adding Concurrency to a Programming Language Peter A. Buhr and Glen Ditchfield USENIX C++ Technical Conference, Portland, Oregon, U. S. A., August 1992.
Pitfalls: Time Dependent Behaviors CS433 Spring 2001 Laxmikant Kale.
CompSci 280 S Introduction to Software Development
Abstract Factory Pattern
Introduction to Parallel Computing: MPI, OpenMP and Hybrid Programming
Support for Program Analysis as a First-Class Design Constraint in Legion Michael Bauer 02/22/17.
Xing Cai University of Oslo
Distributed Shared Memory
Chapter 10 Design Patterns.
Introduction to Design Patterns
Chapter 1 OBJECT-ORIENTED ANALYSIS AND DESIGN
System Design and Modeling
Parallel Programming By J. H. Wang May 2, 2017.
Parallel Objects: Virtualization & In-Process Components
Distribution and components
Task Scheduling for Multicore CPUs and NUMA Systems
Design Patterns with C# (and Food!)
Team 1 Aakanksha Gupta, Solomon Walker, Guanghong Wang
Abstract Factory Pattern
CHAPTER 2 CREATING AN ARCHITECTURAL DESIGN.
Intent (Thanks to Jim Fawcett for the slides)
Introduction to cosynthesis Rabi Mahapatra CSCE617
Mobile Agents.
Informatics 122 Software Design II
GENERAL VIEW OF KRATOS MULTIPHYSICS
Analysis models and design models
Ms Munawar Khatoon IV Year I Sem Computer Science Engineering
CS 584.
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
Informatics 122 Software Design II
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Parallel Programming in C with MPI and OpenMP
Support for Adaptivity in ARMCI Using Migratable Objects
Software Development Process Using UML Recap
Algorithm Course Algorithms Lecture 3 Sorting Algorithm-1
From Use Cases to Implementation
Presentation transcript:

Application of Design Patterns to Geometric Decompositions V. Balaji, Thomas L. Clune, Robert W. Numrich and Brice T. Womack

Our prototype example A grid-based code –implements finite-difference operators over fields defined on a grid of coordinates representing physical space. Solution of these problems typically involve: decomposition of data distribution of data across a parallel architecture assignment of work to that data.

A typical Approach Partition the physical coordinate space into subdomains. subdomains are extended to include regions of overlap with neighbors. –i.e. - halo cells, ghost cells, or guard cells subdomains interact with each other in some manner so they know when to update their halo cells with fresh data from their neighbors. The size, number and distribution of subdomains needs to be balanced to keep each processor busy and allow efficient exchange of halo data

Gof Patterns Applied Here Our prototype uses the following OO design patterns to solve a geometric decomposition problem –Composite –Builder –Strategy –Mediator –Iterator –…

GoF Composite Pattern

Allows us to maintain a unified picture of subdomains whether we want to think of them in: –a global setting, the problem as a whole –a local setting, the problem as local pieces. Methods associated with the composite provide a common interface at each level of the decomposition and allow the software developer to move from one view of the problem to another in a consistent manner.

Composite Tree Structure Comp Map Shared Memory Node Group 1 P1 L1 L2 L3 P2 L4 L5 L6 P3 L7 L8 L9 Shared Memory Node Group 2 P4P1 L10 L11 L12 P5 L13 L14 L15 P6 L16 L17 L18 Shared Memory Node Group …N P1P… L…

Composite features Application code is written to expect a block of data from a leaf. It shouldn’t assume any specific : –index order –data layout –or decomposition Blocks of data are assigned to processors by the object map structure –migration of work is done by simply moving one or more leaves to a different location within the composite Pieces of work (leaves) can be adaptively refined(AMR splitting/combining of sub elements) by replacing a leaf with a composite containing the newly refined leaves or the reverse operation

GoF Builder Pattern By applying the Builder pattern, we can isolate the composite's creation steps to produce composites that are: –Optimal for a target compute architecture –Customized for a particular numerical algorithm –Adapted for a particular set of physical or geometric constraints. –Etc.

GoF Builder Pattern

GoF Builder with Strategies

GoF Strategy Pattern Using the Strategy Pattern, we can provide a set of standard ways to build our composite object maps –Users can select from a set of predefined build strategies. –Users can easily customize the object map decomposition to improve performance. –Allows easy testing of application performance using different object map configurations

GoF Composite with Mediators

Data exchange w/Mediators Each local leaf uses a Mediator that is configured by the builder to manage its communication with neighbors All halo regions are specified in the local leaf’s context, not the neighbors A local halo region can transparently map to multiple neighbors –the user’s code doesn’t see any difference between 1 neighbor or 10 neighbors Mediator’s can use different communication methods for neighbors that are in local memory and neighbors that are outside of local memory

GoF Composite Applied

Request, Require & Release Request – non-blocking notification asking for data from neighbors Require – blocking request for data; does not continue until fulfilled Release – non-blocking notification of completion of work on local data Depending on the specific build strategy used to create the composite, the Mediator’s Request, Require and Release methods may be implemented using: –MPI or MPI-2 –SHMEM –Co-Array Fortran –ARMCI, –or Threads By abstracting the parallel communication mechanism, the builder has considerable freedom in configuring each Mediator to efficiently map communication implementation to the specific target parallel architecture.

Gof Iterators In a typical grid-code, each processor works only on the set of subdomains that are located in its own local memory. However, we also want to enable the use of global task queues for software architectures that permit low-latency task-switching when tasks stall for memory. We therefore see a need to provide iterators that allow: –Local iteration through all subdomains within local memory independent of the specific composition or the specific strategy used to build the composition. –Global iteration over subdomains that do not reside in the local memory of the physical processor doing the work.

Conclusions We are still working out implementation details, but, we have prototype Java code that is performing shallow water model equations based on these Gof Design patterns We are finding that application of the GoF design patterns can add flexibility and reduce the complexity of managing geometric decomposition problems We intend to use Fortran 2003’s OO features to implement this design when compilers are ready