How to configure the matlab to use all core and processor of my system ?
2 views (last 30 days)
Show older comments
Arvind Kumar Pathak
on 11 Aug 2017
Edited: John D'Errico
on 11 Aug 2017
Please tell me, how to use all core and processor of my system.
Is there any option in GUI of MATLAB or some type of code i have to write ?
1 Comment
José-Luis
on 11 Aug 2017
It will do so automatically for the functions that support it. As far as I understand it, there are no options to set.
Accepted Answer
John D'Errico
on 11 Aug 2017
Edited: John D'Errico
on 11 Aug 2017
On small problems, there is no gain by wanting to use multiple cores. So if you have code that has many tests, branches, and lots of scalar operations, trying to use multiple cores would be a waste of time, slowing your code down.
MATLAB automatically multi-threads large computations on many operations, where is it seen that would be a throughput gain. So multiply two seriously large matrices, and you will see multiple cores popping up to solve the problem. (If you use a monitor to watch that.) There were times when I have had all the cores running on my machine. The fan kicks on fast then. You need do nothing special, just solve big problems.
Of course, if you have the cash, then you can buy the parallel processing toolbox. That allows you to specify how many cores will be used, but on processes that are inherently parallelizable. So if you can write your problem as lots of identical sub-problems, then you can gain.
Without the parallel TB, the only overt control you have is the function maxNumCompThreads, which will set (or tell you) the maximum number of threads that will be generated automatically.
0 Comments
More Answers (0)
See Also
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!