![]() |
The Quantum Exact Simulation Toolkit v4.3.0
|
Constants and environment variables for controlling QuEST execution. More...
Variables | |
| const qreal | QUEST_DEFAULT_NUM_GPU_THREADS_PER_BLOCK = 0 |
| const qreal | QUEST_DEFAULT_VALIDATION_EPSILON = 0 |
| const int | QUEST_PERMIT_NODES_TO_SHARE_GPU = 0 |
Constants and environment variables for controlling QuEST execution.
| const qreal QUEST_DEFAULT_NUM_GPU_THREADS_PER_BLOCK = 0 |
Specifies the default number of threads per block (or "block dimension") used by GPU acceleration.
The number of dispatched CUDA threads per block controls the parallelisation granularity of QuEST's GPU backend, affecting performance. Specifying QUEST_DEFAULT_NUM_GPU_THREADS_PER_BLOCK to a valid, positive integer overrides QuEST's default otherwise set during compilation via a CMake option of the same name. If that CMake option was not set, the default is assumed to be 128.
The number specified by this environment variable will be used as the block dimension by all of QuEST's GPU backend functions, unless overridden at runtime via setQuESTNumGpuThreadsPerBlock(). The actual number of threads per block used at any time can be queried via getQuESTNumGpuThreadsPerBlock(), or reported by reportQuESTEnv().
128: '', , (unspecified)x: x, 'x', '+x' int.| const qreal QUEST_DEFAULT_VALIDATION_EPSILON = 0 |
Specifies the default validation epsilon.
Specifying QUEST_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 setQuESTValidationEpsilon(), in which case it can be restored to that specified by this environment variable using setQuESTValidationEpsilonToDefault().
QUEST_DEFAULT_VALIDATION_EPSILON=0 disables numerical validation, as if the value were instead infinity.QUEST_DEFAULT_VALIDATION_EPSILON='' is equivalent to not specifying the variable, adopting instead the precision-specific default above.QUEST_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.0 or positive.qreal, which is specific to its precision.| const int QUEST_PERMIT_NODES_TO_SHARE_GPU = 0 |
Specifies whether to permit multiple MPI processes to deploy to the same GPU.
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).
0, '0', '', , (unspecified)1, '1' 0 or 1.