SlideShare a Scribd company logo
Swift Parallel Scripting for
High-Performance Workflow
April 16, 2015
Michael Wilde wilde@anl.gov
Daniel S. Katz dsk@uchicago.edu
http://swift-lang.org
Domain of Interest
“Time”
“Complexity”
Increasing capabilities in computational science
Workflow needs
 Application Drivers
– Applications that are many-task in nature: parameters sweeps, UQ,
inverse modeling, and data-driven applications
– Analysis of capability application outputs
– Analysis of stored or collected data
– Increase productivity at major experiment facilities (light source, etc.)
– Urgent computing
– These applications are all many-task in nature
 Requirements
– Usability and ease of workflow expression
– Ability to leverage complex architecture of HPC and HTC systems
(fabric, scheduler, hybrid node and programming models), individually
and collectively
– Ability to integrate high-performance data services and volumes
– Make use of the system task rate capabilities from clusters to
extreme-scale systems
 Approach
– A programming model for programming in the large
3
When do you need HPC workflow?
Example application: protein-ligand docking for drug screening
(B)
O(100K)
drug
candidates
…then hundreds of
detailed MD
models to find
10-20 fruitful
candidates for
wetlab & APS
crystallography
O(10) proteins
implicated in a disease
= 1M
docking
tasks…
X
…
5
For protein docking workflow:
foreach p, i in proteins {
foreach c, j in ligands {
(structure[i,j], log[i,j]) =
dock(p, c, minRad, maxRad);
}
scatter_plot = analyze(structure)
To run:
swift –site tukey,blues dock.swift
Expressing this many task workflow in Swift
The Swift runtime system has drivers and algorithms to efficiently support and aggregate diverse runtime environments
Swift enables execution of simulation campaigns across
multiple HPC and cloud resources
6
Local datamarkApps
Swift host: login node, laptop, …
Scripts
Data servers
Data servers
Data servers
Campus systems
Cloud resources
Petascale systems
National infrastructure
Swift in a nutshell
 Data types
string s = “hello world”;
int i = 4;
int A[];
 Mapped data types
type image;
image file1<“snapshot.jpg”>;
 Mapped functions
app (file o) myapp(file f, int i)
{ mysim "-s" i @f @o; }
 Conventional expressions
if (x == 3) {
y = x+2;
s = @strcat(“y: ”, y);
}
 Structured data
image A[]<array_mapper…>;
 Loops
foreach f,i in A {
B[i] = convert(A[i]);
}
 Data flow
analyze(B[0], B[1]);
analyze(B[2], B[3]);
Swift: A language for distributed parallel scripting, J. Parallel Computing, 2011
Pervasively parallel
 Swift is a parallel scripting system for grids, clouds and clusters
 F() and G() are computed in parallel
– Can be Swift functions, or leaf tasks (executables or scripts in shell, python, R,
Octave, MATLAB, ...)
 r computed when they are done
 This parallelism is automatic
 Works recursively throughout the program’s call graph
(int r) myproc (int i)
{
int f = F(i);
int g = G(i);
r = f + g;
}
Pervasive parallel data flow
Data-intensive example:
Processing MODIS land-use data
analyze
colorize
x 317
landUse
x 317
mark
Swift loops process hundreds of images in parallel
assemble
Image processing pipeline for land-use data from the MODIS satellite instrument…
Processing MODIS land-use data
foreach raw,i in rawFiles {
land[i] = landUse(raw,1);
colorFiles[i] = colorize(raw);
}
(topTiles, topFiles, topColors) =
analyze(land, landType, nSelect);
gridMap = mark(topTiles);
montage =
assemble(topFiles,colorFiles,webDir);
Example of Swift’s implicit parallelism:
Processing MODIS land-use data
analyze
colorize
x 317
landUse
x 317
mark
Swift loops process hundreds of images in parallel
assemble
Image processing pipeline for land-use data from the MODIS satellite instrument…
Swift provides 4 important benefits:
13
Makes parallelism more transparent
Implicitly parallel functional dataflow programming
Makes computing location more transparent
Runs your script on multiple distributed sites and
diverse computing resources (desktop to petascale)
Makes basic failure recovery transparent
Retries/relocates failing tasks
Can restart failing runs from point of failure
Enables provenance capture
Tasks have recordable inputs and outputs
Swift/T: productive extreme-scale scripting
 Script-like programming with “leaf” tasks
– In-memory function calls in C++, Fortran, Python, R, … passing in-memory objects
– More expressive than master-worker for “programming in the large”
– Leaf tasks can be MPI programs, etc. Can be separate processes if OS permits.
 Distributed, scalable runtime manages tasks, load balancing, data movement
 User function calls to external code run on thousands of worker nodes
Swift
control
process
Swift
control
process
Parallel
evaluator
and
data store
Swift worker process
C C++ Fortran
Swift worker process
C C++ Fortran
Swift worker process
C C++ Fortran
MPI
Scripts
Parallel tasks in Swift/T
 Swift expression: z = @par=32 f(x,y);
 ADLB server finds 8 available workers
– Workers receive ranks from ADLB server
– Performs comm = MPI_Comm_create_group()
 Workers perform f(x,y)communicating on comm
LAMMPS parallel tasks
 LAMMPS provides a
convenient C++ API
 Easily used by Swift/T
parallel tasks
foreach i in [0:20] {
t = 300+i;
sed_command = sprintf("s/_TEMPERATURE_/%i/g", t);
lammps_file_name = sprintf("input-%i.inp", t);
lammps_args = "-i " + lammps_file_name;
file lammps_input<lammps_file_name> =
sed(filter, sed_command) =>
@par=8 lammps(lammps_args);
}
Tasks with varying sizes packed into big MPI run
Black: Compute Blue: Message White: Idle
Swift/T-specific features
 Task locality: Ability to send a task to a process
– Allows for big data –type applications
– Allows for stateful objects to remain resident in the workflow
– location L = find_data(D);
int y = @location=L f(D, x);
 Data broadcast
 Task priorities: Ability to set task priority
– Useful for tweaking load balancing
 Updateable variables
– Allow data to be modified after its initial write
– Consumer tasks may receive original or updated values when they emerge
from the work queue
17
Wozniak et al. Language features for scalable distributed-memory
dataflow computing. Proc. Dataflow Execution Models at PACT, 2014.
Swift/T: scaling of trivial foreach { } loop
100 microsecond to 10 millisecond tasks
on up to 512K integer cores of Blue Waters
18
Large-scale applications using Swift
 Simulation of super-
cooled glass materials
 Protein and biomolecule
structure and interaction
 Climate model analysis and
decision making for global
food production & supply
 Materials science at the
Advanced Photon Source
 Multiscale subsurface
flow modeling
 Modeling of power grid
for OE applications
All have published science
results obtained using
Swift
E
C
A
B
A
B
C
D
E
F
F
D
Assess
Red indicates higher statistical
confidence in data
Impact and Approach Accomplishments ALCF Contributions
• HEDM imaging and analysis
shows granular
material structure, of
non-destructively
• APS Sector 1 scientists use
Mira to process data from live
HEDM experiments, providing
real-time feedback to correct
or improve in-progress
experiments
• Scientists working with
Discovery Engines LDRD
developed new Swift analysis
workflows to process APS data
from Sectors 1, 6, and 11
• Mira analyzes experiment in
10 mins vs. 5.2 hours on APS
cluster: > 30X improvement
• Scaling up to ~ 128K cores
(driven by data features)
• Cable flaw was found and
fixed at start of experiment,
saving an entire multi-day
experiment and valuable user
time and APS beam time.
• In press: High-Energy Synchrotron X-
ray Techniques for Studying Irradiated
Materials, J-S Park et al, J. Mat. Res.
• Big data staging with MPI-IO for
interactive X-ray science, J Wozniak et
al, Big Data Conference, Dec 2014
• Design, develop, support, and trial
user engagement to make Swift
workflow solution on ALCF
systems a reliable, secure and
supported production service
• Creation and support of the Petrel
data server
• Reserved resources on Mira for
APS HEDM experiment at Sector
1-ID beamline (8/10/2014 and
future sessions in APS 2015 Run 1)
Boosting Light Source Productivity with Swift ALCF Data Analysis
H Sharma, J Almer (APS); J Wozniak, M Wilde, I Foster (MCS)
Analyze
Fix
Re-analyze
Valid
Data!
2 3
4
5
1
Conclusion: parallel workflow scripting is practical,
productive, and necessary, at a broad range of scales
 Swift programming model demonstrated feasible and
scalable on XSEDE, Blue Waters, OSG, DOE systems
 Applied to numerous MTC and HPC application domains
– attractive for data-intensive applications
– and several hybrid programming models
 Proven productivity enhancement in materials,
genomics, biochem, earth systems science, …
 Deep integration of workflow in progress at XSEDE, ALCF
Workflow through implicitly parallel dataflow is
productive for applications and systems at many scales,
including on highest-end system
What’s next?
 Programmability
– New patterns ala Van Der Aalst et al (workflowpatterns.org)
 Fine grained dataflow – programming in the smaller?
– Run leaf tasks on accelerators (CUDA GPUs, Intel Phi)
– How low/fast can we drive this model?
 PowerFlow
– Applies dataflow semantics to manage and reduce energy usage
 Extreme-scale reliability
 Embed Swift semantics in Python, R, Java, shell, make
– Can we make Swift “invisible”? Should we?
 Swift-Reduce
– Learning from map-reduce
– Integration with map-reduce
GeMTC: GPU-enabled Many-Task Computing
Goals:
1) MTC support 2) Programmability
3) Efficiency 4) MPMD on SIMD
5) Increase concurrency to warp level
Approach:
Design & implement GeMTC middleware:
1) Manages GPU 2) Spread host/device
3) Workflow system integration (Swift/T)
Motivation: Support for MTC on all accelerators!
S. J. Krieder, J. M. Wozniak, T. Armstrong, M. Wilde, D. S. Katz, B. Grimmer, I. T. Foster, I. Raicu, "Design and Evaluation of
the GeMTC Framework for GPU-enabled Many-Task Computing,” HPDC'14
Further research directions
 Deeply in-situ processing for extreme-scale analytics
 Shell-like Read-Evaluate-Print Loop ala iPython
 Debugging of extreme-scale workflows
