Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6823e20

Browse files
lestevejeremiedbb
andauthored
CI Make no-OpenMP build fail with unprotected cimport openmp (#25391)
Co-authored-by: Jérémie du Boisberranger <[email protected]>
1 parent 0867da5 commit 6823e20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build_tools/azure/install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ scikit_learn_install() {
104104
# Without openmp, we use the system clang. Here we use /usr/bin/ar
105105
# instead because llvm-ar errors
106106
export AR=/usr/bin/ar
107+
# Make sure omp.h is not present in the conda environment, so that
108+
# using an unprotected "cimport openmp" will make this build fail. At
109+
# the time of writing (2023-01-13), on OSX, blas (mkl or openblas)
110+
# brings in openmp so that you end up having the omp.h include inside
111+
# the conda environment.
112+
find $CONDA_PREFIX -name omp.h -delete -print
107113
fi
108114

109115
if [[ "$UNAMESTR" == "Linux" ]]; then

0 commit comments

Comments
 (0)