This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
cluster:96 [2011/02/09 14:53] hmeij created |
cluster:96 [2011/02/09 14:55] hmeij |
||
---|---|---|---|
Line 13: | Line 13: | ||
In the examples below the code waits for the results. | In the examples below the code waits for the results. | ||
- | This old way still works: | + | This old way still works for distributed jobs: |
< | < | ||
Line 41: | Line 41: | ||
</ | </ | ||
+ | This old way for parallel jobs does not, not sure why: | ||
+ | < | ||
+ | % start ' | ||
+ | |||
+ | % set up the scheduler and matlab worker environment | ||
+ | %2007a sched = findResource(' | ||
+ | %2007a set(sched, ' | ||
+ | sched = findResource(' | ||
+ | set(sched, ' | ||
+ | set(sched, ' | ||
+ | |||
+ | set(sched, ' | ||
+ | set(sched, ' | ||
+ | set(sched, ' | ||
+ | |||
+ | % specify location for worker output | ||
+ | set(sched, ' | ||
+ | |||
+ | % create job and assign tasks to be done | ||
+ | |||
+ | set(pj, ' | ||
+ | set(pj, ' | ||
+ | |||
+ | % create job and assign tasks to be done | ||
+ | pj = createParallelJob(sched); | ||
+ | T = createTask(pj, | ||
+ | |||
+ | |||
+ | % submit job, wait to finish, get status jobs, gather results | ||
+ | submit(pj) | ||
+ | get(sched) | ||
+ | |||
+ | % you can now exit matlab | ||
+ | % at system prompt type ' | ||
+ | |||
+ | </ | ||
\\ | \\ | ||
**[[cluster: | **[[cluster: |