ncore_autoset

nrv.backend.ncore_autoset(nmod: bool = True, optim: bool = True, gmsh: bool = True, threshold: float = 20.0, ncore_nojob: int = 0)[source]

Automatically set the number of cores for nmod, optim and gmsh based on the number of available cores and a threshold.

Parameters:
  • nmod (bool, optional) – If True, set nmod core number, by default True

  • optim (bool, optional) – If True, set optim core number, by default True

  • gmsh (bool, optional) – If True, set gmsh core number, by default True

  • threshold (float, optional) – Threshold to determine if a CPU core is available, by default 20.0 (in percent)

  • ncore_nojob (int, optional) – Number of cores preserve from computing with NRV, by default 0