Code covered by the BSD License  

Highlights from
Enhancing e-Infrastructures with Advanced Technical Computing: Parallel MATLAB® on the Grid

Demo3_batchSPMD.m
%%
clear all

%% Submitting a Script that Uses Parfor

job=batch('Demo3_spmd_script','matlabpool',2);

%% Wait and Load Results from Worker's Workspace

wait(job);
load(job);

%% Display retrieved data

display(Y1);
display(Y2);

%% Destroy job

destroy(job);

Contact us at files@mathworks.com