How to specify number of threads a matlab session can use
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have read many other 'answers' on this matter, but I am not succeeding.
I have a heavily vectorized code that I want to run, but I want to limit the number of cores that a matlab session can use because I want to run the same code many times at once (using multiple simultaneously running matlab sessions). This should prevent any bottlenecking of cpu power which I expect to increase efficiency.
Anyways, I've tried:
parpool(1)
and
maxNumCompThreads=1
but both fail as task manager indicates that many cores continue to be used.
How do I do this?
1 Kommentar
Antworten (1)
Sean de Wolski
am 5 Nov. 2014
Start MATLAB from the system command prompt with -singleCompThread flag.
Or use the Parallel Computing Toolbox and parfor or spmd to run on multiple MATLAB workers in Parallel.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Parallel Computing Fundamentals finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!