Deeply in-situ analytics of a
climate simulation
25
U . S . D E P A R T M E N T O F
ENERGY
Swift gratefully acknowledges support from:
http://swift-lang.org

More Related Content

PPTX
Automation testing
Mona M. Abd El-Rahman
 
PPTX
Aws introduction
MouryaKumar Reddy Rajala
 
PPTX
Azure dev ops
Swaminathan Vetri
 
PDF
AWS ELB
Mahesh Raj
 
PPTX
Regression and performance testing
Himanshu
 
PPTX
Azure automation
Tariq Younas
 
PDF
Software Engineering - chp1- software dev methodologies
Lilia Sfaxi
 
PPTX
How to Get Started with Cypress
Applitools
 
Automation testing
Mona M. Abd El-Rahman
 
Aws introduction
MouryaKumar Reddy Rajala
 
Azure dev ops
Swaminathan Vetri
 
AWS ELB
Mahesh Raj
 
Regression and performance testing
Himanshu
 
Azure automation
Tariq Younas
 
Software Engineering - chp1- software dev methodologies
Lilia Sfaxi
 
How to Get Started with Cypress
Applitools
 

What's hot (20)

ODP
Presentation on Agile Testing
1Solutions Pvt. Ltd.
 
PDF
Fluentd Overview, Now and Then
SATOSHI TAGOMORI
 
