introduction to parallel computing€¦ · introduction to parallel computing elwin chan. 2 flight...
TRANSCRIPT
1© 2015 The MathWorks, Inc.
Introduction to Parallel Computing
Elwin Chan
2
Flight Test Data Analysis
16x Faster
Heart Transplant Studies
3-4 weeks reduced to 5 days
Mobile Communications Technology
Simulation time reduced from weeks to hours,
5x more scenarios
Hedge Fund Portfolio Management
Simulation time reduced from 6 hours to 1.2 hours
Optimizing JIT Steel Manufacturing Schedule
Cut simulation time from 1 hour to 5 minutes
Who Uses Parallel Computing?
3
Demo: Getting Data from a Web API
4
Demo: Getting Data from a Web API using parfor
5
Demo: Getting Data from a Web API using parfeval
6
Going Parallel: Multicore
Multicore Desktop
MATLAB client
MATLAB workers
7
Going Parallel: Clusters
Computer Cluster
MATLAB client
8
Going Parallel: Cloud
MATLAB client
Cloud Cluster
9
Going Parallel: GPUs
NVIDIA GPUs
Device Memory
GPU Cores
MATLAB client
10
Explicit Parallelism: Independent Tasks or Iterationsparfor, parfeval, jobs and tasks
Examples: parameter sweeps, Monte Carlo simulations
No dependencies or communications between tasks
MATLAB client
MATLAB workers
Time Time
11
Speed-up using NVIDIA GPUs
Ideal Problems
• Massively Parallel and/or Vectorized operations
• Computationally Intensive
• Algorithm consists of supported functions
300+ GPU-enabled MATLAB functions
Additional GPU-enabled Toolboxes
• Neural Networks
• Image Processing
• Communications
• Signal Processing
..... Learn More
Device Memory
GPU Cores
12
Too Much Data for One Machine?Use Distributed Memory
Using More Computers (RAM)
MATLAB client RAM RAM
13
Distributed Arrays
Distributed Arrays hold data remotely on workers running on a cluster
Manipulate directly from client MATLAB (desktop)
200+ MATLAB functions overloaded for distributed arrays
Supported functions for Distributed Arrays
14
Too Much Data for Your Cluster?Use Datastore
Datastore
HDFS
Node Data
Node Data
Node Data
Hadoop
Datastore access data stored in
HDFS from MATLAB
15
Too Much Data for Your Cluster?Use Datastore, MapReduce and tall
Datastore
map.m
reduce.m
HDFS
Node Data
Node Data
Node Data
Map Reduce
Map Reduce
Map Reduce
Hadoop
MATLAB
Distributed Computing
Server
16
Offload and Scale Computations with batch
MATLAB
Desktop (Client)
Result
Work
Worker
Worker
Worker
Worker
batch(…)
17
Going Parallel: Other MATLAB® ToolboxesEnable parallel computing support by setting a flag or preference
Optimization
Parallel estimation of
gradients
Statistics and Machine Learning
Resampling Methods, k-Means
clustering, GPU-enabled functions
Neural Networks
Deep Learning, Neural Network
training and simulation
Image Processing
Batch Image Processor, Block
Processing, GPU-enabled functions
Computer Vision
Parallel-enabled functions
in bag-of-words workflow
Signal Processing and
Communications
GPU-enabled FFT filtering,
cross correlation, BER
simulations
Other Parallel-enabled Toolboxes
18
Going Parallel: Simulink®Enable parallel computing support by setting a flag or preference
Simulink Control Design
Frequency response estimation
Simulink/Embedded Coder
Generating and building code
Simulink Design Optimization
Response optimization, sensitivity
analysis, parameter estimation
Communication Systems Toolbox
GPU-based System objects for
Simulation Acceleration
Other Parallel-enabled Toolboxes
19
Why use Parallel Computing Toolbox?
Reduce computation time by
– Using more cores
– Accessing Graphical Processing Units
Overcome memory limitations by
– Distributing data to available hardware
– Using datastore and mapreduce
Offload computations to a cluster and
– Free up your desktop
– Access better computer hardware
Device Memory
GPU Cores
RAM RAM