pulp icon indicating copy to clipboard operation
pulp copied to clipboard

Fix detection of osx-arm64

Open peterjc opened this issue 1 year ago • 5 comments

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: https://github.com/conda-forge/pulp-feedstock/issues/27#issuecomment-2285782785

$ 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 https://github.com/coin-or/Cbc/commit/50c612fe9ce5c31f4b0be9dde4cc0b8f7d6e018b (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.

peterjc avatar Aug 13 '24 14:08 peterjc

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 13 '24 14:08 CLAassistant

Cross reference #765

peterjc avatar Aug 13 '24 14:08 peterjc

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.

tkralphs avatar Aug 13 '24 14:08 tkralphs

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 avatar Aug 13 '24 14:08 peterjc

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

peterjc avatar Aug 22 '24 13:08 peterjc

Thanks

peterjc avatar Aug 31 '24 15:08 peterjc