Skip to content

CI Make no-OpenMP build fail with unprotected cimport openmp #25391

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 7 commits into from
Jan 13, 2023
Merged
6 changes: 6 additions & 0 deletions build_tools/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ scikit_learn_install() {
# Without openmp, we use the system clang. Here we use /usr/bin/ar
# instead because llvm-ar errors
export AR=/usr/bin/ar
# Make sure omp.h is not present in the conda environment, so that
# using an unprotected "cimport openmp" will make this build fail. At
# the time of writing (2023-01-13), on OSX, blas (mkl or openblas)
# brings in openmp so that you end up having the omp.h include inside
# the conda environment.
find $CONDA_PREFIX -name omp.h -delete -print
fi

if [[ "$UNAMESTR" == "Linux" ]]; then
Expand Down