What happens if I create a parpool with 64 workers even when MATLAB is restricted by OS to just use 16 cores?

6 vues (au cours des 30 derniers jours)
I submitted a job to our internal LSF cluster requesting for a 64-core "xterm" session instance. After my job got processed, I received the requested "xterm" session. I then opened a VNC connection to this session through which I access MATLAB. 
Problem:
When I execute the following command on my MATLAB Command Window, I see that MATLAB is restricted to only use 16 cores:
>> feature('numcores') MATLAB detected: 64 physical cores. MATLAB detected: 128 logical cores. MATLAB was assigned: 16 logical cores by the OS. MATLAB is using: 16 logical cores. MATLAB is not using all logical cores because hyper-threading is enabled. MATLAB is not using all logical cores because Operating System restricted the number of cores to: 16. ans = 16
Questions:
  1. Is there a way to force MATLAB to use all the available cores on the machine?
  2. Can I assume that if I create a "parpool" of 64 workers, they will use all the 64 cores of the machine not just the 16 allocated to MATLAB process?

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 15 Nov 2024 à 0:00
  1. The given output indicates that the OS is restricting MATLAB from using all available cores on the machine. As this is a restriction from the OS, MATLAB cannot control this behavior. However, you can remove any restrictions by updating your environment (docker/ cluster/ scheduler) settings that are restricting the number of cores allocated to a process.
  2. Since the MATLAB process is restricted to use only 16 cores, a "parpool" of 64 workers will only be able to see those 16 cores that are allocated to MATLAB process.

Plus de réponses (0)

Catégories

En savoir plus sur Parallel Computing Fundamentals dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by