Charm++ Tutorial

Overview

Technical Approach

Object - based Parallelization

Virtualization: Object-based Decomposition

Chares – Concurrent Objects

“Hello World!”

Compile and run the program

Data Driven Execution in Charm++

Charm++ solution: proxy classes

Ring program

Chare Arrays

Slide 13

Slide 14

Sorting numbers

Slide 16

Slide 17

Remember :

Slide 19

Basic Entities in Charm++ Programs

Illustrative example: Jacobi 1D

Illustrative example: Jacobi 1D

Jacobi 1D: Parallel Solution!

Jacobi 1D: Parallel Solution!

Arrays as Parameters

Jacobi Code

Reduction

Callbacks

void Ar1::doWork(int sendersID, int n, double arr[n])
{
//Code on previous slide
  …
   if (((rightmsg == 1) && (leftmsg == 1)) || ((thisIndex == 0) &&   
   (rightmsg == 1)) || ((thisIndex ==K-1) && (leftmsg == 1)))
   {
     // Both messages have been received and we can now
         compute the new values of the matrix
  …
     // Use a reduction to find determine if all of the maximum
        errors on each processor had a maximum change that
        is below our threshold value.
  CkCallback cb(CkIndex_Ar1::doCheck(NULL),a1);
  contribute(sizeof(double), &maxChange, CkReduction::max_double, cb);
    }
}

Types of Reductions

Structured Dagger

Structured Dagger Constructs

Structure Dagger Constructs Continued

Jacobi Example Using Structured Dagger

Another Example of Structured Dagger : LeanMD

Another Example of Structured Dagger : LeanMD

Load Balancing

Projections: Quick Introduction

Screen shots – Load imbalance

Timelines – load imbalance

Migration

Pup – How to write it?

Load Balancing

Centralized Load Balancing

Neighborhood Load Balancing

Main Centralized Load Balancing Strategies

Neighborhood Load Balancing Strategies

When to Re-balance Load?

Processor Utilization: After Load Balance

Timelines: Before and After Load Balancing

Advanced Features

Advanced Features: Groups

Advanced Features: Groups

Advanced Features: Node Groups

Advanced Features: Priorities

Advanced Features: Entry Method Attributes

Advanced Features: Communications Optimization

Advanced Features: Communications Optimization

Advanced Features: Checkpoint/Restart

Advanced Features: Checkpoint/Restart

Other Advanced Features

Benefits of Virtualization

More Information