[llvm-bugs] [Bug 43303] New: Multiplication of array with float causes cascade of OpenMP messages and sets process affinity to {0}
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 12 20:04:48 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43303
Bug ID: 43303
Summary: Multiplication of array with float causes cascade of
OpenMP messages and sets process affinity to {0}
Product: OpenMP
Version: unspecified
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: GPhillips at emoneyadvisor.com
CC: llvm-bugs at lists.llvm.org
Not particularly well versed in OpenMP, so please be patient.
System Info:
- OS: CentOS Linux 7
- Processors: 24x Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
Software Info:
- Python 3.7.3
- NumPy 1.16.2
- OpenMP 3.1
This problem is specific to the use of a large NumPy array multiplied by a
float. A simple reproduction can be found below. When an array of shape
(1000000,) is multiplied by a float the process affinity is set to a single
core and no attempt to reset it can restore capacity of libraries to leverage
all cores of the machine. When the multiplication occurs, a cascade of OpenMP
info logs print to the console. I'm not particularly well versed in these
messages, but none seem to obviously indicate that the affinity is set to a
single core. At this point the affinity is effectively {0}. This can be reset
to indicate availability of all cores, but code (otherwise verified) that
utilizes all cores will still continue to use at most 2 cores. I'm at a loss as
to why this happens and can't seem to find any information about preventing
this behavior. Memory is not an issue in this case as the system has 256GB RAM
and the array utilizes < 8MB.
Any help is greatly appreciated.
```python
import numpy as np
from os import sched_getaffinity as aff
aff(0)
{0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23}
arr = np.random.rand(1000000)
arr *= .5
OMP: Info #212: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #210: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11
info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0-23
OMP: Info #156: KMP_AFFINITY: 24 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #179: KMP_AFFINITY: 24 packages x 1 cores/pkg x 1 threads/core
(24 total cores)
OMP: Info #214: KMP_AFFINITY: OS proc to physical thread map:
OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 2
OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 4
OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 6
OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 8
OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 10
OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 12
OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 14
OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 16
OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 18
OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 20
OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 22
OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 24
OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 26
OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 28
OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 30
OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 32
OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 34
OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 36
OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 38
OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 40
OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 42
OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 44
OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 46
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 8822 thread 0 bound to OS proc
set 0
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9374 thread 1 bound to OS proc
set 1
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9375 thread 2 bound to OS proc
set 2
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9376 thread 3 bound to OS proc
set 3
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9377 thread 4 bound to OS proc
set 4
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9378 thread 5 bound to OS proc
set 5
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9380 thread 7 bound to OS proc
set 7
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9379 thread 6 bound to OS proc
set 6
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9381 thread 8 bound to OS proc
set 8
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9383 thread 10 bound to OS proc
set 10
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9382 thread 9 bound to OS proc
set 9
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9384 thread 11 bound to OS proc
set 11
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9385 thread 12 bound to OS proc
set 12
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9386 thread 13 bound to OS proc
set 13
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9387 thread 14 bound to OS proc
set 14
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9388 thread 15 bound to OS proc
set 15
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9389 thread 16 bound to OS proc
set 16
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9390 thread 17 bound to OS proc
set 17
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9391 thread 18 bound to OS proc
set 18
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9392 thread 19 bound to OS proc
set 19
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9394 thread 21 bound to OS proc
set 21
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9393 thread 20 bound to OS proc
set 20
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9395 thread 22 bound to OS proc
set 22
OMP: Info #250: KMP_AFFINITY: pid 8822 tid 9396 thread 23 bound to OS proc
set 23
aff(0)
{0}
````
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190913/3e01ddb9/attachment.html>
More information about the llvm-bugs
mailing list