Parallel Computing Toolbox

 

Parallel Computing Toolbox

Perform parallel computations on multicore computers, GPUs, and clusters

Video length is 2:30
Plot of faster MATLAB computation using parallel computing for independent tasks.

Speed Up MATLAB with Multicore Computers

Use parfor and other features to execute parallel MATLAB threads or processes for tasks such as parameter sweeps, optimizations, and Monte Carlo simulations. Let MATLAB language features (with Parallel Computing Toolbox) handle resources, file dependencies, and other details—enabling you to focus on your work.

Diagram of GPU.

Accelerate MATLAB with GPUs

You can use NVIDIA® GPUs without having to write any additional code, so you can focus on your applications rather than performance tuning. Key functions in MATLAB, Simulink, and several add-on products, such as Deep Learning Toolbox, have GPU enabled functions. Advanced developers can also create MEX functions containing CUDA code. Use multiple GPUs on desktop, compute clusters, and cloud environments.

Buttons for parallel enablement of Classification Learner App.

Additional Parallel-Enabled MATLAB Functionality

Many features in MATLAB and add-on products have automatic parallel support, and many apps have enabled parallel features. Parallel Computing Toolbox includes an extensive parallel language covering execution models from parallel function execution to data parallelism without needing to recode your algorithm.

parsim function to run your simulations in parallel.

Run Multiple Simulink Simulations in Parallel

Use the parsim function to run your simulations in parallel. The function distributes multiple simulations to multicore CPUs to speed up overall simulation time. parsim also automates the creation of parallel pools, identifies file dependencies, and manages build artifacts, so that you can focus on your design work. You can execute parallel simulations interactively or in batch.

Monitor multiple simulations in one window with Simulation Manager.

Simulation Manager

Simulation manager is integrated with parsim and can be used to monitor and visualize multiple simulations in one window. You can select an individual simulation and view its specifications, as well as use the Simulation Data Inspector to examine simulation results. You can also conveniently run diagnostic tasks or abort simulations.

Parallel simulations enabled by a preference or flag setting in the Parallel Options tab.

Use Parallel-Enabled Simulink Functionality

In addition to using parsim and batchsim functions to run Simulink simulations, there are many add-on products for Simulink, including Simulink Design Optimization, Reinforcement Learning Toolbox, Simulink Test, and Simulink Coverage that provide parallel capability for running simulations in parallel without writing any code.

Diagram of  MATLAB and Simulink running directly on cloud resources.

Run a MATLAB Desktop in Public and Private Clouds

Speed up analysis and simulations by taking advantage of on-demand, high-performance CPU and GPU machines available in the cloud. Run MATLAB and Simulink directly on virtual machines in the Amazon Web Services® (AWS) environment or in Microsoft Azure®.

Two plots that illustrate scaling up your applications with additional cluster and cloud resources without changing your code.

Scale to Clusters with MATLAB Parallel Server

Develop a prototype on your desktop and scale to a compute cluster or clouds without recoding. Access different execution environments from your desktop just by changing your cluster profile. 

Diagram illustrates the concept of memory of multiple machines in a cluster without recoding using distributed arrays.

Use Distributed Arrays on MATLAB Parallel Server

Execute calculations that will not fit in the memory of a single machine without needing to recode your algorithm. Use the many functions that can run automatically as distributed computations when called with a distributed array input. Prototype on your desktop and scale up to additional resources using MATLAB Parallel Server for full-scale execution.

“We used Parallel Computing Toolbox with MATLAB Parallel Server to distribute the work on a 56-processor cluster. This enabled us to rapidly identify an optimal neural network configuration using MATLAB and Deep Learning Toolbox, train the network using data from the transplantation databases, and then run simulations to analyze risk factors and survival rates.”

Parallel Computing Toolbox FAQs

When you need to reduce your time to results by using more of your CPU and GPU resources for compute- and data-intensive problems, Parallel Computing Toolbox gives you functionality to parallelize your workflows. You can take control of your resources without needing to write low-level code for CUDA, openMP, or MPI. Functionality includes: parfor to execute for loops in parallel, parfeval to create parallel queues and pipelines, parsim to execute the Simulink sim command in parallel, and gpuArray to target NVIDIA GPUs without recoding. This complements the implicit parallelism that is built-in to MATLAB’s underlying libraries. Learn more here: <a href="https://www.mathworks.com/help/parallel-computing/what-is-parallel-computing.html">What is parallel computing?</a>

The toolbox is ideal for compute- and data-intensive problems, such as parameter sweeps, optimizations, and Monte Carlo simulations.

You can use NVIDIA GPUs, multicore processors, and computer clusters. To run locally on your desktop requires only Parallel Computing Toolbox. Scaling to computer clusters also requires MATLAB Parallel Server. For details about specific hardware, see <a href="/content/mathworks/www/en/support/requirements/parallel-computing-toolbox.html">Product Requirements & Platform Availability for Parallel Computing Toolbox</a>

No, Parallel Computing Toolbox provides high-level constructs that enable you to parallelize MATLAB applications without needing to write low-level code.

You can use NVIDIA GPUs with minimal changes to your code. More than 1,000 functions in MATLAB and toolboxes run automatically on a GPU if you have Parallel Computing Toolbox and supply a gpuArray data argument. See the current list here: https://www.mathworks.com/help/referencelist.html?type=function&capability=gpuarrays

Yes, you can use the `parsim` function and Parallel Computing Toolbox to distribute multiple simulations to multicore CPUs or compute clusters. The parsim function uses an array of SimulationInput objects to run multiple simulations. Scaling to compute clusters also requires MATLAB Parallel Server.

Yes, many functions in MATLAB and add-on toolboxes have <a href="https://www.mathworks.com/help/parallel-computing/run-matlab-functions-with-automatic-parallel-support.html">automatic parallel support</a>, and many apps have enabled parallel features that you can activate without needing to write any additional code. Custom parallel workflows and applications that you create can leverage nearly all functionality in MATLAB and Toolboxes. For a range of examples showing parallel computing with other MATLAB toolboxes, see <a href="https://www.mathworks.com/help/parallel-computing/applications.html">Applications</a>

Yes, you can develop a prototype on your desktop and scale to a compute cluster with minimal code changes. Scaling to a cluster also requires MATLAB Parallel Server. Parallel Computing Toolbox and MATLAB Parallel Server can both run on-premises or in the cloud.

Try Parallel Computing Toolbox for free

Discover the possibilities today.


Ready to Buy?

Get pricing information and explore related products.

Are You a Student?

Your school may already provide access to MATLAB, Simulink, and add-on products through a campus-wide license.