PPTX
Introduction to selenium
Archana Krushnan
 
PPSX
AWS Elastic Load Balancing for AWS Architect & SysOps Certification
Sanjay Sharma
 
PPTX
Cypress Testing.pptx
JasmeenShrestha
 
PPT
Selenium ppt
Pavan Kumar
 
PPT
Joomla
RAJU MAKWANA
 
PDF
The Reactive Manifesto
Reza Samei
 
PPT
Selenium Automation Framework
Mindfire Solutions
 
PDF
e2e testing with cypress
Tomasz Bak
 
PDF
Appium & Robot Framework
Furkan Ertürk
 
PDF
Introduction to Apache Kafka and Confluent... and why they matter
confluent
 
PPTX
Introduction to Automation Testing
Archana Krushnan
 
PPTX
Serverless Architecture
Elana Krasner
 
PPT
Selenium
Ruturaj Doshi
 
ODP
Introduction To RabbitMQ
Knoldus Inc.
 
PDF
Amazon API Gateway
Mark Bate
 
PDF
Latest Selenium Interview Questions And Answers.pdf
Varsha Rajput
 
PPTX
Kafka presentation
Mohammed Fazuluddin
 
Presentation on Agile Testing
1Solutions Pvt. Ltd.
 
Fluentd Overview, Now and Then
SATOSHI TAGOMORI
 
