multi core full control
5 views (last 30 days)
Sean de Wolski on 18 Apr 2013
With the Parallel Computing Toolbox you have direct access to the MPI library low-level functionality. This enables you to use functions such as labSend to explicitly send something to a worker on a CPU core.
What are you trying to do?
Jason Ross on 18 Apr 2013
Edited: Jason Ross on 18 Apr 2013
MATLAB does not provide control at the core level. That behavior is passed off to the operating system to do with as it pleases.
What MATLAB does is let you have a collection of worker processes, which can be located on the same machine or on a cluster, and then provides a variety of methods to distribute work to those workers.
It sounds like the approach which might appeal most to you is the job/task workflow, where you can create a job (or series of jobs) that will execute in a certain order with certain sub-tasks that need to be executed in a certain manner. You might find within these tasks that other parallel language contstructs like parfor or spmd provide the types of processing you are looking for.
I'd encourage you to read the documentation and review the examples for the Parallel Computing Toolbox, as you already have an outline of your algortithm and when you look at the various commands available, you will likely determine which ones map most closely to the parts of your algorithm and assemble your program from there.
In terms of monitoring your cores, the various commands will return errors and handle the work distribution, and montior the job status, which are the job of the scheduler you are using. The "local" scheduler uses the cores on your local machine, but it's also possible to use compute clusters in the same manner, with little or no modifications to the code that works on "local".
What this means is that it's possible that you don't (and shouldn't) worry about how the frames are split up for processing. You could, for example, do that processing using parfor, and the work will be distributed to the workers by the scheduler. This will mean that your code will be identical on a 4 core machine or a 128 node cluster since you don't really care about the specifics of processing and hand that off to the scheduler to take care of, then move onto the next step in processing.