フィルターのクリア

smpd assigning to workers with labindex

2 ビュー (過去 30 日間)
Knut Jørgen
Knut Jørgen 2020 年 6 月 17 日
コメント済み: Knut Jørgen 2020 年 6 月 19 日
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 件のコメント
Edric Ellis
Edric Ellis 2020 年 6 月 18 日
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?
Knut Jørgen
Knut Jørgen 2020 年 6 月 19 日
The code look like this and it load data from freesurfer.
for i=1:n
system(run mplus on each collum)
end

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Parallel Server についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by