Matlab Multi-Core

We just installed R2011a on our linux server, And by default, Matlab is using all the cores for any code we run, Does anyone know how to turn this off?
Thanks

 Réponse acceptée

Jan
Jan le 26 Sep 2011

1 vote

See the command maxnumcompthreads.
[EDITED, 25-Sep-2011 15:42 UTC]:
The warning is not really helpful, because it concerns a future release. TMW explained, that it is always possible, that a thread is starting other threads and that the limitation of core cannot be assured. But removing maxNumCompthreads for this reason is even worse. Running a program on a single core does not mean, that it is the same core all the time. The operating system can distribute the work between several cores. Under Windows you can bind a process to a core and there can be good reasons to do so (there should be equivalent methods under other OS also). But MATLAB is a very heterogenous program and I do not assume that this is really an advantage.

Plus de réponses (1)

Sinan
Sinan le 26 Sep 2011

0 votes

Thanks for the solution
I used two solutions
1) LASTN = maxNumCompThreads(1); But i get a message "Warning: maxNumCompThreads will be removed in a future release. Please remove any instances of this function from your code. "
2) i startup matlb using matlab -singleCompThread
Both solutions work for now,
Thanks

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by