How to configure the matlab to use all core and processor of my system ?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Arvind Kumar Pathak
il 11 Ago 2017
Modificato: John D'Errico
il 11 Ago 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 Commento
José-Luis
il 11 Ago 2017
It will do so automatically for the functions that support it. As far as I understand it, there are no options to set.
Risposta accettata
John D'Errico
il 11 Ago 2017
Modificato: John D'Errico
il 11 Ago 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Entering Commands in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!