Parallel and Distributed Computing with MATLAB Gerardo Hernández Manager, Application Engineer

Similar documents
Parallel and Distributed Computing with MATLAB The MathWorks, Inc. 1

Mit MATLAB auf der Überholspur Methoden zur Beschleunigung von MATLAB Anwendungen

Speeding up MATLAB Applications Sean de Wolski Application Engineer

Optimizing and Accelerating Your MATLAB Code

Integrate MATLAB Analytics into Enterprise Applications

Scaling MATLAB. for Your Organisation and Beyond. Rory Adams The MathWorks, Inc. 1

Multicore Computer, GPU 및 Cluster 환경에서의 MATLAB Parallel Computing 기능

Mit MATLAB auf der Überholspur Methoden zur Beschleunigung von MATLAB Anwendungen

Speeding up MATLAB Applications The MathWorks, Inc.

Parallel Computing with MATLAB

Integrate MATLAB Analytics into Enterprise Applications

Data Analytics with MATLAB. Tackling the Challenges of Big Data

Getting Started with MATLAB Francesca Perino

Integrate MATLAB Analytics into Enterprise Applications

Accelerating System Simulations

Modeling a 4G LTE System in MATLAB

Using Parallel Computing Toolbox to accelerate the Video and Image Processing Speed. Develop parallel code interactively

Big Data con MATLAB. Lucas García The MathWorks, Inc. 1

MATLAB. Senior Application Engineer The MathWorks Korea The MathWorks, Inc. 2

Technical Computing with MATLAB

MATLAB Distributed Computing Server Release Notes

What's New in MATLAB for Engineering Data Analytics?

Tackling Big Data Using MATLAB

Large Data in MATLAB: A Seismic Data Processing Case Study U. M. Sundar Senior Application Engineer

Analyzing Fleet Data with MATLAB and Spark

MATLAB AND PARALLEL COMPUTING

Daniel D. Warner. May 31, Introduction to Parallel Matlab. Daniel D. Warner. Introduction. Matlab s 5-fold way. Basic Matlab Example

Deep learning in MATLAB From Concept to CUDA Code

Embarquez votre Intelligence Artificielle (IA) sur CPU, GPU et FPGA

What s New in MATLAB May 16, 2017

MATLAB Based Optimization Techniques and Parallel Computing

Getting Started with Serial and Parallel MATLAB on bwgrid

Data Analytics with MATLAB

Navigating Big Data with MATLAB

What s New in MATLAB and Simulink The MathWorks, Inc. 1

INTRODUCTION TO MATLAB PARALLEL COMPUTING TOOLBOX

System Requirements & Platform Availability by Product for R2016b

High Performance and GPU Computing in MATLAB

Scaling up MATLAB Analytics Marta Wilczkowiak, PhD Senior Applications Engineer MathWorks

What s New in MATLAB and Simulink Young Joon Lee Principal Application Engineer

Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah

Data Analysis with MATLAB. Steve Lantz Senior Research Associate Cornell CAC

Integrating Advanced Analytics with Big Data

Accelerating Finite Element Analysis in MATLAB with Parallel Computing

What s New MATLAB and Simulink

MATLAB 에서작업한응용프로그램의공유 : App 에서부터웹서비스까지

Parallel Computing with MATLAB

2015 The MathWorks, Inc. 1

OPERATIONALIZING MACHINE LEARNING USING GPU ACCELERATED, IN-DATABASE ANALYTICS

Parallel Computing with MATLAB

Lecture x: MATLAB - advanced use cases

Parallel MATLAB at VT

MATLAB is a multi-paradigm numerical computing environment fourth-generation programming language. A proprietary programming language developed by

Parallel Computing with MATLAB

컴퓨터비전의최신기술 : Deep Learning, 3D Vision and Embedded Vision

2^48 - keine Angst vor großen Datensätzen in MATLAB

Sharing and Deploying MATLAB Programs Sundar Umamaheshwaran Amit Doshi Application Engineer-Technical Computing

Calcul intensif et Stockage de Masse. CÉCI/CISM HPC training sessions Use of Matlab on the clusters

NVIDIA DGX SYSTEMS PURPOSE-BUILT FOR AI

