smpd assigning to workers with labindex
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have used system(externalporgrema) in my program and can therfore not parfor. How can I assigne fprintf to each work so that I get this function to work.
n=100000
spmd
while i < n+1
i = labindex + k;
fprintf('iteration number %d and k %d, labindex %d \n',labindex+k,k,labindex);
if labindex == prs
k = k +prs;
end
end
end
2 Kommentare
Edric Ellis
am 18 Jun. 2020
There is no fundamental restriction on using system from within a parfor loop. It's not clear what you're trying to parallelise here - what does your serial code look like?
Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Parallel Server finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!