...
To save a profile, with your configuration ....
Serial Jobs
Use the batch command to submit asynchronous jobs to the cluster. The batch command will return a job object which is used to access the output of the submitted job. See the MATLAB documentation for more help on batch.
>> % Get a handle to the cluster
>> c = parcluster;
>> % Submit job to query where MATLAB is running on the cluster
>> j = c.batch(@pwd, 1, {});
>> % Query job for state
>> j.State
>> % If state is finished, fetch results
>> j.fetchOutputs{:}
>> % Delete the job after results are no longer needed
>> j.delete
To retrieve a list of currently running or completed jobs, call parcluster to retrieve the cluster object. The cluster object stores an array of jobs that were run, are running, or are queued to run. This allows us to fetch the results of completed jobs. Retrieve and view the list of jobs as shown below.
>> c = parcluster;
>> jobs = c.Jobs
Once we’ve identified the job we want, we can retrieve the results as we’ve done previously.
fetchOutputs is used to retrieve function output arguments; if using batch with a script, use load instead. Data that has been written to files on the cluster needs be retrieved directly from the file system.
To view results of a previously completed job:
>> % Get a handle on job with ID 2
>> j2 = c.Jobs(2);
NOTE: You can view a list of your jobs, as well as their IDs, using the above c.Jobs command.
>> % Fetch results for job with ID 2
>> j2.fetchOutputs{:}
>> % If the job produces an error view the error log file
>> c.getDebugLog(j.Tasks(1))
Parallel Jobs
Debugging
To learn More
...