You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked and the c5.24xlarge model has 96 cores. As far as I know OpenBLAS can't handle 96 cores. I suggest you set the environment variable OPENBLAS_NUM_THREADS=64.
Reopening this because increasing NUM_THREADS=128 is not necessarily the best solution either (see the discussion in MacPython/openblas-libs#64).
We could workaround this problem in scikit-learn by limiting the number of threads used in the problematic estimators by parsing the MAX_THREADS value in the openblas build config when openblas is used:
This will probably be fixed once the scipy wheel ships OpenBLAS 0.3.18 that includes OpenMathLib/OpenBLAS#3352. Leaving this scikit-learn issue open in the mean time.
Activity
jeremiedbb commentedon Jul 16, 2021
Do you have a CPU with more than 64 (or 88 I'm not sure) cores ?
jeremiedbb commentedon Jul 16, 2021
I looked and the c5.24xlarge model has 96 cores. As far as I know OpenBLAS can't handle 96 cores. I suggest you set the environment variable
OPENBLAS_NUM_THREADS=64.OnlyDeniko commentedon Jul 16, 2021
It is doesn't help
OnlyDeniko commentedon Jul 16, 2021
What changes when I download scikit-learn from the conda-forge channel, for example?
jeremiedbb commentedon Jul 19, 2021
Hum then I don't know what to do. Anyway it's not a scikit-learn issue but an OpenBLAS issue. You should file an issue there https://github.com/xianyi/OpenBLAS, they'll be more helpfull than us.
OnlyDeniko commentedon Jul 22, 2021
Could you join the conversation? there are questions about scikit-learn, the answers to which I do not know
OpenMathLib/OpenBLAS#3321 (comment)
ogrisel commentedon Jul 28, 2021
This will be fixed by MacPython/openblas-libs#64. In the mean time the best workarounds on machines with more than 64 CPUS are:
n_jobs=64instead ofn_jobs=-1or and/set theOMP_NUM_THREADS=64environment variable depending on the estimator.ogrisel commentedon Aug 20, 2021
Reopening this because increasing
NUM_THREADS=128is not necessarily the best solution either (see the discussion in MacPython/openblas-libs#64).We could workaround this problem in scikit-learn by limiting the number of threads used in the problematic estimators by parsing the
MAX_THREADSvalue in the openblas build config when openblas is used:Credits: OpenMathLib/OpenBLAS#3330 (comment)
This is a bit hackish and will probably brittle to maintain though...
ogrisel commentedon Nov 18, 2021
This will probably be fixed once the scipy wheel ships OpenBLAS 0.3.18 that includes OpenMathLib/OpenBLAS#3352. Leaving this scikit-learn issue open in the mean time.
thomasjpfan commentedon Apr 29, 2022
For reference: SciPy is configured to build with OpenBLAS 0.3.18 on their
mainbranch: https://github.com/scipy/scipy/blob/b74c192aab55422d52589cf0023d9b3bfb5d136b/tools/openblas_support.py#L15 This means OpenBLAS 0.3.18 should at least be shipped with the next major version of SciPy (1.9).lesteve commentedon Jun 19, 2024
Let's close this one following since this should be fixed in scipy 1.9. We can always reopen if I missed something.