the challenges of irregular parallelism
play

The Challenges of Irregular Parallelism Chris Seaton - PowerPoint PPT Presentation

The Challenges of Irregular Parallelism Chris Seaton seatonc@cs.man.ac.uk chrisseaton.com Advanced Processor Technologies Group Supervisors: Ian Watson and Mikel Lujn Why should I write parallel programs? CPU CPU CPU H. Stutter. The


  1. The Challenges of Irregular Parallelism Chris Seaton seatonc@cs.man.ac.uk chrisseaton.com Advanced Processor Technologies Group Supervisors: Ian Watson and Mikel Luján

  2. Why should I write parallel programs?

  3. CPU

  4. CPU CPU

  5. H. Stutter. The free lunch is over – a fundamental turn toward concurrency in software. Dr. Dobb’s, 30(3), 2005.

  6. Core Core

  7. Core Core Core Core

  8. Core Core Core Core Core Core Core Core Core Core Core Core Core Core Core Core

  9. We already know how to make parallel programs

  10. Structure your program so that there are tasks that can run at the same time

  11. Time

  12. Time

  13. Matrix A multiplication B C a b c aA + bB + cC

  14. Matrix D multiplication E F a b c aD + bE + cF

  15. Matrix multiplication

  16. Matrix multiplication Time

  17. However, this only works if those tasks are entirely independent of each other

  18. Time

  19. Some kind of shared object - choke point Time

  20. Ideally don’t write software with shared objects that cause choke points

  21. Photo courtesy of Argonne National Laboratory.

  22. Let’s look at a tricky problem

  23. The entire board is one big shared object Time

  24. We’re calling this an irregular problem - we can’t divide up the shared resource before the tasks start

  25. “It's easier to ask forgiveness than it is to get permission.” This photograph is a work of a sailor or employee of the U.S. Navy, taken or made during the course of the person's official duties. As a work of the U.S. federal government, the image is in the public domain.

  26. We’ll assume that tasks will not get in each other’s way If they do, we’ll sort it out when it happens

  27. Time

  28. Time

  29. Time

  30. A little more time

  31. Two questions: How can you tell when one task gets in the way of another? How can you cancel a task that has already been running?

  32. Transactional memory Instead of writing to memory, write to a log You can tell if two tasks are getting in each other’s way by comparing their logs You can cancel a task by throwing the log away

  33. 0x80d2ef52 0xecb10c62 0x4ee47f35 0xbae0a866 0xd6b4eba9 0xe4c2615d 0x2c86d524 0x61639ad5 0xe617f31d 0xe617f31d 0x40578fff 0x6a8bdcf3 0x9bb7febc 0xe9e88989 0x4ddc0e5f 0x8fbcf724 0xbd660807 0x095b76c0

  34. 0x80d2ef52 0xecb10c62 0x4ee47f35 0xbae0a866 0xd6b4eba9 0xe4c2615d 0x2c86d524 0x61639ad5 0xe617f31d 0xe617f31d 0x40578fff 0x6a8bdcf3 0x9bb7febc 0xe9e88989 0x4ddc0e5f 0x8fbcf724 0xbd660807 0x095b76c0

  35. 0x80d2ef52 0xecb10c62 0x4ee47f35 0xbae0a866 0xd6b4eba9 0xe4c2615d 0x2c86d524 0x61639ad5 0xe617f31d 0xe617f31d 0x40578fff 0x6a8bdcf3 0x9bb7febc 0xe9e88989 0x4ddc0e5f 0x8fbcf724 0xbd660807 0x095b76c0 Actually write to memory

  36. 0x80d2ef52 0x124683b3 0x4ee47f35 0x60f005b2 0xd6b4eba9 0x831327fa 0x2c86d524 0xf69d8cf9 0xe617f31d 0x9ea7c8df 0x40578fff 0x61f43a4a 0x9bb7febc 0x170c4b44 0x4ddc0e5f 0x7778a6aa 0xbd660807 0x73068a29

  37. 0x80d2ef52 0x124683b3 0x4ee47f35 0x60f005b2 0xd6b4eba9 0x831327fa 0x2c86d524 0xf69d8cf9 0xe617f31d 0x9ea7c8df 0x40578fff 0x61f43a4a 0x9bb7febc 0x170c4b44 0x4ddc0e5f 0x7778a6aa 0xbd660807 0x73068a29 Actually write to memory Actually write to memory

  38. Transactional memory is moving from research to production C, C++, Java, Scala, Clojure, Haskell

  39. There are other techniques for reversing computation If you know you added x to a value, subtract x . If you know you added a node to a graph, remove it. The Jefferson Time Warp System from the mid-80s - send anti-messages over networks.

  40. Do we have a solution?

  41. Transactional memory can be slow The hardware is probably limited Not the magic bullet some hoped Optimistic execution in general can be wasteful

  42. Irregular problems are the billion dollar problems Physical meshes Web and social graphs Machine learning networks Data mining [1] [1] J. Tournois, C. Wormser, P . Alliez, and M. Desbrun. Interleaving Delaunay refinement and optimization for practical isotropic tetrahedron mesh generation . Technical Report 6826, INRIA, 2009.

  43. Chris Seaton seatonc@cs.man.ac.uk chrisseaton.com

Recommend


More recommend