필터 지우기
필터 지우기

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 CenterFile Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by