Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
PYTHON_VERSION: "*"
INSTALL_BLAS: "flexiblas"
PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp"
INSTALL_LIBOMP: "conda-forge"

# Linux environments to test that packages that comes with Ubuntu 22.04
# are correctly handled.
Expand Down
33 changes: 30 additions & 3 deletions continuous_integration/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,25 @@ make_conda() {
TO_INSTALL="$2"
if [[ "$UNAMESTR" == "Darwin" ]]; then
if [[ "$INSTALL_LIBOMP" == "conda-forge" ]]; then
# Install an OpenMP-enabled clang/llvm from conda-forge
# assumes conda-forge is set on priority channel
TO_INSTALL="$TO_INSTALL compilers llvm-openmp"
# Install an OpenMP-enabled clang/llvm from conda-forge.
# assumes conda-forge is set on priority channel.
#
# Since conda-forge switched to "minimally activated compilers"
# (see conda-forge/conda-forge-pinning-feedstock#8795), the
# "compilers" metapackage no longer pulls in the clang_osx-*
# activation package that sets CC/CXX/CFLAGS/CPPFLAGS/LDFLAGS
# when the environment is activated. Without it, there is no
# unversioned "clang" binary in $CONDA_PREFIX/bin and the build
# falls back to the system (Apple) clang, which does not support
# -fopenmp. Explicitly install clang_osx-<arch>/clangxx_osx-<arch>
# to restore that activation behavior.
OSX_ARCH=$(uname -m)
if [[ "$OSX_ARCH" == "arm64" ]]; then
OSX_SUBDIR_ARCH="arm64"
else
OSX_SUBDIR_ARCH="64"
fi
TO_INSTALL="$TO_INSTALL compilers llvm-openmp clang_osx-$OSX_SUBDIR_ARCH clangxx_osx-$OSX_SUBDIR_ARCH"

elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then
# Install a compiler with a working openmp
Expand Down Expand Up @@ -55,6 +71,17 @@ make_conda() {

conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL
conda activate testenv

if [[ "$UNAMESTR" == "Darwin" ]]; then
# Debugging info to check which clang ends up being used and how it
# was configured, in particular to detect cases where the system
# (Apple) clang is picked up instead of the conda-forge one.
which clang
clang --version
echo "CC=$CC"
echo "CPPFLAGS=$CPPFLAGS"
echo "LDFLAGS=$LDFLAGS"
fi
}


Expand Down
Loading