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.

Distributed Arrays

Analyze big data sets in parallel using distributed arrays and simultaneous execution.

Parallel Computing Toolbox™ supports distributed arrays to partition large arrays across multiple MATLAB® workers. Simultaneous execution is supported by the single program multiple data (spmd) language construct to facilitate communication between workers. You can use distributed arrays in Parallel Computing Toolbox to run big data applications using the combined memory of your cluster.


expand all

distributedCreate distributed array from data in client workspace
gatherTransfer distributed array or gpuArray to local workspace
spmdExecute code in parallel on workers of parallel pool
CompositeCreate Composite object
parallel.pool.ConstantBuild parallel.pool.Constant from data or function handle
codistributedCreate codistributed array from replicated local data
parpoolCreate parallel pool on cluster
delete (Pool)Shut down parallel pool
redistributeRedistribute codistributed array with another distribution scheme
codistributed.buildCreate codistributed array from distributed data
forfor-loop over distributed range
getLocalPartLocal portion of codistributed array
globalIndicesGlobal indices for local part of codistributed array
gopGlobal operation across all workers
writeWrite distributed data to an output location


expand all

distributedAccess elements of distributed arrays from client
codistributedAccess elements of arrays distributed among workers in parallel pool
CompositeAccess nondistributed variables on multiple workers from client
codistributor1d1-D distribution scheme for codistributed array
codistributor2dbc2-D block-cyclic distribution scheme for codistributed array
parallel.PoolAccess parallel pool

Examples and How To

Distributing Arrays

Use datastore or distributed to create distributed arrays and partition the data among your workers

Using MATLAB Functions on Distributed Arrays

MATLAB functions that operate on codistributed arrays

Run Single Programs on Multiple Data Sets

Use spmd statements to run the same code on multiple datasets and control codistributed arrays

Access Worker Variables with Composites

Composite objects in the MATLAB client session let you directly access data values on the workers.


Run Code on Parallel Pools

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

Specify Your Parallel Preferences

Specify your preferences, and automatically create a parallel pool.

Nondistributed Versus Distributed Arrays

Describes the various types of arrays used in communicating jobs, including pmode

Working with Codistributed Arrays

Describes how to use codistributed arrays for calculation

Looping Over a Distributed Range (for-drange)

Describes how to program a for-loop with codistributed arrays

Was this topic helpful?