Introduction to selenium
Archana Krushnan
 
AWS Elastic Load Balancing for AWS Architect & SysOps Certification
Sanjay Sharma
 
Cypress Testing.pptx
JasmeenShrestha
 
Selenium ppt
Pavan Kumar
 
Joomla
RAJU MAKWANA
 
The Reactive Manifesto
Reza Samei
 
Selenium Automation Framework
Mindfire Solutions
 
e2e testing with cypress
Tomasz Bak
 
Appium & Robot Framework
Furkan Ertürk
 
Introduction to Apache Kafka and Confluent... and why they matter
confluent
 
Introduction to Automation Testing
Archana Krushnan
 
Serverless Architecture
Elana Krasner
 
Selenium
Ruturaj Doshi
 
Introduction To RabbitMQ
Knoldus Inc.
 
Amazon API Gateway
Mark Bate
 
Latest Selenium Interview Questions And Answers.pdf
Varsha Rajput
 
Kafka presentation
Mohammed Fazuluddin
 
Ad

Similar to Swift Parallel Scripting for High-Performance Workflow (20)

PPTX
David Kelly SWIFT
David LeBauer
 
PPTX
Swift: A parallel scripting for applications at the petascale and beyond.
Nagasuri Bala Venkateswarlu
 
PDF
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
jsvetter
 
PDF
Scaling Application on High Performance Computing Clusters and Analysis of th...
Rusif Eyvazli
 
PPT
Parallel Computing 2007: Overview
Geoffrey Fox
 
PDF
2017 nov reflow sbtb
mariuseriksen4
 
PPTX
Scientific
marpierc
 
PPT
Many Task Applications for Grids and Supercomputers
Ian Foster
 
PDF
Metadata and Provenance for ML Pipelines with Hopsworks
Jim Dowling
 
PPTX
Big data at experimental facilities
Ian Foster
 
PDF
Towards efficient processing of RDF data streams
Alejandro Llaves
 
PDF
Towards efficient processing of RDF data streams
Alejandro Llaves
 
PPTX
RAMSES: Robust Analytic Models for Science at Extreme Scales
Ian Foster
 
PDF
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
GoDataDriven
 
PDF
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Herman Wu
 
PDF
Big data distributed processing: Spark introduction
Hektor Jacynycz García
 
PDF
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Paco Nathan
 
PPT
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
Xiao Qin
 
PDF
OpenMP tasking model: from the standard to the classroom
Facultad de Informática UCM
 
PDF
Atomate: a high-level interface to generate, execute, and analyze computation...
Anubhav Jain
 
David Kelly SWIFT
David LeBauer
 
Swift: A parallel scripting for applications at the petascale and beyond.
Nagasuri Bala Venkateswarlu
 
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
jsvetter
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Rusif Eyvazli
 
Parallel Computing 2007: Overview
Geoffrey Fox
 
2017 nov reflow sbtb
mariuseriksen4
 
Scientific
marpierc
 
Many Task Applications for Grids and Supercomputers
Ian Foster
 
Metadata and Provenance for ML Pipelines with Hopsworks
Jim Dowling
 
Big data at experimental facilities
Ian Foster
 
Towards efficient processing of RDF data streams
Alejandro Llaves
 
Towards efficient processing of RDF data streams
Alejandro Llaves
 
RAMSES: Robust Analytic Models for Science at Extreme Scales
Ian Foster
 
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
GoDataDriven
 
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Herman Wu
 
Big data distributed processing: Spark introduction
Hektor Jacynycz García
 
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Paco Nathan
 
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
Xiao Qin
 
OpenMP tasking model: from the standard to the classroom
Facultad de Informática UCM
 
Atomate: a high-level interface to generate, execute, and analyze computation...
Anubhav Jain
 
Ad

More from Daniel S. Katz (20)

PDF
Research software susainability
Daniel S. Katz
 
PPTX
Software Professionals (RSEs) at NCSA
Daniel S. Katz
 
PPTX
Parsl: Pervasive Parallel Programming in Python
Daniel S. Katz
 
PPTX
Requiring Publicly-Funded Software, Algorithms, and Workflows to be Made Publ...
Daniel S. Katz
 
