Simple Batch Processing - MATLAB & Simulink (original) (raw)
Main Content
Offload execution of a function or script to run in a cluster or desktop background
When working interactively in a MATLAB® session, you can offload work to a MATLAB worker session to run as a batch job. The command to perform this job is asynchronous, which means that your client MATLAB session is not blocked, and you can continue your own interactive session while the MATLAB worker is busy evaluating your code. You can also create a pool of workers for your batch job. The workers can run either on the same machine as the client, or if using MATLAB Parallel Server™, on a remote cluster machine.
Functions
batch | Run MATLAB script or function on worker |
---|---|
diary | Display or save Command Window text of batch job |
load | Load workspace variables from batch job |
wait | Wait for job to change state |
delete | Remove job or task object from cluster and memory |
Examples and How To
- Choose Batch Processing Function
Decide which batch programming construct to use to offload work to a cluster. - Run Batch Parallel Jobs
Use batch to offload work from your MATLAB session to run in the background. - Run Batch Job and Access Files from Workers
Run functions as batch jobs and control options, such as accessing files from workers. - Share Code with Workers
Find out how to pass data and code to and from the workers. - Control Random Number Streams on Workers
The random number generation functionsrand
,randi
, andrandn
behave differently for parallel calculations compared to your MATLAB client. - Use batch to Train Multiple Deep Learning Networks (Deep Learning Toolbox)
This example shows how to train multiple networks in batch jobs using a cluster so that you can continue working or close MATLAB® during training. - Monitor Batch Jobs with ValueStore
This example shows how to monitor the progress of a batch job by usingValueStore
. - Monitor Monte Carlo Batch Jobs with ValueStore
This example shows how to monitor a Monte Carlo batch job during execution by usingValueStore
.
Concepts
- Job Monitor
Manage your jobs using the Job Monitor.