Download presentation
Presentation is loading. Please wait.
Published byCory Lee Modified over 9 years ago
1
Parallel Computing in Matlab An Introduction
2
Overview Offload work from client to workers Run as many as eight workers (newest version) Can keep client session free for interactive work
3
Parallel for-loops (parfor) No iterations may depend on other iterations No global variables may be changed in the parfor loop There is some overhead
4
Using parfor Use “matlabpool open local 2” to open two workers (duo core) Use parfor like a for loop When finished, use matlabpool close See example: Parforloop.m See example: test.m
5
Batch Job Offload work to another session Continue using the client interactively Requires a few more commands than parfor
6
Batch Job job=batch('script_name') wait(job) load(job,'variable_name') destroy(job) See example three
7
Batch Parallel Loop Offload work Run in parallel
8
Batch Parallel Loop job=batch('script_name','matlabpool',1) Here we have one worker in addition to the one running the batch script for a total of two wait(job) load(job,'variable_name') destroy(job)
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.