questions about distributed jobs with Local Scheduler
조회 수: 1 (최근 30일)
이전 댓글 표시
If using a Local Scheduler,
From Help, one syntax of createTask is
t = createTask(j, F, N, {inputargs})
This task evaluates the function specified by a function handle or function name F, with the given input arguments {inputargs}, returning N output arguments.
1. Can I use createTask to execute a script? This script will generate .mat file to save all the variables I need. Do I have to specify N and {inputargs} here? Can I just use createTask as below and retrieve the .mat file later?
createTask(j, MyScript)
2. Should I specify beforehand the FileDependencies and PathDependencies for worker to find "MyScript" in the step "create jobs"?
3. If there are 7 cores as workers, and I want each worker evaluate one MyScript simultaneously, should I have the following lines?
createTask(j, MyScript01)
createTask(j, MyScript02)
createTask(j, MyScript03)
createTask(j, MyScript04)
createTask(j, MyScript05)
createTask(j, MyScript06)
createTask(j, MyScript07)
4. If there are 7 cores as workers and I have following lines
createTask(j, MyScript01)
createTask(j, MyScript02)
createTask(j, MyScript03)
Does this means only 3 cores are running and other 4 cores are not used?
5. If there are 7 cores as workers and I have following lines
createTask(j, MyScript01)
createTask(j, MyScript02)
createTask(j, MyScript03)
createTask(j, MyScript04)
createTask(j, MyScript05)
createTask(j, MyScript06)
createTask(j, MyScript07)
createTask(j, MyScript08)
createTask(j, MyScript09)
Does this means MyScript08 and MyScript09 will be executed when 01-07 finished? or, Does this means MyScript08 and MyScript09 will never be executed?
댓글 수: 0
답변 (1개)
Walter Roberson
2012년 8월 11일
The argument must be a function handle or array of function handles. It is not possible to take a function handle of a script. It is, however, possible to use (e.g.)
@() scriptname
I think you would have to provide N as 0.
Note: I do not have the toolbox to test whether createTask will accept this.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!