exploring scientific discovery with large scale parallel
play

Exploring Scientific Discovery with Large-Scale Parallel Scripting - PowerPoint PPT Presentation

Exploring Scientific Discovery with Large-Scale Parallel Scripting Tim Armstrong 1 Justin M. Wozniak 2 Michael Wilde 12 1 University of Chicago 2 Argonne National Laboratory May 15, 2013 Parallel Scripting with Swift/T SciColSim Application


  1. Exploring Scientific Discovery with Large-Scale Parallel Scripting Tim Armstrong 1 Justin M. Wozniak 2 Michael Wilde 12 1 University of Chicago 2 Argonne National Laboratory May 15, 2013

  2. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Overview Parallel scripting: massive scalability with (relative) ease • Scaling up real science applications difficult: • Must adapt code to radically different programming model • Concurrency bugs • Load balancing, data management, etc • SciColSim: compute-intensive science app • Swift/T: super-scalable high-performance scripting system for parallel composition of existing code

  3. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T The Scripting Paradigm • Low-level language (e.g. C) + high-level language (e.g. Python) High-level script orchestrates Optimized performance- critical functions

  4. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Parallel Scripting • Can retrofit parallelism onto sequential scripting languages: • Threads • Message passing (MPI, etc.) • Abstractions (MapReduce, etc.) • But parallelism is a second-class concept in the language... • Q: Why can’t I express parallelism with loops, conditionals, variables, etc?

  5. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Parallel Scripting in Swift/T • Q: Why can’t I express parallelism with loops, conditionals, variables? • A: you can in Swift! • The Swift parallel scripting language[WFI + 09]: • Implicit dataflow parallelism • Language statements execute concurrently in dataflow order • Single-assignment variables guarantee determinism • Determinism extends to additional, rich, data structures: arrays, hash tables, structs. float results[]; file data = input_file("my.data"); Independent parallel iterations foreach i in [1:N] { Dataflow dependencies if (predicate(i)) { results[i] = compute(i, data); } } mean, stdev = stat_summ( results); Swift code with implied parallel dataflow

  6. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Swift/T Scalable Implementation[WAW + ] • Can harness tens or hundreds of thousands of cores • All runtime components distributed and scalable: data store, task distributor & script executor • Optimizing compiler ( stc ) reduces messaging Shared State Control Load Task Legend Flow Balancing Execution Process Data Store … Rule Task flow … Server Task Queue Engine … … Server Processes … Execution … Rule Server … Engine Control/Worker Processes … Swift/T runtime services breakdown (left) and task dispatch (right)

  7. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T SciColSim Application: Simulating Scientific Discovery • Ongoing research at University of Chicago • Want to understand process of scientific discovery: [ER10] • How do scientists select hypotheses to work on? • What are the most effective strategies? • Can explore with simulation: • Model knowledge as graph of concepts • Simulate different graph exploration strategies • Can measure how “efficient” strategy is • Computational characteristics: • Each simulation implemented with sequential C++ code • Floating point intensive: many probability calculations

  8. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Evaluating model parameters • “Ensemble” of randomized simulations • Results of simulation are averaged to evaluate “goodness” of current parameters • Task duration is 0.2-20s. Runtime depends on input parameters, plus significant random variation. analyze and choose new parameters parameter set i Task Dataflow variable ensemble of parameter parameter Data randomized set i + i set i + 2 dependency simulations Evaluating objective function and updating parameters

  9. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Simulated Annealing • Want to find “best” set of simulation parameters • Optimize using a simulated annealing algorithm • Basic idea: 1. Perturb one parameter 2. Evaluate objective function for current parameters 3. Depending on result, maybe undo parameter change 4. Repeat... … … … 10x independent simulated … annealing instances … … 500-1000x parameter updates Visualization of parallel simulated annealing with 8-way parallelized objective function. Real runs have 1000-way parallelism.

  10. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Scale-up requirements • Optimization + validation: 0.25–0.5M CPU-hours per model • Fast feedback needed: scientists want to iterate models • Need to get high speedup: 4000x+ to get timely results • Relatively short-lived tasks: 0.2s-20s. Fan-out and fan-in every 1-2 minutes. • Unpredictable task duration: need to dynamically assign tasks to processors, in scalable way • High-performance dynamic task allocation mandatory … … … 10x independent simulated … annealing instances … … 500-1000x parameter updates

  11. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Adapting for Swift/T • Kept compute-intensive simulation logic in C++ • Converted simulated annealing algorithm to Swift/T: • Nested parallel loops • Sequential iteration • Logic and formulas to update parameters • Logging and output Original Swift/T Version Lines of Code Python: 33 lines Swift/T: 269 lines C++: 1175 lines C++: 861 lines Scalability One node, many cores Many cores, 100’s or 1000’s of nodes

  12. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Scaling up! • Strong scaling results for production workload at different compiler optimization levels: scales well! • Mainly limited by amount of parallelism in workload ⇒ could scale further with different optimization algorithm • STC compiler optimization: reduces messaging ⇒ better scaling 15 0.05 O0 0.04 10 iters/ Iters/sec O1 0.03 Iters/sec sec O2 5 0.02 Ideal O3 0.01 Ideal 0 0 0 1000 2000 3000 4000 0 2000 4000 6000 8000 Cores Cores Strong scaling for down-scaled at different STC optimization levels (left) and full-scale problem (right)

  13. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Task Prioritization • Key technique enabled by Swift/T: task prioritization • Improves resource utilization and time-to-solution • Exploits application knowledge: • “Catch-up” heuristic for slower optimization chains • Prioritize long-running tasks: target parameter correlated with runtime @prio= 100*(niters - iter) + target run simulation(...); 30 25 Busy cores 20 without 15 priorities 10 5 with 0 priorities 1200 1300 1400 1500 1600 Time (seconds)

  14. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T References J. Evans and A. Rzhetsky, Machine science , Science 329 (2010), no. 5990. J. M. Wozniak, T. G. Armstrong, M. Wilde, D. S. Katz, E. Lusk, and I. T. Foster, Swift/T: Large-scale application composition via distributed-memory data flow processing , Proc. CCGrid ’13. M. Wilde, I. Foster, K. Iskra, P. Beckman, Z. Zhang, A. Espinosa, M. Hategan, B. Clifford, and I. Raicu, Parallel scripting for applications at the petascale and beyond , Computer 42 (2009), no. 11. Acknowledgements This research is supported in part by the U.S. DOE Office of Science under contract DE-AC02-06CH11357, FWP-57810. This research was supported in part by NIH through resources provided by the Computation Institute and the Biological Sciences Division of the University of Chicago and Argonne National Laboratory, under grant S10 RR029030-01.

  15. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Demo • Compile application from scratch to illustrate toolchain • Production-scale run of SciColSim on 8400 cores of Beagle Cray XE6 supercomputer @ UChicago

  16. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Conclusions • Can scale up existing applications with parallel scripting • Quick development cycle: easy to debug and modify code, compared with alternative cluster programming models • Appropriate for applications that can be implemented as user-defined tasks with explicit data dependences • Much better for moderately fine-grained workloads on large clusters than traditional centralized workflow systems • Does not support wide-area grids/clouds (yet)

  17. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Task Dispatch Speed • Cray XE6 • On 10 nodes, 24 cores per node • Many independent 0s tasks 1.4 Work Tasks/s (Mil.) 1.2 1.0 0.8 0.6 0.4 0.2 0.0 ADLB O0 O1 O2 O3

  18. Parallel Scripting with Swift/T SciColSim Application Scaling up SciColSim with Swift/T Scaling up to 10 5 • Experiment on Blue Gene/P Intrepid at Argonne National Lab • 100s task durations • Experiment used old version of Swift/T. Many improvements since.

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