qimpy.rc.init

init(*, comm_override=None, cores_override=None)

Initialize overall hardware resources to be used by QimPy. Initializes GPU resources

Parameters:
  • comm_override (<MagicMock name='mock.MPI.Comm.__or__()' id='134314058895040'>) – If specified, override qimpy.rc.comm (defaults to mpi4py.MPI.COMM_WORLD).

  • cores_override (int | None) – If specified, override number of CPU cores (torch threads) to use per process. Before init, only a single core will be used by each process. If cores_override is not specified, init will set the thread count based on environment variable SLURM_CPUS_PER_TASK (set by slurm) if available, and if not, it will divide physical cores equally between processes on each node.

Return type:

None