Programming%20in%20AMPI - PowerPoint PPT Presentation

About This Presentation
Title:

Programming%20in%20AMPI

Description:

Virtualization: Object-based Parallelization. User View. System implementation ... Dynamically allocate one instance of globals ... – PowerPoint PPT presentation

Number of Views:16
Avg rating:3.0/5.0
Slides: 12
Provided by: san7196
Learn more at: http://charm.cs.uiuc.edu
Category:

less

Transcript and Presenter's Notes

Title: Programming%20in%20AMPI


1
Programming in AMPI
  • Laxmikant Kale
  • CS320
  • Spring 2003
  • Kale_at_cs.uiuc.edu
  • http//charm.cs.uiuc.edu
  • Parallel Programming Laboratory
  • Department of Computer Science
  • University of Illinois at Urbana Champaign

2
Virtualization Object-based Parallelization
User is only concerned with interaction between
objects (VPs)
User View
3
Object Arrays
  • A collection of data-driven objects
  • With a single global name for the collection
  • Each member addressed by an index
  • sparse 1D, 2D, 3D, tree, string, ...
  • Mapping of element objects to procS handled by
    the system

Users view
A0
A1
A2
A3
A..
4
Object Arrays
  • A collection of data-driven objects
  • With a single global name for the collection
  • Each member addressed by an index
  • sparse 1D, 2D, 3D, tree, string, ...
  • Mapping of element objects to procS handled by
    the system

Users view
A0
A1
A2
A3
A..
System view
A3
A0
5
Object Arrays
  • A collection of data-driven objects
  • With a single global name for the collection
  • Each member addressed by an index
  • sparse 1D, 2D, 3D, tree, string, ...
  • Mapping of element objects to procS handled by
    the system

Users view
A0
A1
A2
A3
A..
System view
A3
A0
6
Adaptive MPI
  • A migration path for legacy MPI codes
  • AMPI MPI Virtualization
  • Uses Charm object arrays and migratable threads
  • Minimal modifications to convert existing MPI
    programs
  • Automated via AMPizer
  • Based on Polaris Compiler Framework
  • Bindings for
  • C, C, and Fortran90

7
AMPI
8
AMPI
Implemented as virtual processors (user-level
migratable threads)
9
Writing AMPI programs
  • Same as MPI programming, except
  • Do not use global variables.
  • Why?
  • How to
  • Move all global variables into a module in f90
  • Called globals, for example
  • Class or struct in C/C
  • Dynamically allocate one instance of globals
  • Make any reference to a (former) global variable
    x as
  • globalsx (or globals-gtx in C)

10
Handling global variables in AMPI
  • More refined methods for getting rid of global
    variables
  • Esp. when converting existing MPI programs
  • Classes of global variables
  • Really local (are live only inside subroutines)
  • Read-only
  • Truly global, but short lived
  • Move to functions, and pass as parameters
  • Others move to one or more dynamically allocated
    modules

11
Load Balancing
  • Call load balancer periodically
Write a Comment
User Comments (0)
About PowerShow.com