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

macos cross-compilation #474

Closed
wants to merge 4 commits into from
Closed

Conversation

mgovers
Copy link
Member

@mgovers mgovers commented Jan 19, 2024

May fix #466 .

We can only test this after attempting to build

Signed-off-by: Martijn Govers <[email protected]>
@mgovers mgovers added the feature New feature or request label Jan 19, 2024
@mgovers mgovers self-assigned this Jan 19, 2024
@TonyXiang8787
Copy link
Member

TonyXiang8787 commented Jan 19, 2024

@mgovers what do you want to achieve here? We cannot test macOS on arm (only cross compile) in GitHub Actions. They don't have a public M1 runner. The M1 runner large is a paid service for commercial use.

Can we just ask Jean to run the pytest in his laptop?

Signed-off-by: Martijn Govers <[email protected]>
@mgovers
Copy link
Member Author

mgovers commented Jan 19, 2024

@mgovers what do you want to achieve here? We cannot test macOS on arm (only cross compile) in GitHub Actions. They don't have a public M1 runner.

Can we just ask Jean to run the pytest in his laptop?

they should have it now according to https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/ but it doesn't seem to work correctly yet

In addition, we should be able to cross-compile for macos with both x86_64 and arm64 architecture according to https://cibuildwheel.readthedocs.io/en/stable/faq/#arm64

I'm just trying it out now

@mgovers
Copy link
Member Author

mgovers commented Jan 19, 2024

@mgovers what do you want to achieve here? We cannot test macOS on arm (only cross compile) in GitHub Actions. They don't have a public M1 runner. The M1 runner large is a paid service for commercial use.

Can we just ask Jean to run the pytest in his laptop?

i will but i've already found out yesterday that he receives all zeros as output from the PGM, which is why i strongly suspect different architectures to be the issue

@TonyXiang8787
Copy link
Member

@mgovers what do you want to achieve here? We cannot test macOS on arm (only cross compile) in GitHub Actions. They don't have a public M1 runner.
Can we just ask Jean to run the pytest in his laptop?

they should have it now according to https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/ but it doesn't seem to work correctly yet

In addition, we should be able to cross-compile for macos with both x86_64 and arm64 architecture according to https://cibuildwheel.readthedocs.io/en/stable/faq/#arm64

I'm just trying it out now

The M1 runner in GitHub Actions is a paid service even for open-source project.

We already do the cross compilation for a long time. In the macOS build using Intel Mac runner, we build and test x64, and build arm64 but not test it.

@mgovers
Copy link
Member Author

mgovers commented Jan 19, 2024

@mgovers what do you want to achieve here? We cannot test macOS on arm (only cross compile) in GitHub Actions. They don't have a public M1 runner.
Can we just ask Jean to run the pytest in his laptop?

they should have it now according to https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/ but it doesn't seem to work correctly yet
In addition, we should be able to cross-compile for macos with both x86_64 and arm64 architecture according to https://cibuildwheel.readthedocs.io/en/stable/faq/#arm64
I'm just trying it out now

The M1 runner in GitHub Actions is a paid service even for open-source project.

Ah ok, that explains.

We already do the cross compilation for a long time. In the macOS build using Intel Mac runner, we build and test x64, and build arm64 but not test it.

i see now from the pyproject.toml indeed. Well, one way or another, everything looks like it's borked for M1 processors after this change: https://github.com/PowerGridModel/power-grid-model/compare/v1.6.21..v1.6.22 .

@TonyXiang8787
Copy link
Member

We already do the cross compilation for a long time. In the macOS build using Intel Mac runner, we build and test x64, and build arm64 but not test it.

i see now from the pyproject.toml indeed. Well, one way or another, everything looks like it's borked for M1 processors after this change: https://github.com/PowerGridModel/power-grid-model/compare/v1.6.21..v1.6.22 .

@Thijss Also have run pytest in his M3 macOS. It seems everything runs okay. @Thijss can you comment on that?

@Thijss
Copy link
Contributor

Thijss commented Jan 19, 2024

pytest result on M3 MacOS on PGM 1.6.53:

Screenshot 2024-01-19 at 09 06 07

@Thijss
Copy link
Contributor

Thijss commented Jan 19, 2024

which is somewhat different from 1.6.52:

Screenshot 2024-01-19 at 09 07 27

Here I did git checkout v1.6.52 and pip install power-grid-model==1.6.52

@TonyXiang8787
Copy link
Member

pytest result on M3 MacOS on PGM 1.6.53:

Screenshot 2024-01-19 at 09 06 07

The xfail is expected. We have validation test for Newton-Raphshon state estimation. But the core is not ready yet.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@Thijss
Copy link
Contributor

Thijss commented Jan 19, 2024

The M1 runner in GitHub Actions is a paid service even for open-source project.

The python project has the same issue:

https://discuss.python.org/t/whats-holding-back-m1s-from-being-a-tier-1-platform/39065

@mgovers
Copy link
Member Author

mgovers commented Jan 19, 2024

unit tests + validation tests pass on Jean's MacBook. Closing this PR

@mgovers mgovers closed this Jan 19, 2024
@TonyXiang8787 TonyXiang8787 deleted the feature/macos-cross-compilation branch January 19, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] ValueErrors on MacBook on >=v1.6.22
3 participants