Issue 179691
Summary libomp fails to initialize multiple PLACES as per OMP spec
Labels new issue
Assignees
Reporter kot-begemot-uk
    LibOMP fails to initialise if multiple PLACES are configured as per OMP spec: https://www.openmp.org/spec-html/5.0/openmpse53.html

How to reproduce:

Testing on a system with 8 cores, 16 logical CPUs (for smaller - adjust the numbers).

OMP_PLACES="{0:4},{4:4}"

As per the OMP spec this should configure two PLACES (cpu resource sets) with the following CPUs 0, 1, 2, 3 for place 0 and 4, 5, 6, 7 for place 1. 

OMP_DISPLAY_ENVIRONMENT output:

```
OPENMP DISPLAY ENVIRONMENT BEGIN
   _OPENMP='201611'
  [host] OMP_AFFINITY_FORMAT='OMP: pid %P tid %i thread %n bound to OS proc set {%A}'
  [host] OMP_ALLOCATOR='omp_default_mem_alloc'
  [host] OMP_CANCELLATION='FALSE'
 [host] OMP_DEFAULT_DEVICE='0'
  [host] OMP_DISPLAY_AFFINITY='FALSE'
 [host] OMP_DISPLAY_ENV='TRUE'
  [host] OMP_DYNAMIC='FALSE'
  [host] OMP_MAX_ACTIVE_LEVELS='1'
  [host] OMP_MAX_TASK_PRIORITY='0'
  [host] OMP_NESTED: deprecated; max-active-levels-var=1
  [host] OMP_NUM_TEAMS='0'
 [host] OMP_NUM_THREADS='8'
  [host] OMP_PLACES='{0:4},{4:4}'
  [host] OMP_PROC_BIND='spread'
  [host] OMP_SCHEDULE='static'
  [host] OMP_STACKSIZE='8M'
  [host] OMP_TARGET_OFFLOAD=DEFAULT
  [host] OMP_TEAMS_THREAD_LIMIT='0'
  [host] OMP_THREAD_LIMIT='2147483647'
  [host] OMP_TOOL='enabled'
  [host] OMP_TOOL_LIBRARIES: value is not defined
 [host] OMP_TOOL_VERBOSE_INIT: value is not defined
  [host] OMP_WAIT_POLICY='PASSIVE'
OPENMP DISPLAY ENVIRONMENT END
```
However, it displays an error: 

`OMP: Warning #124: Ignoring invalid OS proc ID 4.
`
The second place is not configured and CPUs 4-7 are not included.

Ditto for other variants of configuring more than one place shown in the OMP specification.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to