OMP_PLACES
- An explicit list of places that are described by non-negative numbers
- An abstract name that describes a set of places
where place_list takes one of the following syntax forms:OMP_PLACES syntax >>-OMP_PLACES=--+-place_list-+--------------------------------->< '-place_name-'
place_list syntax: form 1 .-,------------------------------------------------------. V .-!-. | >>---+---+--{--+-lower_bound--:--length--+-----------+-+--}-+-->< | '-: -stride-' | | .-,---. | | V | | '---num-+-------------------------------'
where lower_bound, length, stride, num, num_places, and multiplier are positive integers. The thread number in each place starts with the value that is a multiple of multiplier. The exclusion operator ! excludes the number or place that follows the operator immediately.place_list syntax: form 2 .-!-. >>-+---+--{--lower_bound--:--length--}--:--num_places--:--multiplier-><
place_name syntax .-cores---. >>-+-threads-+--+------------------+--------------------------->< '-(--num_places--)-'
- threads
- Each place contains a hardware thread.
- cores
- Each place contains a core. If OMP_PLACES is not set, the default setting is cores.
- num_places
- Is the number of places.
Usage
When requested places are fewer than that are available on the system, the execution environment assigns places in the order of the place list at run time. When requested places are more than that are available on the system, the execution environment assigns the maximum number of places that the system supports at run time.
For a program that contains both OpenMP and OpenMPI code, the OpenMP runtime detects the existence of OpenMPI code by the presence of the OMPI_COMM_WORLD_RANK environment variable. If you do not set OMP_PLACES explicitly, the compiler sets OMP_PLACES to cores and removes any unavailable resources from OMP_PLACES based on the OpenMPI affinity policy. In addition, OMP_PROC_BIND is set to TRUE.
For examples on how to set the OMP_PLACES environment variable, see examples in OMP_PROC_BIND.