why matlab is using all cores when no parallel pool is created
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
Something weird is happening on my matlab code.
I'm using AMD Ryzen Threadripper 2990WX (32 physical cores).
I have parallel computing but there is no parallel thing in my code, so when the code is running, matlab should use single core.
I was running three matlab program with that code with different inputs.
Then, my computer seems too slow so I checked task manager, the matlab processes are using more than 60% of cpu.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1175668/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1175673/image.jpeg)
What's going on here...?
0 commentaires
Réponse acceptée
Steven Lord
le 1 Nov 2022
Many operations in MATLAB, when it would be beneficial to use multiple threads in their computation, are multithreaded even without Parallel Computing Toolbox. Generally this means you're operating on a large enough set of data.
If you wanted MATLAB to not multithread you could start it with the -singleCompThread startup option or call the maxNumCompThreads function. Note that each of these affect computational threads; MATLAB can use non-computational threads (for things like the Desktop or graphics operations) even if you've limited the number of computational threads.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!