Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

Using the Generic Scheduler Interface

Introduction

This section discusses programming parallel jobs using the generic scheduler interface. This interface lets you execute jobs on your cluster with any scheduler you might have.

The principles of using the generic scheduler interface for parallel jobs are the same as those for distributed jobs. The overview of the concepts and details of submit and decode functions for distributed jobs are discussed fully in Using the Generic Scheduler Interface in the chapter on Programming Distributed Jobs.

Coding in the Client

Configuring the Scheduler Object

Coding a parallel job for a generic scheduler involves the same procedure as coding a distributed job.

  1. Create an object representing your scheduler with findResource.

  2. Set the appropriate properties on the scheduler object if they are not defined in the configuration. Because the scheduler itself is often common to many users and applications, it is probably best to use a configuration for programming these properties. See Programming with User Configurations.

    Among the properties required for a parallel job is ParallelSubmitFcn. The toolbox comes with several submit functions for various schedulers and platforms; see the following section, Supplied Submit and Decode Functions.

  3. Use createParallelJob to create a parallel job object for your scheduler.

  4. Create a task, run the job, and retrieve the results as usual.

Supplied Submit and Decode Functions

There are several submit and decode functions provided with the toolbox for your use with the generic scheduler interface. These files are in the directory

matlabroot/toolbox/distcomp/examples/integration

In this directory are subdirectories for each of several types of scheduler, containing wrappers, submit functions, and decode functions for distributed and parallel jobs. For example, the directory matlabroot/toolbox/distcomp/examples/integration/pbs contains the following files for use with a PBS scheduler:

FilenameDescription
pbsSubmitFcn.mSubmit function for a distributed job
pbsDecodeFunc.mDecode function for a distributed job
pbsParallelSubmitFcn.mSubmit function for a parallel job
pbsParallelDecode.mDecode function for a parallel job
pbsWrapper.shScript that is submitted to PBS to start workers that evaluate the tasks of a distributed job
pbsParallelWrapper.shScript that is submitted to PBS to start labs that evaluate the tasks of a parallel job

Depending on your network and cluster configuration, you might need to modify these files before they will work in your situation. Ask your system administrator for help.

At the time of publication, there are directories for PBS schedulers (pbs), Platform LSF schedulers (lsf), generic UNIX-based scripts (ssh), Sun Grid Engine (sge), and mpiexec on Microsoft Windows operating systems (winmpiexec). In addition, the pbs and lsf directories have subdirectories called nonshared, which contain scripts for use when there is a nonshared file system between the client and cluster computers. Each of these subdirectories contains a file called README, which provides instruction on how to use its scripts.

As more files or solutions might become available at any time, visit the Support page for this product on the MathWorks Web site at http://www.mathworks.com/support/product/product.html?product=DM. This page also provides contact information in case you have any questions.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS