Question about Resource Allocation in MATLAB
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I use confidential data available through a secure server and have been repeatedly encountering the following issue related to the early termination of a Matlab program/M file:
"PBS: job killed: cpus 34.1 exceeded limit 30 (burst)"
If I were to increase the number of CPUs to 40 or even 50, the M file would run for a while (20 minutes or so), and the job would then be killed off with the same message displayed.
The issue is not caused by errors in the M file itself, as the same program runs to completion in about 3-4 hours on my own Mac laptop with only 2 CPUs (when the program is tested on fake/simulated data). The issue (as I perceive it) seems to be caused by insufficient/incorrect resource allocation. However, this justification seems rather surprising as I previously thought that MATLAB is supposed to ``know" the number of available cores. I would really appreciate any suggestions/thoughts on how to get the M file running to completion.
As an addition clarification, I have run into issues with MATLAB though the server before, but in that case, I just requested 3 or 4 CPUs (as opposed to just 1 CPU). Maybe this particular case is different because the program (which searches for all the local maximums of a specific function) is more "computationally intensive"? It certainly has multiple nested for loops.
5 Kommentare
Walter Roberson
am 27 Jun. 2019
It might be worth asking for max comp threads of say 32 with qsub cpu count of 40. That will give a hint of whether the thread control is having any effect.
I am not clear on whether you are using parpool?
Antworten (1)
Sherry Wu
am 27 Jun. 2019
1 Kommentar
Walter Roberson
am 28 Jun. 2019
(for some patterns of computation) "If you have sufficiently large vectorized mathematics, then MATLAB will delegate the work to the third-party LAPACK library which will create one thread for each hardware core, except that it is also limited by maxnumCompThreads."
parpool together with parfor or spmd or batch or parfeval are part of the Parallel Computing Toolbox, and provide for explicit parallelization. It is common that explicit parallelization turns out worse than implicit parallelization (by way of LAPACK), but there are some kinds of algorithms for which explicit parallelization works well.
Siehe auch
Kategorien
Mehr zu Parallel Computing Fundamentals finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!