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

 Risposta accettata

Jan
Jan il 26 Set 2011

1 voto

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.

Più risposte (1)

Sinan
Sinan il 26 Set 2011

0 voti

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

Categorie

Scopri di più su MATLAB in Centro assistenza e File Exchange

Richiesto:

il 26 Set 2011

Community Treasure Hunt

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

Start Hunting!

Translated by