개발과정에서의 MATLAB 과 C 의연동 ( 영상처리분야 )

GPU ACCELERATED DATABASE MANAGEMENT SYSTEMS

Calcul intensif et Stockage de Masse. CÉCI/CISM HPC training sessions

Accelerate Big Data Insights

Parallel Computing with MATLAB on Discovery Cluster

Behind Today s Trends The Technologies Driving Change. Paul Smith Director Consulting Services

Cloud Computing & Visualization

What s New in MATLAB and Simulink

Parallel Computing with Matlab and R

Speedup Altair RADIOSS Solvers Using NVIDIA GPU

AWS & Intel: A Partnership Dedicated to fueling your Innovations. Thomas Kellerer BDM CSP, Intel Central Europe

Pouya Kousha Fall 2018 CSE 5194 Prof. DK Panda

BIG DATA: Data Analytics with MATLAB Christophe POUILLOT Senior Consultant MathWorks

MATLAB 7. The Language of Technical Computing KEY FEATURES

Application Development and Deployment With MATLAB

Windows Compute Cluster Server 2003 allows MATLAB users to quickly and easily get up and running with distributed computing tools.

Speeding up Simulink. Murali Yeddanapudi The MathWorks, Inc. 1

Parallel Cosegmentation via Submodular Optimization on Anisotropic Diffusion

Using Intel Math Kernel Library with MathWorks* MATLAB* on Intel Xeon Phi Coprocessor System

2015 The MathWorks, Inc. 1

MATLAB Parallel Computing Toolbox Benchmark for an Embarrassingly Parallel Application

Oracle Big Data Connectors

A Cloud System for Machine Learning Exploiting a Parallel Array DBMS

Summer 2009 REU: Introduction to Some Advanced Topics in Computational Mathematics

What s New in Computational Finance

CERN openlab & IBM Research Workshop Trip Report

Moving MATLAB Algorithms into Complete Designs with Fixed-Point Simulation and Code Generation

2015 The MathWorks, Inc. 1

MathWorks Products and Prices North America January 2018

What s New in MATLAB and Simulink

What s New in MATLAB and Simulink

CMSC 714 Lecture 6 MPI vs. OpenMP and OpenACC. Guest Lecturer: Sukhyun Song (original slides by Alan Sussman)

What s New for MATLAB David Willingham

Using Alluxio to Improve the Performance and Consistency of HDFS Clusters

Accelerator programming with OpenACC

Big Data Analytics Performance for Large Out-Of- Core Matrix Solvers on Advanced Hybrid Architectures

Accelerating Simulink Optimization, Code Generation & Test Automation Through Parallelization

IBM POWER SYSTEMS: YOUR UNFAIR ADVANTAGE

Tutorial - Exporting Models to Simulink

Boost your Analytics with ML for SQL Nerds

QLIK INTEGRATION WITH AMAZON REDSHIFT

Transcription:

Parallel and Distributed Computing with MATLAB Gerardo Hernández Manager, Application Engineer 2018 The MathWorks, Inc. 1

Practical Application of Parallel Computing Why parallel computing? Need faster insight on more complex problems with larger datasets Computing infrastructure is broadly available (multicore desktops, GPUs, clusters) Why parallel computing with MATLAB Leverage computational power of more hardware Accelerate workflows with minimal to no code changes to your original code Focus on your engineering and research, not the computation 2

Steps for Improving Performance First get code working Speed up code with core MATLAB Include compiled languages and additional hardware Webinar: Optimizing and Accelerating Your MATLAB Code 3

Programming Parallel Applications Built-in multithreading Automatically enabled in MATLAB since R2008a Multiple threads in a single MATLAB computation engine Parallel computing using explicit techniques Multiple computation engines controlled by a single session High-level constructs to let you parallelize MATLAB applications Perform MATLAB computations on GPUs 4

Parallel Computing TOOLBOXES BLOCKSETS 5

Agenda Utilizing multiple cores on a desktop computer Scaling up to cluster and cloud resources Tackling data-intensive problems on desktops and clusters Accelerating applications with NVIDIA GPUs Summary and resources 6

Ease of Use Programming Parallel Applications Built in support..., 'UseParallel', true) Greater Control 7