PPTX
What is eScience, and where does it go from here?
Daniel S. Katz
 
PDF
Citation and Research Objects: Toward Active Research Objects
Daniel S. Katz
 
PDF
FAIR is not Fair Enough, Particularly for Software Citation, Availability, or...
Daniel S. Katz
 
PPTX
Fundamentals of software sustainability
Daniel S. Katz
 
PPTX
Software Citation in Theory and Practice
Daniel S. Katz
 
PPTX
URSSI
Daniel S. Katz
 
PDF
Research Software Sustainability: WSSSPE & URSSI
Daniel S. Katz
 
PDF
Software citation
Daniel S. Katz
 
PDF
Expressing and sharing workflows
Daniel S. Katz
 
PDF
Citation and reproducibility in software
Daniel S. Katz
 
PPTX
Software Citation: Principles, Implementation, and Impact
Daniel S. Katz
 
PPTX
Summary of WSSSPE and its working groups
Daniel S. Katz
 
PPTX
Working towards Sustainable Software for Science: Practice and Experience (WS...
Daniel S. Katz
 
PPTX
20160607 citation4software panel
Daniel S. Katz
 
PPTX
20160607 citation4software opening
Daniel S. Katz
 
PPTX
Scientific Software Challenges and Community Responses
Daniel S. Katz
 
Research software susainability
Daniel S. Katz
 
Software Professionals (RSEs) at NCSA
Daniel S. Katz
 
Parsl: Pervasive Parallel Programming in Python
Daniel S. Katz
 
Requiring Publicly-Funded Software, Algorithms, and Workflows to be Made Publ...
Daniel S. Katz
 
What is eScience, and where does it go from here?
Daniel S. Katz
 
Citation and Research Objects: Toward Active Research Objects
Daniel S. Katz
 
FAIR is not Fair Enough, Particularly for Software Citation, Availability, or...
Daniel S. Katz
 
Fundamentals of software sustainability
Daniel S. Katz
 
Software Citation in Theory and Practice
Daniel S. Katz
 
Research Software Sustainability: WSSSPE & URSSI
Daniel S. Katz
 
Software citation
Daniel S. Katz
 
Expressing and sharing workflows
Daniel S. Katz
 
Citation and reproducibility in software
Daniel S. Katz
 
Software Citation: Principles, Implementation, and Impact
Daniel S. Katz
 
Summary of WSSSPE and its working groups
Daniel S. Katz
 
Working towards Sustainable Software for Science: Practice and Experience (WS...
Daniel S. Katz
 
20160607 citation4software panel
Daniel S. Katz
 
20160607 citation4software opening
Daniel S. Katz
 
Scientific Software Challenges and Community Responses
Daniel S. Katz
 

Recently uploaded (20)

PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
This slide provides an overview Technology
mineshkharadi333
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 

Swift Parallel Scripting for High-Performance Workflow

  • 1. Swift Parallel Scripting for High-Performance Workflow April 16, 2015 Michael Wilde [email protected] Daniel S. Katz [email protected] http://swift-lang.org
  • 2. Domain of Interest “Time” “Complexity” Increasing capabilities in computational science
  • 3. Workflow needs  Application Drivers – Applications that are many-task in nature: parameters sweeps, UQ, inverse modeling, and data-driven applications – Analysis of capability application outputs – Analysis of stored or collected data – Increase productivity at major experiment facilities (light source, etc.) – Urgent computing – These applications are all many-task in nature  Requirements – Usability and ease of workflow expression – Ability to leverage complex architecture of HPC and HTC systems (fabric, scheduler, hybrid node and programming models), individually and collectively – Ability to integrate high-performance data services and volumes – Make use of the system task rate capabilities from clusters to extreme-scale systems  Approach – A programming model for programming in the large 3
  • 4. When do you need HPC workflow? Example application: protein-ligand docking for drug screening (B) O(100K) drug candidates …then hundreds of detailed MD models to find 10-20 fruitful candidates for wetlab & APS crystallography O(10) proteins implicated in a disease = 1M docking tasks… X …
  • 5. 5 For protein docking workflow: foreach p, i in proteins { foreach c, j in ligands { (structure[i,j], log[i,j]) = dock(p, c, minRad, maxRad); } scatter_plot = analyze(structure) To run: swift –site tukey,blues dock.swift Expressing this many task workflow in Swift
  • 6. The Swift runtime system has drivers and algorithms to efficiently support and aggregate diverse runtime environments Swift enables execution of simulation campaigns across multiple HPC and cloud resources 6 Local datamarkApps Swift host: login node, laptop, … Scripts Data servers Data servers Data servers Campus systems Cloud resources Petascale systems National infrastructure
  • 7. Swift in a nutshell  Data types string s = “hello world”; int i = 4; int A[];  Mapped data types type image; image file1<“snapshot.jpg”>;  Mapped functions app (file o) myapp(file f, int i) { mysim "-s" i @f @o; }  Conventional expressions if (x == 3) { y = x+2; s = @strcat(“y: ”, y); }  Structured data image A[]<array_mapper…>;  Loops foreach f,i in A { B[i] = convert(A[i]); }  Data flow analyze(B[0], B[1]); analyze(B[2], B[3]); Swift: A language for distributed parallel scripting, J. Parallel Computing, 2011
  • 8. Pervasively parallel  Swift is a parallel scripting system for grids, clouds and clusters  F() and G() are computed in parallel – Can be Swift functions, or leaf tasks (executables or scripts in shell, python, R, Octave, MATLAB, ...)  r computed when they are done  This parallelism is automatic  Works recursively throughout the program’s call graph (int r) myproc (int i) { int f = F(i); int g = G(i); r = f + g; }
  • 10. Data-intensive example: Processing MODIS land-use data analyze colorize x 317 landUse x 317 mark Swift loops process hundreds of images in parallel assemble Image processing pipeline for land-use data from the MODIS satellite instrument…
  • 11. Processing MODIS land-use data foreach raw,i in rawFiles { land[i] = landUse(raw,1); colorFiles[i] = colorize(raw); } (topTiles, topFiles, topColors) = analyze(land, landType, nSelect); gridMap = mark(topTiles); montage = assemble(topFiles,colorFiles,webDir);
  • 12. Example of Swift’s implicit parallelism: Processing MODIS land-use data analyze colorize x 317 landUse x 317 mark Swift loops process hundreds of images in parallel assemble Image processing pipeline for land-use data from the MODIS satellite instrument…
  • 13. Swift provides 4 important benefits: 13 Makes parallelism more transparent Implicitly parallel functional dataflow programming Makes computing location more transparent Runs your script on multiple distributed sites and diverse computing resources (desktop to petascale) Makes basic failure recovery transparent Retries/relocates failing tasks Can restart failing runs from point of failure Enables provenance capture Tasks have recordable inputs and outputs
  • 14. Swift/T: productive extreme-scale scripting  Script-like programming with “leaf” tasks – In-memory function calls in C++, Fortran, Python, R, … passing in-memory objects – More expressive than master-worker for “programming in the large” – Leaf tasks can be MPI programs, etc. Can be separate processes if OS permits.  Distributed, scalable runtime manages tasks, load balancing, data movement  User function calls to external code run on thousands of worker nodes Swift control process Swift control process Parallel evaluator and data store Swift worker process C C++ Fortran Swift worker process C C++ Fortran Swift worker process C C++ Fortran MPI Scripts
  • 15. Parallel tasks in Swift/T  Swift expression: z = @par=32 f(x,y);  ADLB server finds 8 available workers – Workers receive ranks from ADLB server – Performs comm = MPI_Comm_create_group()  Workers perform f(x,y)communicating on comm
  • 16. LAMMPS parallel tasks  LAMMPS provides a convenient C++ API  Easily used by Swift/T parallel tasks foreach i in [0:20] { t = 300+i; sed_command = sprintf("s/_TEMPERATURE_/%i/g", t); lammps_file_name = sprintf("input-%i.inp", t); lammps_args = "-i " + lammps_file_name; file lammps_input<lammps_file_name> = sed(filter, sed_command) => @par=8 lammps(lammps_args); } Tasks with varying sizes packed into big MPI run Black: Compute Blue: Message White: Idle
  • 17. Swift/T-specific features  Task locality: Ability to send a task to a process – Allows for big data –type applications – Allows for stateful objects to remain resident in the workflow – location L = find_data(D); int y = @location=L f(D, x);  Data broadcast  Task priorities: Ability to set task priority – Useful for tweaking load balancing  Updateable variables – Allow data to be modified after its initial write – Consumer tasks may receive original or updated values when they emerge from the work queue 17 Wozniak et al. Language features for scalable distributed-memory dataflow computing. Proc. Dataflow Execution Models at PACT, 2014.
  • 18. Swift/T: scaling of trivial foreach { } loop 100 microsecond to 10 millisecond tasks on up to 512K integer cores of Blue Waters 18
  • 19. Large-scale applications using Swift  Simulation of super- cooled glass materials  Protein and biomolecule structure and interaction  Climate model analysis and decision making for global food production & supply  Materials science at the Advanced Photon Source  Multiscale subsurface flow modeling  Modeling of power grid for OE applications All have published science results obtained using Swift E C A B A B C D E F F D
  • 20. Assess Red indicates higher statistical confidence in data Impact and Approach Accomplishments ALCF Contributions • HEDM imaging and analysis shows granular material structure, of non-destructively • APS Sector 1 scientists use Mira to process data from live HEDM experiments, providing real-time feedback to correct or improve in-progress experiments • Scientists working with Discovery Engines LDRD developed new Swift analysis workflows to process APS data from Sectors 1, 6, and 11 • Mira analyzes experiment in 10 mins vs. 5.2 hours on APS cluster: > 30X improvement • Scaling up to ~ 128K cores (driven by data features) • Cable flaw was found and fixed at start of experiment, saving an entire multi-day experiment and valuable user time and APS beam time. • In press: High-Energy Synchrotron X- ray Techniques for Studying Irradiated Materials, J-S Park et al, J. Mat. Res. • Big data staging with MPI-IO for interactive X-ray science, J Wozniak et al, Big Data Conference, Dec 2014 • Design, develop, support, and trial user engagement to make Swift workflow solution on ALCF systems a reliable, secure and supported production service • Creation and support of the Petrel data server • Reserved resources on Mira for APS HEDM experiment at Sector 1-ID beamline (8/10/2014 and future sessions in APS 2015 Run 1) Boosting Light Source Productivity with Swift ALCF Data Analysis H Sharma, J Almer (APS); J Wozniak, M Wilde, I Foster (MCS) Analyze Fix Re-analyze Valid Data! 2 3 4 5 1
  • 21. Conclusion: parallel workflow scripting is practical, productive, and necessary, at a broad range of scales  Swift programming model demonstrated feasible and scalable on XSEDE, Blue Waters, OSG, DOE systems  Applied to numerous MTC and HPC application domains – attractive for data-intensive applications – and several hybrid programming models  Proven productivity enhancement in materials, genomics, biochem, earth systems science, …  Deep integration of workflow in progress at XSEDE, ALCF Workflow through implicitly parallel dataflow is productive for applications and systems at many scales, including on highest-end system
  • 22. What’s next?  Programmability – New patterns ala Van Der Aalst et al (workflowpatterns.org)  Fine grained dataflow – programming in the smaller? – Run leaf tasks on accelerators (CUDA GPUs, Intel Phi) – How low/fast can we drive this model?  PowerFlow – Applies dataflow semantics to manage and reduce energy usage  Extreme-scale reliability  Embed Swift semantics in Python, R, Java, shell, make – Can we make Swift “invisible”? Should we?  Swift-Reduce – Learning from map-reduce – Integration with map-reduce
  • 23. GeMTC: GPU-enabled Many-Task Computing Goals: 1) MTC support 2) Programmability 3) Efficiency 4) MPMD on SIMD 5) Increase concurrency to warp level Approach: Design & implement GeMTC middleware: 1) Manages GPU 2) Spread host/device 3) Workflow system integration (Swift/T) Motivation: Support for MTC on all accelerators! S. J. Krieder, J. M. Wozniak, T. Armstrong, M. Wilde, D. S. Katz, B. Grimmer, I. T. Foster, I. Raicu, "Design and Evaluation of the GeMTC Framework for GPU-enabled Many-Task Computing,” HPDC'14
  • 24. Further research directions  Deeply in-situ processing for extreme-scale analytics  Shell-like Read-Evaluate-Print Loop ala iPython  Debugging of extreme-scale workflows Deeply in-situ analytics of a climate simulation
  • 25. 25 U . S . D E P A R T M E N T O F ENERGY Swift gratefully acknowledges support from: http://swift-lang.org