Skip to content
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

Pin llvm-openmp=11 when building wheels for macOS #648

Merged
merged 3 commits into from
Jun 2, 2023
Merged

Conversation

jtilly
Copy link
Member

@jtilly jtilly commented Jun 1, 2023

Closes #628.

I was able to reproduce the issue using the intel-based macOS runner: I'm building the wheel using cibuildwheel and then I'm installing the wheel and running the code snippet from the issue:

jobs:
  macos:
    name: "issue-628"
    runs-on: macos-11
    steps:
      - uses: actions/checkout@v3
      - name: Build wheels
        uses: pypa/cibuildwheel@v2.13.0
        env:
          CIBW_ARCHS_MACOS: x86_64
      - uses: actions/setup-python@v4
        with:
          python-version: '3.9.15'
      - run: |
          pip install ./wheelhouse/*.whl
          python .github/workflows/issue_628.py

This produces:

/Users/runner/work/_temp/d0cacb75-060f-4cd9-9f66-b7d751687330.sh: line 4:  6610 Segmentation fault: 11  python .github/workflows/issue_628.py

When I pin llvm-openmp to version 11 (like scikit-learn), everything runs through (code, output).

@MarcAntoineSchmidtQC
Copy link
Member

Amazing! Thanks Jan.

Copy link
Member

@MarcAntoineSchmidtQC MarcAntoineSchmidtQC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait that the CI finishes but all good from my side.

Copy link
Member

@MarcAntoineSchmidtQC MarcAntoineSchmidtQC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait that the CI finishes but all is good from my side. Not sure how we can make sure this doesn't happen. The wheels are getting tested on the wheel-building architecture, but the problem happens when you install this on a different machine.

@jtilly
Copy link
Member Author

jtilly commented Jun 1, 2023

The wheels are getting tested on the wheel-building architecture, but the problem happens when you install this on a different machine.

I was able to reproduce the issue on the same machine. See https://github.com/Quantco/glum/actions/runs/5145139930/jobs/9262364272#step:5:63. We could add something along these lines to our CI pipeline. Build the wheels, install the wheels, run some code.

@jtilly jtilly merged commit 5206e34 into main Jun 2, 2023
@jtilly jtilly deleted the pin-llvm-openmp branch June 2, 2023 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault with TweedieDistribution log_likelihood
2 participants