Environment Variables (GNU libgomp) (original) (raw)
Next: Enabling OpenACC, Previous: OpenMP Runtime Library Routines, Up: Introduction [Contents][Index]
4 OpenMP Environment Variables ¶
The environment variables which beginning with OMP_
are defined by section 4 of the OpenMP specification in version 4.5 or in a later version of the specification, while those beginning with GOMP_
are GNU extensions. Most OMP_
environment variables have an associated internal control variable (ICV).
For any OpenMP environment variable that sets an ICV and is neitherOMP_DEFAULT_DEVICE
nor has global ICV scope, associated device-specific environment variables exist. For them, the environment variable without suffix affects the host. The suffix _DEV_
followed by a non-negative device number less that the number of available devices sets the ICV for the corresponding device. The suffix _DEV
sets the ICV of all non-host devices for which a device-specific corresponding environment variable has not been set while the _ALL
suffix sets the ICV of all host and non-host devices for which a more specific corresponding environment variable is not set.
- OMP_ALLOCATOR – Set the default allocator
- OMP_AFFINITY_FORMAT – Set the format string used for affinity display
- OMP_CANCELLATION – Set whether cancellation is activated
- OMP_DISPLAY_AFFINITY – Display thread affinity information
- OMP_DISPLAY_ENV – Show OpenMP version and environment variables
- OMP_DEFAULT_DEVICE – Set the device used in target regions
- OMP_DYNAMIC – Dynamic adjustment of threads
- OMP_MAX_ACTIVE_LEVELS – Set the maximum number of nested parallel regions
- OMP_MAX_TASK_PRIORITY – Set the maximum priority
- OMP_NESTED – Nested parallel regions
- OMP_NUM_TEAMS – Specifies the number of teams to use by teams region
- OMP_NUM_THREADS – Specifies the number of threads to use
- OMP_PROC_BIND – Whether threads may be moved between CPUs
- OMP_PLACES – Specifies on which CPUs the threads should be placed
- OMP_STACKSIZE – Set default thread stack size
- OMP_SCHEDULE – How threads are scheduled
- OMP_TARGET_OFFLOAD – Controls offloading behavior
- OMP_TEAMS_THREAD_LIMIT – Set the maximum number of threads imposed by teams
- OMP_THREAD_LIMIT – Set the maximum number of threads
- OMP_WAIT_POLICY – How waiting threads are handled
- GOMP_CPU_AFFINITY – Bind threads to specific CPUs
- GOMP_DEBUG – Enable debugging output
- GOMP_STACKSIZE – Set default thread stack size
- GOMP_SPINCOUNT – Set the busy-wait spin count
- GOMP_RTEMS_THREAD_POOLS – Set the RTEMS specific thread pools