Parallel processing in MATLAB

Request a supercomputer!

Parallel Computing Toolbox™ enables you to solve computational and data-intensive problems using multicore processors, GPUs, and computer clusters. High-level constructs such as parallel loops, specialized array types, and parallelized numerical algorithms let you parallelize MATLAB® applications without writing CUDA or MPI code. The toolbox allows you to utilize parallel-enabled functions in MATLAB and other toolboxes. You can also use the toolbox with Simulink® to run multiple simulations of a model in parallel. Applications and models can be executed interactively and in batch mode.

Matlab logo
Matlab

The toolbox enables you to harness the full computational power of multicore desktop processors by running applications on workers (MATLAB computational engines) executing locally. Without modifying code, you can run the same applications on clusters or clouds (using MATLAB Parallel Server™). You can also use the toolbox with MATLAB Parallel Server to handle matrix computations too large to fit in the memory of a single machine.

Scaling MATLAB Applications

The Parallel Computing Toolbox enables your applications to take advantage of computers equipped with multicore processors and GPUs.

Speeding Up MATLAB with Multicore Computers

Use parallel loops (parfor) to execute independent iterations in parallel on multicore CPUs for tasks such as parameter sweeps, optimizations, and Monte Carlo simulations. Parfor automates the creation of parallel pools and manages file dependencies, letting you focus on your work. Key functions in multiple MATLAB and Simulink products feature parallel-enabled functions. With the Parallel Computing Toolbox, these functions can distribute computations across available parallel computing resources. You can run parallel applications interactively and in batch mode.

  • Parallel for-loops (parfor)
  • Enhancing Monte Carlo simulation performance with parallel computing
  • Parallel computing with MATLAB and Simulink
  • Batch processing

ThreadPool

Run MATLAB functions in a thread-based environment.

Accelerate MATLAB with GPU

Parallel Computing Toolbox lets you leverage NVIDIA® GPUs directly from MATLAB using gpuArray. Over 500 MATLAB functions automatically execute on NVIDIA GPUs, including operations like fft, elementwise operations, and several linear algebra operations like lu and mldivide (backslash operator \). Key functions in multiple MATLAB and Simulink products, such as the Deep Learning Toolbox, are GPU-enabled. You can use GPUs without writing extra code, allowing you to focus on your application instead of tuning performance. Advanced developers can call CUDA code directly from MATLAB. Multiple GPUs can be utilized on desktops, computing clusters, and cloud environments.

  • MATLAB GPU computations
  • Run MATLAB functions on GPUs
  • Deep learning with MATLAB
  • Use GPUs in containers

Parallel Data Processing

Parallel Computing Toolbox extends tall arrays and embedded map-reduce capabilities in MATLAB for better performance on local workers. You can then scale tall arrays and reduce map data to additional resources using MATLAB Parallel Server on traditional clusters or Apache Spark™ and Hadoop® clusters. Distributed arrays can also be prototyped on desktops and scaled with MATLAB Parallel Server.

  • Processing big data with MATLAB
  • Big data and analytics with MATLAB
  • Parallel processing in MATLAB
What is parallel processing?
What is parallel processing?

Speeding Up Simulink Simulations

With Parallel Computing Toolbox, you can easily run multiple Simulink simulations simultaneously on multiple CPU cores. Easily execute a model with different inputs or parameter settings for Monte Carlo analyses, parameter sweeps, model testing, design of experiments, and model optimization.

  • Run multiple simulations in parallel

Use the parsim function to run simulations in parallel. This function distributes simulations across multicore CPUs to accelerate overall simulation time. Parsim automates the creation of parallel pools, identifies file dependencies, and manages build artifacts, allowing you to focus on your design tasks. Parallel simulations can be executed interactively or in batch mode.

Simulation Manager

Simulation Manager integrates with parsim and can be used to monitor and visualize multiple simulations in a single window. You can select an individual simulation, view its details, and use the Simulation Data Inspector to review simulation results. Diagnostic tasks can also be performed, or simulations canceled.

  • Monitor multiple simulations in one window with Simulation Manager

Utilize Parallel-Enabled Simulink Features

In addition to using parsim and batchsim for running Simulink simulations, several Simulink products, including Simulink Design Optimization™, Reinforcement Learning Toolbox™, Simulink Test™, and Simulink Coverage™, offer parallel capabilities, allowing simulations to run in parallel without writing any code.

Parallel Computing in Clusters and Clouds

Prototype and debug applications on desktops or virtual desktops and scale them to clusters or clouds without recoding. Develop interactively and move to production with batch workflows.

Matlab
Matlab
  • Run a MATLAB desktop in public and private clouds

Accelerate analysis and simulations by leveraging multiple high-performance CPU and GPU devices. Run MATLAB and Simulink directly on virtual machines in Amazon Web Services® (AWS) or Microsoft Azure® environments.

  • Enhance deep learning applications by training neural networks in MATLAB Deep Learning Containers on NVIDIA GPU Cloud or NVIDIA DGX.
  • Scale to clusters with MATLAB Parallel Server

Prototype on your desktop and scale to a computing cluster or clouds without recoding. Simply switch your cluster profile from desktop to various execution environments.