Help me implement SPMD
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have wrote the following random walk script that works well:
clear all; close all; clc;
N = [1:100];
XX = zeros(1,10);
X = randi(10,1);
R = zeros(1,100);
for i = 1:length(R)
R(i) = randi(2,1);
if R(i) == 1
X = X + 1;
if X == 11
X = 1;
end
elseif R(i) == 2
X = X - 1;
if X == 0
X = 10;
end
end
XX(i) = X;
end
scatter(N,XX,'.')
Now, I would like to implement spmd, using two cores, where lab 1 takes care of grid 1:5 and lab 2 takes care of grid 6:10.
I have used spmd previously, but I am having a difficult time implenting it into my criteria. I would appreciate any help, advice, examples to get me started.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Distributed Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!