Issue
mytest.py
:
import time
import numpy
time.sleep(1000)
print(1)
Excute it and check threads with:
ps -eaf -T | grep mytest
And 24 lines show up.
But if I remove import numpy
, only one line remains.
Solution
Threads are created by math libraries used by numpy, eg. MKL, BLAS, openMP.
See:
https://numpy.org/devdocs/reference/global_state.html
https://github.com/numpy/numpy/issues/11826
Answered By - PaleNeutron
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.