parallel search
play

Parallel Search Ciaran McCreesh and Patrick Prosser This Weeks - PowerPoint PPT Presentation

Parallel Search Ciaran McCreesh and Patrick Prosser This Weeks Lectures Search and Discrepancies Parallel Constraint Programming Parallel Search Embarrassingly Parallel Search Work stealing Confidence Based Work Stealing Ciaran McCreesh


  1. Parallel Search Ciaran McCreesh and Patrick Prosser

  2. This Week’s Lectures Search and Discrepancies Parallel Constraint Programming Parallel Search Embarrassingly Parallel Search Work stealing Confidence Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 1 / 12

  3. Fixed Parallel Tree Search, Again Ciaran McCreesh and Patrick Prosser Parallel Search 2 / 12

  4. Fixed Parallel Tree Search, Again Ciaran McCreesh and Patrick Prosser Parallel Search 2 / 12

  5. Fixed Parallel Tree Search, Again Ciaran McCreesh and Patrick Prosser Parallel Search 2 / 12

  6. What We Need We need a large parallelisable portion of the algorithm, and good work balance, or we don’t get much of an improvement. Ciaran McCreesh and Patrick Prosser Parallel Search 3 / 12

  7. Embarrassingly Parallel Search If we create n subproblems, chances are we’ll get poor balance. We can’t tell beforehand where the really hard subproblems will be. What if we create lots of subproblems, and distribute them dynamically? Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  8. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  9. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  10. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  11. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  12. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  13. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  14. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  15. Embarrassingly Parallel Search Ciaran McCreesh and Patrick Prosser Parallel Search 4 / 12

  16. Randomised Work Stealing What if we split work entirely dynamically? Whenever a worker is idle, have it steal a subproblem from another randomly selected worker. Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  17. Randomised Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  18. Randomised Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  19. Randomised Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  20. Randomised Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  21. Randomised Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  22. Randomised Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 5 / 12

  23. Speedups from Parallel Tree Search If a decision problem is satisfiable, or for an optimisation problem, our speedups could be arbitrary: one worker might find a feasible or strong solution very quickly. In particular, superlinear speedups are possible, as are no speedups at all. For an unsatisfiable decision problem, or for an enumeration problem, our speedups can be at best linear (assuming we do not change the search tree): we are dividing up a fixed amount of work. If we do not communicate bounds, or if we do not preserve sequential ordering, we could get an absolute slowdown . Ciaran McCreesh and Patrick Prosser Parallel Search 6 / 12

  24. Work Splitting Affects Search Ciaran McCreesh and Patrick Prosser Parallel Search 7 / 12

  25. Work Splitting Affects Search ⋆ Ciaran McCreesh and Patrick Prosser Parallel Search 7 / 12

  26. Work Splitting Affects Search ⋆ Ciaran McCreesh and Patrick Prosser Parallel Search 7 / 12

  27. Work Splitting Affects Search For satisfiable instances and optimisation problems, where you split the work doesn’t just affect balance. It also affects the amount of work to do. We just saw an example where better work balance gave worse performance, because it took longer to find a solution. Remember Harvey and Ginsberg’s Limited Discrepancy Search? 2 Value-ordering heuristics are most likely to wrong higher up in the tree (there is least information available when no or few choices have been made). Stealing early or splitting high introduces diversity against early heuristic choices. Stealing late gives a close-to-sequential ordering. Ciaran McCreesh and Patrick Prosser Parallel Search 7 / 12

  28. Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 8 / 12

  29. Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 8 / 12

  30. Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 8 / 12

  31. Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 8 / 12

  32. Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 8 / 12

  33. Using Confidence-Based Work Stealing I would like to be able to tell you that all you need to do to get excellent speedups from parallelism, and all of the benefits of discrepancy searches with none of the costs, is to annotate your model and your heuristics a little bit and then use Confidence-Based Work Stealing. But the implementations aren’t quite at that stage yet. Ciaran McCreesh and Patrick Prosser Parallel Search 9 / 12

  34. Using Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 9 / 12

  35. Using Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 9 / 12

  36. Using Confidence-Based Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 9 / 12

  37. Early Diversity Work Stealing Confidence seems hard. What if we just steal as early as possible, and subject to that, as far left as possible? We’ll get reproducible runtimes, can guarantee we’ll never get a substantial slowdown, and adding more processors will never make things worse. Added bonus: we can parallelise conflict-directed backjumping this way too (although we no longer expect a linear speedup for unsatisfiable instances). Ciaran McCreesh and Patrick Prosser Parallel Search 10 / 12

  38. Early Diversity Work Stealing Ciaran McCreesh and Patrick Prosser Parallel Search 10 / 12

  39. Early Diversity Work Stealing 10 8 10 7 LV (sat) LV (unsat) 10 6 BVG / BVGm Parallel Runtime (ms) M4D / M4Dr 10 5 SF (sat) SF (unsat) 10 4 r football 10 3 images (sat) images (unsat) 10 2 meshes (sat) meshes (unsat) 10 1 10 0 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Sequential Runtime (ms)

  40. Early Diversity Work Stealing 2500 Threaded Sequential 2000 Instances solved 1500 1000 500 0 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Sequential Runtime (ms)

  41. This is Not The Exam Question What is balance , and why is it a problem if we try to parallelise a tree-search by creating n sub-trees for n processors? Suggest two potential remedies. Why does Amdahl’s law not apply to parallel tree-search? Why are super-linear speedups possible? Suppose we are solving a decision problem which has a sequential part taking one second to run, and a parallelisable part which takes twenty seconds to run on one processor. What is the best possible runtime we might see when using ten processors to solve this problem with a parallel tree-search, if the instance is satisfiable? What if it is unsatisfiable? Ciaran McCreesh and Patrick Prosser Parallel Search 12 / 12

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