How to limit CPU availabilty to Matlab

When i running Matlab simulation on my Linux PC (20 cores), it consuming all cores, is there any way to limit CPU availability to Matlab (Use only 10 cores).

Antworten (2)

Dhritishman
Dhritishman am 15 Jun. 2022
Bearbeitet: Dhritishman am 15 Jun. 2022

0 Stimmen

LASTN = maxNumCompThreads(N)
sets the maximum number of computational threads to N, and returns the previous maximum number of computational threads, LASTN. N in your case is 10.
You can also use
LASTN = maxNumCompThreads('automatic')
which will set the maximum number of computational threads to the most desirable number according to MATLAB.
You can read more about it here:

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021b

Gefragt:

am 14 Jun. 2022

Bearbeitet:

am 15 Jun. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by