Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Industries Academia Support User Community Company

 

Parallel Computing Toolbox 4.0

Product Description

Programming Parallel Applications in MATLAB

Parallel Computing Toolbox provides several high-level programming constructs that let you convert your serial MATLAB code to run in parallel on several workers (MATLAB computational engines that run independently of MATLAB clients). These workers run on your desktop (the toolbox runs up to four workers locally on your desktop) or on a cluster (using MATLAB Distributed Computing Server ). The constructs simplify parallel code development by abstracting away the complexity of managing coordination and distribution of computations and data between a MATLAB client and workers, as well as between workers. By annotating your MATLAB code with keywords such as parfor (parallel for-loops) and spmd (single program multiple data) statements, you can exploit task and data parallelism offered by various sections of your algorithm.

The MATLAB pool and the Parallel Command Window (pmode) support interactive execution, enabling you to test sections of your application before setting up for longer runs or offline execution. These constructs function even in the absence of workers, letting you maintain a single version of your code for both serial and parallel execution.

Implementing Task-Parallel Algorithms

You can parallelize Monte Carlo simulations and other coarse-grained or embarrassingly parallel problems by organizing them into independent tasks (units of work). Parallel for-loops in the toolbox offer one way to distribute tasks across multiple MATLAB workers. Using these loops, you can automatically distribute independent loop iterations to multiple MATLAB workers. The parfor construct manages data and code transfer between the MATLAB client session and the workers. It automatically detects the presence of workers and reverts to serial behavior if none are present.

Using parallel for-loops for a task-parallel application. You can use parallel for-loops in MATLAB scripts and functions and execute them both interactively and offline. Click on image to see enlarged view.

You can also explicitly program tasks either as MATLAB functions or as MATLAB scripts. You can execute the tasks, when specified as functions, by manipulating task and job objects in the toolbox or, when specified as scripts, by using the batch function.

Implementing Data-Parallel Algorithms

For MATLAB algorithms that require large data set processing, Parallel Computing Toolbox provides distributed arrays, parallel functions, and the ability to annotate sections of your code using the spmd keyword for parallel execution on several workers. These parallel constructs handle the inter-worker communication and coordinate parallel computations behind the scenes.

Using distributed arrays, you can allocate matrices of any data type across all workers participating in the parallel computation. Parallel functions let you perform mathematical operations such as indexing, matrix multiplication, decomposition, and transforms directly on distributed arrays. The toolbox also provides more than 150 parallel functions for distributed arrays, including linear algebra routines based on ScaLAPACK.

Programming with spmd statements and distributed arrays. Distributed arrays and parallel algorithms let you create data-parallel MATLAB programs with minimal changes to your code and without programming in MPI. Click on image to see enlarged view.

For explicit, fine-grained control over your parallelization scheme, which also requires explicitly managing inter-worker coordination, Parallel Computing Toolbox functions provide access to message-passing routines based on the MPI standard (MPICH2), including functions for send, receive, broadcast, barrier, and probe operations.

Using the spmd construct, you can designate sections of your code to run in parallel across all workers participating in a parallel computation. During program execution, this construct automatically transfers data and code used within its body to the workers and, once the execution is complete, brings results back to the MATLAB client session. Distributed arrays, parallel functions, and the message-passing functions can be used within the body of the spmd construct. In the absence of workers, MATLAB executes the spmd statements serially.

Contact sales
Free technical kit
Trial software
E-mail this page

Get Pricing and
Licensing Options

Recorded Webinar

Microarray Data Analysis with MATLAB® for Faculty and Academic Researchers