The Quantum Exact Simulation Toolkit v4.2.0
Loading...
Searching...
No Matches

Constants and environment variables for controlling QuEST execution. More...

Variables

const qreal DEFAULT_VALIDATION_EPSILON = 0
 
const int PERMIT_NODES_TO_SHARE_GPU = 0
 

Detailed Description

Constants and environment variables for controlling QuEST execution.

Variable Documentation

◆ DEFAULT_VALIDATION_EPSILON

const qreal DEFAULT_VALIDATION_EPSILON = 0
Note
This entity is actually an environment variable.

Specifies the default validation epsilon.

Specifying DEFAULT_VALIDATION_EPSILON to a positive, real number overrides the precision-specific default (1E-5, 1E-12, 1E-13 for single, double and quadruple precision respectively). The specified epsilon is used by QuEST for numerical validation unless overriden at runtime via setValidationEpsilon(), in which case it can be restored to that specified by this environment variable using setValidationEpsilonToDefault().

Values
  • setting DEFAULT_VALIDATION_EPSILON=0 disables numerical validation, as if the value were instead infinity.
  • setting DEFAULT_VALIDATION_EPSILON='' is equivalent to not specifying the variable, adopting instead the precision-specific default above.
  • setting DEFAULT_VALIDATION_EPSILON=x where x is a positive, valid qreal in any format accepted by C or C++ (e.g. 0.01, 1E-2, +1e-2) will use x as the default validation epsilon.
Constraints
The function initQuESTEnv() will throw a validation error if:
  • The specified epsilon must be 0 or positive.
  • The specified epsilon must not exceed that maximum or minimum value which can be stored in a qreal, which is specific to its precision.
Author
Tyson Jones

Definition at line 78 of file modes.h.

◆ PERMIT_NODES_TO_SHARE_GPU

const int PERMIT_NODES_TO_SHARE_GPU = 0
Note
This entity is actually an environment variable.

Specifies whether to permit multiple MPI processes to deploy to the same GPU.

Attention
This environment variable has no effect when either (or both) of distribution or GPU-acceleration are disabled.

In multi-GPU execution, which combines distribution with GPU-acceleration, it is prudent to assign each GPU to at most one MPI process in order to avoid superfluous slowdown. Hence by default, initQuESTEnv() will forbid assigning multiple MPI processes to the same GPU. This environment variable can be set to 1 to disable this validation, permitting sharing of a single GPU, as is often useful for debugging or unit testing (for example, testing multi-GPU execution when only a single GPU is available).

Warning
Permitting GPU sharing may cause unintended behaviour when additionally using cuQuantum.
Values
  • forbid sharing: 0, '0', '', , (unspecified)
  • permit sharing: 1, '1'
Author
Tyson Jones

Definition at line 48 of file modes.h.