Resource Manager

Qaptiva™ Resource Manager is a daemon running on the Qaptiva™ Appliance that manages Qaptiva™ processes, to optimize the execution of these processes and to avoid resource conflicts. The Resource Manager is enabled by default and does not require any user input to optimize the execution of a quantum simulation. This daemon will estimate resources necessary to optimize the execution of any quantum simulation and will ensure enough resources are available on the machine (to avoid resource conflict). The Resource Manager will lock resources and will release them once the simulation done.

If there is not enough resources on a Qaptiva™ Appliance to perform a quantum simulation, the simulation won’t start and a QPUException will be raised.

Note

Since the Resource Manager indicates to the process the optimized number threads to use, some environment variables like OMP_NUM_THREADS have only a tiny impact on the performances of the quantum simulation

Resource estimation

The Resource Manager uses a heuristic to estimate the optimal number of threads for a quantum simulation.

../../../_images/rm-threads.png

Moreover, the Resource Manager will also estimate the memory required to execute a job:

../../../_images/rm-memory.png

For some QPU like Feynman or MPS, Resource Manager can over estimate the amount of memory, leading to job rejection. A parameter can be passed to the constructor of these QPUs to disable the resource manager for these QPUs.

Setting the number of threads

Number of threads used by a quantum simulation can be set if and only if the Resource Manager is disabled. To set the number of threads, environment variable QLM_NUM_THREADS should be set to the right value:

export QLM_NUM_THREADS=10

Disabling Resource Manager

Warning

Disabling Resource Manager will also disable resource fair share and resource estimation. Disabling Resource Manager can cause slowdowns and resource conflicts

Qaptiva™ Resource Manager can be disabled:

  • for a single user: environment variable QLM_RESOURCEMANAGER_CONFIG_FILE_PATH should point to an invalid location:

    export QLM_RESOURCEMANAGER_CONFIG_FILE_PATH=/invalid/path
    
  • for all users: disabling Resource Manager for the whole machine requires root privilege. File /etc/qlm/resourcemanager.conf must be updated:

    [qlm-resourcemanager-client]
    # Disable resource management for all users
    enforce=false