Skip to content

MNT Fix build when SKLEARN_OPENMP_PARALLELISM_ENABLED=False #24682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 19, 2022

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Oct 17, 2022

The Pyodide build fails on the main branch, see in lesteve/scikit-learn-tests-pyodide#2 (comment)

This is using the recommendation from https://scikit-learn.org/dev/developers/performance.html#using-openmp to protect openmp usage when it is disabled by setting SKLEARN_OPENMP_PARALLELISM_ENABLED=False

@lesteve
Copy link
Member Author

lesteve commented Oct 18, 2022

One thing I don't quite understand is that the "no OpenMP" build did not fail to compile with an unprotected cimport openmp in main. The unprotected cimport openmp was added in #23865.

For some reason it seems like build_tools/azure/pylatest_conda_mkl_no_openmp_osx-64_conda.lock actually has Intel OpenMP for some reason:

❯ ag openmp build_tools/azure/pylatest_conda_mkl_no_openmp_osx-64_conda.lock 
9:https://repo.anaconda.com/pkgs/main/osx-64/intel-openmp-2021.4.0-hecd8cb5_3538.conda#65e79d0ffef79cbb8ebd3c71e74eb50a
15:https://repo.anaconda.com/pkgs/main/osx-64/llvm-openmp-14.0.6-h0dcd299_0.conda#b5804d32b87dc61ca94561ade33d5f2d

@lesteve
Copy link
Member Author

lesteve commented Oct 18, 2022

The "no OpenMP" build passed, the "Linux py38_conda_defaults_openblas" was a spurious one, triggering CI again to get it green.

@lesteve
Copy link
Member Author

lesteve commented Oct 18, 2022

Looking at why we get OpenMP in the "no OpenMP" build:

@lesteve
Copy link
Member Author

lesteve commented Oct 18, 2022

The Linux py38 conda defaults openblas build issue is actually a genuine one. It is tracked in #24687

@lesteve
Copy link
Member Author

lesteve commented Oct 18, 2022

I created #24694 to track the fact that the "no OpenMP" build actually has OpenMP.

@glemaitre glemaitre merged commit d7af20c into scikit-learn:main Oct 19, 2022
@glemaitre
Copy link
Member

LGTM. Thanks @lesteve

@lesteve lesteve deleted the fix-pyodide-build branch October 19, 2022 13:14
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Oct 31, 2022
…-learn#24682)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants