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

조회 수: 6 (최근 30일)
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?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2024년 11월 15일 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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by