I've got a program that uses scipy.integrate.quad(). When I use it I noticed that it uses all the cores on my PC, which I don't want as I want to run this script in parallel on multiple cores. Is there any way to restrict the function?
I have already tried limiting it with this command before import scipy and numpy:
import os
import sys
os.environ.update(
OMP_NUM_THREADS='1',
OPENBLAS_NUM_THREADS='1',
NUMEXPR_NUM_THREADS='1',
MKL_NUM_THREADS='1',
)
Unfortunately that didn't help either. Are there other things I could try? My scipy uses openblas in case that is relevant too.