This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Parallel Computing Fundamentals

Choose a parallel computing solution

Parallel computing can help you to solve big computing problems in different ways. MATLAB® and Parallel Computing Toolbox™ provide an interactive programming environment to help tackle your computing tasks. If your code runs too slowly, you can profile it, vectorize it, and use built-in MATLAB parallel computing support. Then you can try to accelerate your code by using parfor on multiple MATLAB workers in a parallel pool. If you have big data, you can scale up using distributed arrays or datastore. You can also execute a task without waiting for it to complete, using parfeval, so that you can carry on with other tasks. You can use different types of hardware to solve your parallel computing problems, including desktop computers, GPUs, clusters, and clouds.

Functions

expand all

parforExecute for-loop iterations in parallel on workers in parallel pool
parfevalExecute function asynchronously on parallel pool worker
gpuArrayCreate array on GPU
distributedAccess elements of distributed arrays from client
batchRun MATLAB script or function on worker
parpoolCreate parallel pool on cluster
ticBytesStart counting bytes transferred within parallel pool
tocBytesRead how many bytes have been transferred since calling ticBytes

Examples and How To

Choose a Parallel Computing Solution

Discover the most important functionalities offered by MATLAB and Parallel Computing Toolbox to solve your parallel computing problem.

Run MATLAB Functions with Automatic Parallel Support

Take advantage of parallel computing resources without requiring any extra coding.

Interactively Run a Loop in Parallel Using parfor

Convert a slow for-loop into a faster parfor-loop.

Plot During Parameter Sweep with parfor

This example shows how to perform a parameter sweep in parallel and plot progress during parallel computations.

Scale up from Desktop to Cluster

This example shows how to develop your parallel MATLAB® code on your local machine and scale up to a cluster.

Run Batch Parallel Jobs

Use batch to offload work from your MATLAB session to run in the background.

Process Big Data in the Cloud

This example shows how to access a large dataset in the cloud and process it in a cloud cluster using MATLAB capabilities for big data.

Evaluate Functions in the Background Using parfeval

Break out of a loop early and collect results as they become available.

Run MATLAB Functions on a GPU

Hundreds of functions in MATLAB and other toolboxes run automatically on GPU if you supply a gpuArray argument.

Train Network in the Cloud Using Built-in Parallel Support

This example shows how to train a convolutional neural network on CIFAR-10 using MATLAB's built-in support for parallel training.

Concepts

What Is Parallel Computing?

Learn about MATLAB and Parallel Computing Toolbox

Run Code on Parallel Pools

Learn about starting and stopping parallel pools, pool size, and cluster selection.

Glossary

Related Information

Featured Examples