Muscat.Helpers.CPU module

CheckIntegrity(GUI: bool = False) str[source]
class ComputingCores(nbCoresRequested: int | int64 = -1, WithError: bool = True)[source]

Bases: object

Class to help doing multithreading without using to many cpu

coresAvailable = 1
GetNumberOfAvailableCores() int64[source]

Function to discover the number of computing cores available. the value of the number of core available is stored in the environment variable ‘SLURM_JOB_CPU_PER_NODE’

SetNumberOfThreadsPerInstance(nbThreads: int64) None[source]

Function to enforce the number of threads for various multithreaded libraries. This function should be called before importing these multithreaded libraries.