Skip to Main Content Skip to Search
Product Documentation

RestartWorker - Specify whether to restart MATLAB workers before evaluating job tasks

Description

In some cases, you might want to restart MATLAB on the workers before they evaluate any tasks in a job. This action resets defaults, clears the workspace, frees available memory, and so on.

Characteristics

Usage

Job object

Read-only

After job is submitted

Data type

Logical

Values

Set RestartWorker to true (or logical 1) if you want the job to restart the MATLAB session on any workers before they evaluate their first task for that job. The workers are not reset between tasks of the same job. Set RestartWorker to false (or logical 0) if you do not want MATLAB restarted on any workers. When you perform get on the property, the value returned is logical 1 or logical 0. The default value is 0, which does not restart the workers.

Examples

Create a job and set it so that MATLAB workers are restarted before evaluating tasks in a job.

jm = findResource('scheduler','type','jobmanager', ...
          'name','MyJobManager','LookupURL','JobMgrHost');
j = createJob(jm);
set(j, 'RestartWorker', true)
.
.
.
submit(j)

See Also

Functions

submit

  


Free Parallel Computing Interactive Kit

See how to solve large problems with minimal effort and reduce simulation time.

Get free kit

Trials Available

Try the latest versions of parallel computing products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS