1 / 11

Programming in AMPI

Programming in AMPI. Laxmikant Kale CS320 Spring 2003 Kale@cs.uiuc.edu http://charm.cs.uiuc.edu Parallel Programming Laboratory Department of Computer Science University of Illinois at Urbana Champaign. System implementation. Virtualization: Object-based Parallelization.

hali
Download Presentation

Programming in AMPI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming in AMPI Laxmikant Kale CS320 Spring 2003 Kale@cs.uiuc.edu http://charm.cs.uiuc.edu Parallel Programming Laboratory Department of Computer Science University of Illinois at Urbana Champaign Virtualization for CS320: AMPI/Charm

  2. System implementation Virtualization: Object-based Parallelization User is only concerned with interaction between objects (VPs) User View Virtualization for CS320: AMPI/Charm

  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 User’s view A[0] A[1] A[2] A[3] A[..] Virtualization for CS320: AMPI/Charm

  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 User’s view A[0] A[1] A[2] A[3] A[..] System view A[0] A[3] Virtualization for CS320: AMPI/Charm

  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 User’s view A[0] A[1] A[2] A[3] A[..] System view A[0] A[3] Virtualization for CS320: AMPI/Charm

  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 Virtualization for CS320: AMPI/Charm

  7. 7 MPI processes AMPI: Virtualization for CS320: AMPI/Charm

  8. 7 MPI “processes” Real Processors AMPI: Implemented as virtual processors (user-level migratable threads) Virtualization for CS320: AMPI/Charm

  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: • globals%x (or globals->x in C) Virtualization for CS320: AMPI/Charm

  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 Virtualization for CS320: AMPI/Charm

  11. Load Balancing • Call load balancer periodically Virtualization for CS320: AMPI/Charm

More Related