필터 지우기
필터 지우기

Parallel Computing Toolbox Matlab

조회 수: 2 (최근 30일)
abc abc
abc abc 2016년 4월 1일
댓글: Walter Roberson 2016년 4월 1일
Hi everybody,
i have many matlab files and i wonder if i can use Parallel Computing Toolbox to execute them at the same time ? Is it possible ? How can i do this ?
Many thanks :)

채택된 답변

Walter Roberson
Walter Roberson 2016년 4월 1일
That is going to depend on what they do. Sometimes it would work. For example, you could construct a cell array of function handles, open a pool, use the facility to add the source files to the pool, then enter an spmd block. The spmd bock content would look like
feval(HandlesCell{labindex})
Provided that your pool size was as large as the number of functions to execute.
You might also want to try parfeval for this use.
  댓글 수: 2
abc abc
abc abc 2016년 4월 1일
Thanks, but i'm a beginner in this subject... basically i have three files a.m, b.m and c.m. Is it possible to execute them at the same time ?
Walter Roberson
Walter Roberson 2016년 4월 1일
It depends on what they do.
parpool(3)
spmd
switch labindex
case 1: a() ;
case 2: b() ;
case 3: c() ;
end
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by