mana for mpi
play

MANA for MPI MPI-Agnostic Network-Agnostic Transparent Checkpointing - PowerPoint PPT Presentation

MANA for MPI MPI-Agnostic Network-Agnostic Transparent Checkpointing Rohan Garg, *Gregory Price, and Gene Cooperman Northeastern University Why checkpoint, and why transparently? Whether for maintenance, analysis, time-sharing, load balancing,


  1. MANA for MPI MPI-Agnostic Network-Agnostic Transparent Checkpointing Rohan Garg, *Gregory Price, and Gene Cooperman Northeastern University

  2. Why checkpoint, and why transparently? Whether for maintenance, analysis, time-sharing, load balancing, or fault tolerance HPC developers require the ability to suspend and resume computations. Two general forms of checkpointing solutions 1. Transparent - No or Low development overhead 2. Application-specific - Moderate to High development overhead HPC Applications exist on a spectrum Developers apply technologies based on where they live in that spectrum.

  3. Puzzle Can you solve checkpointing on... And restart on… Cray MPI over Infiniband MPICH over TCP/IP 1 2 5 6 4 5 6 7 Shared 3 4 7 8 8 10 12 14 Memory 9 10 13 14 1 2 11 15 Shared 11 12 15 16 3 9 13 16 Memory 8 Nodes, 2 Cores/Ranks per Node 4 Nodes, 4 Cores/Ranks per Node

  4. Cross-Cluster Migration It is now possible to checkpoint on And restart on… Cray MPI over Infiniband MPICH over TCP/IP 1 2 5 6 4 5 6 7 Shared 3 4 7 8 8 10 12 14 Memory 9 10 13 14 1 2 11 15 Shared 11 12 15 16 3 9 13 16 Memory 8 Nodes, 2 Cores/Ranks per Node 4 Nodes, 4 Cores/Ranks per Node

  5. The Problem How do we best transparently checkpoint an MPI Library? The Answer Don’t. :]

  6. HPC Checkpointing Spectrum Low vs. High End: Defined by level of effort, funding, and time frame. Short term Long Term Low Investment High Investment Transparent Checkpointing Ready-made solution Hand-Rolled Solution Limit Cost / Effort Maximize Results Terms of the project dictate the technology employed

  7. Transparency and Agnosticism Transparency 1. No re-compilation and no re-linking of application 2. No re-compilation of MPI 3. No special transport stack or drivers Agnosticism 1. Works with any libc or Linux kernel 2. Works with any MPI implementation (MPICH, CRAY MPI, etc) 3. Works with any network stack (Ethernet, Infiniband, Omni-Path, etc).

  8. Alas, poor transparency, I knew him Horatio... Transparent checkpointing could die a slow, painful death. 1. Open MPI Checkpoint-Restart service (Network Agnostic; cf. Hursey et al.) ○ MPI implementation provides checkpoint service to the application. 2. BLCR Utilizes kernel module to checkpoint local MPI ranks ○ 3. DMTCP (MPI Agnostic) ○ External program that wraps MPI for checkpointing. These, and others, have run up against a wall: MAINTENANCE

  9. The M x N maintenance penalty MPI: Interconnect: ● MPICH ● Ethernet ● OPEN MPI ● InfiniBand ● LAM-MPI ● InfiniBand + Mellanox CRAY MPI Cray GNI ● ● ● HP MPI ● Intel Omni-path ● IBM MPI ● libfabric ● SGI MPI ● System V Shared Memory MPI-BIP 115200 baud serial ● ● ● POWER-MPI ● Carrier Pigeon ● …. ● ….

  10. The M x N maintenance penalty MPI: Network Agnostic Interconnect: ● MPICH ● Ethernet ● OPEN-MPI ● InfiniBand ● LAM-MPI ● InfiniBand + Mellanox CRAY MPI Cray GNI ● ● ● HP MPI ● Intel Omni-path ● IBM MPI ● libfabric ● SGI MPI ● System V Shared Memory MPI-BIP 115200 baud serial ● ● ● POWER-MPI ● Carrier Pigeon ● …. ● ….

  11. The M x N maintenance penalty MPI: MPI and Network Agnostic Interconnect: ● MPICH ● Ethernet ● OPEN-MPI ● InfiniBand ● LAM-MPI ● InfiniBand + Mellanox CRAY MPI Cray GNI ● ● ● HP MPI ● Intel Omni-path ● IBM MPI ● libfabric ● SGI MPI ● System V Shared Memory MPI-BIP 115200 baud serial ● ● ● POWER-MPI ● Carrier Pigeon ● …. ● ….

  12. MANA: MPI-Agnostic, Network-Agnostic The problem stems from checkpointing both the MPI coordinator and the MPI lib. MPI Coordinator Node 1 Node 2 MPI Rank MPI Rank MPI Rank MPI Rank

  13. MANA: MPI-Agnostic, Network-Agnostic The problem stems from checkpointing MPI - both the coordinator and the library. MPI Coordinator Node 1 Node 2 Connections MPI Rank MPI Rank Groups Communicators Link State MPI Rank MPI Rank

  14. Achieving Agnosticism Step 1: Drain the Network MPI Coordinator Node 1 Node 2 MPI Rank MPI Rank Chandy-Lamport Algorithm MPI Rank MPI Rank As demonstrated by Hursey et al. , abstracting by “MPI Messages” allows for Network Agnosticism.

  15. Inspired by Chandy-Lamport Chandy-Lamport - Common mechanism of recording a consistent global state Usage is established among MPI checkpointing solutions (e.g. Hursey et. al. ) 1. Count the number of messages sent 2. Count the number of messages received or drained 3. When they’re equivalent, the network is drained and safe to checkpoint.

  16. Checkpointing Message Operations ● Apply Chandy-Lamport outside the MPI library, checkpointing MPI API calls. Can be naively applied to point-to-point communications ● ○ Send, Recv, iSend, iRecv, etc. ● Collectives (Scatter / Gather) could not be naively supported Collectives can produce un-recordable MPI Library and Network events. ○ ○ Can cause straggler and starvation issues when applied naively Rank 1 Inside Collective Rank 2 Straggler Rank 3 Inside Collective

  17. Checkpointing Collective Operations Solution: Two-phase collectives 1. Preface all collectives with a trivial barrier 2. When the trivial barrier is completed, call the original collective Trivial Barrier Collective Rank 1 Inside Barrier Rank 2 Straggler Rank 3 Inside Barrier

  18. Checkpointing Collective Operations Solution: Two-phase collectives 1. Preface all collectives with a trivial barrier 2. When the trivial barrier is completed, call the original collective Trivial Barrier Collective Rank 1 Original Collective Rank 2 Original Collective Rank 3 Original Collective

  19. Checkpointing Collective Operations Solution: Two-phase collectives 1. Preface all collectives with a trivial barrier 2. When the trivial barrier is completed, call the original collective Collective Trivial Barrier Collective Complete Rank 1 Rank 2 Rank 3

  20. Checkpointing Collective Operations Solution: Two-phase collectives Checkpoint Disabled Collective Collective Trivial Barrier Complete Begins Rank 1 Rank 2 Rank 3

  21. Checkpointing Collective Operations Solution: Two-phase collectives This prevents deadlock conditions Checkpoint Disabled Collective Collective Trivial Barrier Complete Begins Rank 1 Rank 2 Rank 3

  22. Checkpointing Collective Operations Solution: Two-phase collectives This prevents deadlock conditions Checkpoint Disabled (Additional logic to avoid starvation) Collective Collective Trivial Barrier Complete Begins Rank 1 Rank 2 Rank 3

  23. Achieving Agnosticism Step 2: Discard the network MPI Coordinator Node 1 Node 2 MPI Rank MPI Rank MPI Rank MPI Rank

  24. Checkpointing A Rank Solution: Isolation Checkpointing the rank is simpler… right? MPI Application Problems: MPI Rank ● MPI Implementation Specific ● Grouping information MPI Library Contains MPI network state ● ● Opaque MPI Objects Required by MPI and Application ● ● Heap Allocations LIBC and friends ● Platform dependant

  25. Isolation - The “Split-Process” Approach Terminology Single Memory Space Upper-Half program Checkpoint and Restore MPI Application Standard C Calling Conventions No RPC involved MPI Proxy Library Discard and Re-initialize Lower-Half program MPI Library MPI Library LIBC and friends

  26. Re-initializing the network Runtime Restart MPI Application ● Record Configuration Calls ● Replay Configuration ● Initialize, Grouping, etc ● Buffer Drained Messages MPI Application Checkpoint Config and Drain Info ● Drain Network MPI Proxy Library Grouping information Contains MPI network state ● ● MPI Library ● Opaque MPI Objects LIBC and friends

  27. Isolation Upper Half: Problem: Persistent Data MANA interposes on sbrk and malloc MPI Application Heap is a shared resource MPI Application to control where allocations occur Config and Drain Info Config and Drain Info LIBC and friends MPI Proxy Library Lower Half Ephemeral Data MPI Library LIBC and friends

  28. MPI Agnosticism Achieved Upper Half: Persistent Data MPI Application Config and Drain Info LIBC and friends MPI Proxy Library Lower Half Ephemeral Data MPI Library LIBC and friends

  29. MPI Agnosticism Achieved Upper Half: Persistent Data MPI Application Config and Drain Info *Special care must be taken when LIBC and friends replacing upper half libraries Lower Half Lower half data can be replaced by Ephemeral Data new and different implementations of MPI and related libraries.

  30. Checkpoint Process Step 1: Drain the Network MPI Coordinator Node 1 Node 2 MPI Rank MPI Rank MPI Rank MPI Rank

  31. Checkpoint Process Step 1: Drain the Network MPI Rank Step 2: Checkpoint Upper-Half MPI Application Config and Drain Info LIBC and friends

  32. Restart Process Step 1: Restore Lower-Half MPI Proxy Library MPI Library LIBC and friends Lower-half components may be replaced

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend