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

Fix detection of osx-arm64 #766

Merged
merged 1 commit into from
Aug 31, 2024
Merged

Fix detection of osx-arm64 #766

merged 1 commit into from
Aug 31, 2024

Conversation

peterjc
Copy link
Contributor

@peterjc peterjc commented Aug 13, 2024

Currently the code assumes all Darwin aka osx aka maxOS machines are Intel 64 bit. With this change pulp will no look for a solver at pulp/solverdir/cbc/osx/arm64/cbc and works correctly on an Apple M3 ARM CPU.

This was tested with the pre-compiled binary extracted from Cbc-arm64-macos14-gcc1330.tar.gz at https://github.com/coin-or/Cbc/actions/runs/10332640644 at the suggestion of one of the cbc maintainers, @tkralphs in conversation on a linked issue here: conda-forge/pulp-feedstock#27 (comment)

$ md5 pulp/solverdir/cbc/osx/arm64/cbc
MD5 (pulp/solverdir/cbc/osx/arm64/cbc) = 6b4b1b8849cac7ed5574166f6a8586d8
$ shasum -a 256 pulp/solverdir/cbc/osx/arm64/cbc
6e3cfc1d1bd5294d61279fb52dd21590653a4da2eb0472b651577ec860f699bb  pulp/solverdir/cbc/osx/arm64/cbc

I am happy to add that exact binary cbc to this pull request which was built from coin-or/Cbc@50c612f (master branch 10 August) which I presume is 2.10.11 plus work since. There have been a couple of newer builds since - I don' know when the next release is planned.

@CLAassistant
Copy link

CLAassistant commented Aug 13, 2024

CLA assistant check
All committers have signed the CLA.

@peterjc
Copy link
Contributor Author

peterjc commented Aug 13, 2024

Cross reference #765

@tkralphs
Copy link
Member

tkralphs commented Aug 13, 2024

To be clear, the master branch has diverged from stable/2.10. Stable version 2.10 is still being patched and there are releases being made on an ad hoc basis. The master branch will hopefully become stable version 3.0 someday, but developer bandwidth is limited. With all that said, there should be no compatibility issues for PuLP, since the command-line interface is the same, only the build system, the API, and the internal structure of the code has changed.

Nevertheless, it is probably better if all platforms use the same version of Cbc and there hasn't been a release of the 2.10 series since arm64 support was added to the release workflow. I can try to get a new release out and then there will be a 2.10.12 binary for arm64 on OSX.

@peterjc
Copy link
Contributor Author

peterjc commented Aug 13, 2024

As an end user (via snakemake), having pulp updated to use pre-compiled cbc 2.10.12 release binaries (including osx-arm64) does sound best.

@peterjc
Copy link
Contributor Author

peterjc commented Aug 22, 2024

Not convinced the CLA is needed for this one line change, but signed now.

@pchtsp pchtsp merged commit 2aa580c into coin-or:master Aug 31, 2024
18 checks passed
@peterjc peterjc deleted the osx_arm64 branch August 31, 2024 15:31
@peterjc
Copy link
Contributor Author

peterjc commented Aug 31, 2024

Thanks

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.

4 participants