Demo: Cell Phone Tower Optimization Using Parallel-Enabled Functions Parallel-enabled functions in Optimization Toolbox Set flags to run optimization in parallel Use pool of MATLAB workers to enable parallelism 8

Predictive Maintenance of Turbofan Engine Sensor data from 100 engines of the same model Scenario: No data from failures Performing scheduled maintenance No failures have occurred Maintenance crews tell us most engines could run for longer Can we be smarter about how to schedule maintenance without knowing what failure looks like? Data provided by NASA PCoE http://ti.arc.nasa.gov/tech/dash/pcoe/prognostic-data-repository/ 9

Parallel-enabled Toolboxes (MATLAB Product Family) Enable parallel computing support by setting a flag or preference Image Processing Batch Image Processor, Block Processing, GPU-enabled functions Statistics and Machine Learning Resampling Methods, k-means clustering, GPU-enabled functions Deep Learning Deep Learning, Neural Network training and simulation Signal Processing and Communications GPU-enabled FFT filtering, cross correlation, BER simulations Computer Vision Parallel-enabled functions in bag-of-words workflow Optimization Parallel estimation of gradients Other parallel-enabled Toolboxes 10

Ease of Use Programming Parallel Applications Built in support..., 'UseParallel', true) Simple programming constructs parfor, batch Greater Control 12

Embarrassingly Parallel: Independent Tasks or Iterations No dependencies or communications between tasks Examples: parameter sweeps, Monte Carlo simulations MATLAB Desktop (Client) Time Time 13

Example: Parameter Sweep of ODEs Parallel for-loops Parameter sweep of ODE system Damped spring oscillator Sweep through different values of damping and stiffness Record peak value for each simulation 5 m x b x k x 0 1,2,... 1,2,... Convert for to parfor Use pool of MATLAB workers 14

Mechanics of parfor Loops 1 12 23 34 4 55 66 7 88 9 910 10 a = zeros(10, 1) parfor i = 1:10 a(i) = i; end a a(i) = i; a(i) = i; a(i) = i; a(i) = i; 16

Tips for Leveraging PARFOR Consider creating smaller arrays on each worker versus one large array prior to the parfor loop Take advantage of parallel.pool.constant to establish variables on pool workers prior to the loop Encapsulate blocks as functions when needed Understanding parfor 17

Ease of Use Programming Parallel Applications Built in support..., 'UseParallel', true) Simple programming constructs parfor, batch Full control of parallelization spmd, parfeval Greater Control 18

Agenda Utilizing multiple cores on a desktop computer Scaling up to cluster and cloud resources Tackling data-intensive problems on desktops and clusters Accelerating applications with NVIDIA GPUs Summary and resources 19

Take Advantage of Cluster Hardware Offload computation: Free up desktop Access better computers Computer Cluster Cluster Scale speed-up: Use more cores Go from hours to minutes Scale memory: MATLAB Desktop (Client) Scheduler Utilize tall arrays and distributed arrays Solve larger problems without re-coding algorithms 20

Offloading Computations Work TOOLBOXES BLOCKSETS Result Scheduler 21

Offloading Serial Computations job = batch(...); MATLAB Desktop (Client) Work Result 22

Example: Parameter Sweep of ODEs Offload and Scale Processing Offload processing to workers: batch 5 m x b x k x 0 1,2,... 1,2,... Scale offloaded processing: batch(,'pool', ) Retrieve results from job: fetchoutputs 23

Offloading and Scaling Computations job = batch(..., 'Pool', n); MATLAB Desktop (Client) Work Result 24

Migrate to Cluster / Cloud Use MATLAB Distributed Computing Server Change hardware without changing algorithm 25

Scale your applications beyond the desktop Option Parallel Computing Toolbox MATLAB Parallel Cloud MATLAB Distributed Computing Server for Amazon EC2 MATLAB Distributed Computing Server for Custom Cloud MATLAB Distributed Computing Server Description Explicit desktop scaling Single-user, basic scaling to cloud Maximum workers Scale to EC2 with some customization Scale to custom cloud No limit 16 256 No limit No limit Hardware Desktop MathWorks Compute Cloud Amazon EC2 Availability Worldwide United States and Canada United States, Canada and other select countries in Europe Amazon EC2, Microsoft Azure, Others Worldwide Scale to clusters Any Worldwide Learn More: Parallel Computing on the Cloud 26

