OpenMP Implementation-Defined Behaviors
for
OMPi v2.7.0


This document enlists behaviors of the OMPi compiler, which are described as implementation-defined in the OpenMP specifications.

1 Internal Control Variables (ICVs)

Specific ICVs and their initial values are given in the table below. Please notice that OMPi can utilize multiple and different threading libraries, each of which may have its own initial / default values for some of these ICVs; library-specific ICVs are marked by an asterisk (*). Values in the table below refer to the default threading library (pthreads).



ICV name

Initial value





affinity-format-var

"Level: %L, TID: %n/%N, Affinity: %A"



bind-var

false (*)



def-allocator-var

not yet implemented



default-device-var

1 if at least 1 device attached,

0 (host) if none attached



dyn-var

true (*)



max-active-levels-var

no limit (*)



num-procs-var

not yet implemented



nthreads-var

# available cores (*)



place-partition-var

cores if HWLOC is available,

threads (’processors’) if not.



run-sched-var

auto



stacksize-var

OS default value (*)



thread-limit-var

no limit (*)



wait-policy-var

active (*)




(*) threading-library specific.

2 Dynamic Adjustment of Threads

When the dynamic adjustment of threads is disabled and the threading library cannot provide the requested number of threads, the application is aborted with an advice to enable dynamic adjustment either programmatically or using the corresponding environmental variable.

3 Worksharing Loop Directive

4 Sections Construct

Scheduling of the structured section blocks among threads is competitive; threads are assigned section blocks on a first-come first-serve basis.

5 Single Construct

The selection of a thread to execute a structured single block is competitive; the first thread to ask for it, gets to execute it.

6 Distribute construct

If no dist_schedule clause is specified then the iterations are distributed using a static schedule. For a collapsed loop, the variable used to compute the iteration count is of type unsigned long int.

7 Processor

A ‘processor’ is whatever the OS system calls report.

8 Affinity

For the close/spread affinity policies, if T > P and P does not divide T evenly, places/subpartitions 0,1,,(T mod P) - 1 will contain S + 1 threads, while the rest will contain S threads, where S = P∕T.

9 Device-specific behaviors

Devices are the host and any additional attached compute units. The host is always the device with id 0. In this version, OMPi can support the Adapteva Epiphany accelerator as a device.

9.1 The is_device_ptr clause

OMPi only supports pointers returned by the omp_target_alloc() call and pointers specified through the use_device_ptr clause.

9.2 Declare target procedures

For every procedure within a declare target directive, the same version is generated for all currently supported devices.

10 Runtime Routines

11 Environmental Variables