MATLAB中进行并行计算
Getting Started with Parallel Computing using
MATLAB: Interactive and Scheduled Applications
Created by S. Zaranek, E. Johnson and A. Chakravarti
1. Objectives
This user guide provides an end user with instructions on how to get started running
parallel MATLAB applications using a desktop computer or a cluster.
2. Assumptions
User has access to MATLAB and Parallel Computing Toolbox on the desktop
computer or head node of the cluster.
If running on a cluster:
MATLAB Distributed Computing Server has been installed by an administrator on
the cluster.
The desktop MATLAB client has been configured to connect to the cluster. If this has
not been done, you should contact the cluster administrator.
3. Getting the Example Files
Unzip the demoFiles.zip file that was provided along with this guide. You can
add the files to the MATLAB path by running the addpath command in
MATLAB.
>> addpath
4. Examples Running Locally
In this section, you will be running and submitting job s using the local
configuration.
If your workflow will ultimately involve submitting jobs to a cluster, you can
follow this section by switching the default configuration from local to that of
your cluster and running these jobs again. This is described in Section 5.
You can set the configuration to local, either at the command-line
>> defaultParallelConfig('local')
or by using the user interface found in the parallel menu. See screen snapshot
below.
For more information on configurations and programming with user
configurations, see:
/access/helpdesk/help/toolbox/distcomp/index.html?/a
ccess/helpdesk/help/toolbox/distcomp/f5-16141.html#f5-16540
1. Using an Interactive MATLAB pool
To interactively run your parallel code, you first need to open a MATLAB pool.
This reserves a col