Agenda Utilizing multiple cores on a desktop computer Scaling up to cluster and cloud resources Tackling data-intensive problems on desktops and clusters Accelerating applications with NVIDIA GPUs Summary and resources 27

Tall and Distributed Data Tall Data Columnar data that does not fit in memory of a desktop or cluster Distributed Data Large matrices using the combined memory of a cluster Machine Memory Common Actions Data manipulation, math, statistics Summary visualizations Machine learning Common Actions Matrix Manipulation Linear Algebra and Signal Processing 28

Tall Arrays New data type in MATLAB R2016b Machine Memory Applicable when: Data is columnar with many rows Overall data size is too big to fit into memory Operations are mathematical/statistical in nature Statistical and machine learning applications Hundreds of functions supported in MATLAB and Statistics and Machine Learning Toolbox Tall Data 29

Predictive Maintenance of Turbofan Engine Sensor data from 100 engines of the same model Scenario: No data from failures Performing scheduled maintenance No failures have occurred Maintenance crews tell us most engines could run for longer Can we be smarter about how to schedule maintenance without knowing what failure looks like? Data provided by NASA PCoE http://ti.arc.nasa.gov/tech/dash/pcoe/prognostic-data-repository/ 30

Execution Environments for Tall Arrays Local disk Shared folders Databases Run on Compute Clusters, or Spark if your data is stored in HDFS, for large scale analysis Process out-of-memory data on your Desktop to explore, analyze, gain insights and to develop analytics Use Parallel Computing Toolbox for increased performance Spark+Hadoop 32

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 33

Agenda Utilizing multiple cores on a desktop computer Scaling up to cluster and cloud resources Tackling data-intensive problems on desktops and clusters Accelerating applications with NVIDIA GPUs Summary and resources 34

Graphics Processing Units (GPUs) For graphics acceleration and scientific computing Many parallel processors Dedicated high speed memory 35

GPU Requirements Parallel Computing Toolbox requires NVIDIA GPUs www.nvidia.com/object/cuda_gpus.html MATLAB Release MATLAB R2018a and later releases MATLAB R2014b MATLAB R2017b MATLAB R2014a and earlier releases Required Compute Capability 3.0 or greater 2.0 or greater 1.3 or greater 36

Ease of Use Programming with GPUs Built in toolbox support Simple programming constructs gpuarray, gather Greater Control 37

Demo: Wave Equation Accelerating scientific computing in MATLAB with GPUs Objective: Solve 2 nd order wave equation with spectral methods Approach: Develop code for CPU Modify the code to use GPU computing using gpuarray Compare performance of the code using CPU and GPU 38

Speed-up MATLAB code with NVIDIA GPUs Ideal Problems Massively Parallel and/or Vectorized operations Computationally Intensive 300+ GPU-enabled MATLAB functions Enable existing MATLAB code to run on GPUs Support for sparse matrices on GPUs Additional GPU-enabled Toolboxes Deep Learning Image Processing Signal Processing... Learn More 39

Ease of Use Programming with GPUs Built in toolbox support Simple programming constructs gpuarray, gather Advanced programming constructs spmd, arrayfun Interface for experts CUDAKernel, mex Greater Control 40

Agenda Utilizing multiple cores on a desktop computer Scaling up to cluster and cloud resources Tackling data-intensive problems on desktops and clusters Accelerating applications with NVIDIA GPUs Summary and resources 41

Summary Easily develop parallel MATLAB applications without being a parallel programming expert Speed up the execution of your MATLAB applications using additional hardware Develop parallel applications on your desktop and easily scale to a cluster when needed 42

Some Other Valuable Resources MATLAB Documentation MATLAB Advanced Software Development Performance and Memory Parallel Computing Toolbox Parallel and GPU Computing Tutorials https://www.mathworks.com/videos/series/parallel-and-gpu-computing-tutorials- 97719.html Parallel Computing on the Cloud with MATLAB http://www.mathworks.com/products/parallel-computing/parallel-computing-on-thecloud/ 43

MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders. 2018 The MathWorks, Inc. 2018 The MathWorks, Inc. 44