Lecture 6: Task-based Models and Charm++ Abhinav Bhatele, Department - - PowerPoint PPT Presentation

lecture 6 task based models and charm
SMART_READER_LITE
LIVE PREVIEW

Lecture 6: Task-based Models and Charm++ Abhinav Bhatele, Department - - PowerPoint PPT Presentation

High Performance Computing Systems (CMSC714) Lecture 6: Task-based Models and Charm++ Abhinav Bhatele, Department of Computer Science Summary of last lecture Shared-memory programming and OpenMP Fork-join parallelism OpenMP vs MPI:


slide-1
SLIDE 1

Lecture 6: Task-based Models and Charm++

Abhinav Bhatele, Department of Computer Science

High Performance Computing Systems (CMSC714)

slide-2
SLIDE 2

Abhinav Bhatele, CMSC714

Summary of last lecture

  • Shared-memory programming and OpenMP
  • Fork-join parallelism
  • OpenMP vs MPI: ease of programming, performance

2

slide-3
SLIDE 3

Abhinav Bhatele, CMSC714

Task-based programming models

  • Describe program / computation in terms of tasks
  • Tasks might be short-lived or persistent throughout program execution
  • Notable examples: Charm++, StarPU, HPX, Legion
  • Attempt at classification: https://link.springer.com/article/10.1007/s11227-018-2238-4

3

slide-4
SLIDE 4

Abhinav Bhatele, CMSC714

Charm++: Global view

4

User View System View

slide-5
SLIDE 5

Abhinav Bhatele, CMSC714

Key Principles

  • Programmer decomposes data and work into objects
  • Decoupled from number of processes or cores
  • Runtime assigns objects to physical resources (cores and nodes)
  • Each object can only access its own data
  • Request data from other objects via remote method invocation: foo.get_data()
  • Message-driven execution

5

slide-6
SLIDE 6

Abhinav Bhatele, CMSC714

Hello World in Charm++

6

Charm++ Tutorial: http://charmplusplus.org/tutorial/ArrayHelloWorld.html

module hello { array [1D] Hello { entry Hello(); entry void sayHi(); }; };

slide-7
SLIDE 7

Abhinav Bhatele, CMSC714

Hello World in Charm++

6

Charm++ Tutorial: http://charmplusplus.org/tutorial/ArrayHelloWorld.html

module hello { array [1D] Hello { entry Hello(); entry void sayHi(); }; }; void Hello ::sayHi() { CkPrintf("Hello from chare %d on processor %d.\n”, thisIndex, CkMyPe()); }

slide-8
SLIDE 8

Abhinav Bhatele, CMSC714

Hello World in Charm++

6

Charm++ Tutorial: http://charmplusplus.org/tutorial/ArrayHelloWorld.html

module hello { array [1D] Hello { entry Hello(); entry void sayHi(); }; }; void Hello ::sayHi() { CkPrintf("Hello from chare %d on processor %d.\n”, thisIndex, CkMyPe()); } Main::Main(CkArgMsg* msg) { numElements = 5; // number of elements CProxy_Hello helloArray = CProxy_Hello::ckNew(numElements); helloArray.sayHi(); }

slide-9
SLIDE 9

Abhinav Bhatele, CMSC714

Over-decomposition and virtualization

  • Create lots of “small” objects per physical core
  • Objects grouped into arrays: 1D, 2D, …
  • System assigns objects to processors and can migrate objects between physical

resources

  • Facilitates automatic load balancing

7

slide-10
SLIDE 10

Abhinav Bhatele, CMSC714

Questions

  • What are some of its limitations?
  • Could we talk through an example where using the structured dagger would be

relevant?

  • Can you still have bottlenecks with message passing? What would an example of this

look like?

8

The Charm++ Programming Model

slide-11
SLIDE 11

Abhinav Bhatele, CMSC714

Questions

  • Is there an alternative to the checkpointing discussed? Some way to add redundancy

to the parallel computation so that it is fault tolerant? Or is this generally not worth doing? Is there anything complex about the implementation of the checkpointing process?

  • Are the examples (e.g., Barnes-Hut simulation) standard benchmarks in HPC

literature, or selected specially for making Charm++ look good? If these are standard, why are they standard? Just due to their popularity?

9

Parallel Programming with Migratable Objects: Charm++ in Practice

slide-12
SLIDE 12

Abhinav Bhatele 5218 Brendan Iribe Center (IRB) / College Park, MD 20742 phone: 301.405.4507 / e-mail: bhatele@cs.umd.edu

Questions?