Julia on M1 Macs

Hi,

What is the status of Julia on M1 MacBook Pro? I.e. are there any major compatibility issues/bugs or is it mostly safe to use? Also would there be any performance loss?

Thanks,
Pavan

5 Likes

Julia runs fine on, but for a native build for the new chip there are still some issues tracked in
https://github.com/JuliaLang/julia/issues/36617
it’s getting close

8 Likes

ah – thanks! I hadn’t come across this.
So, it would still need to be installed using Rosetta2?

At this moment, yes.

1 Like

I’m advising a PhD student who is learning Julia on her M1 mac.
No problems so far

6 Likes

Also worth noting is that you can build Julia for Linux Arm from src on a Ubuntu for Arm virtual machine running on Parallels Desktop on the M1. Its performance is actually better than Julia on Rosetta 2 for me.

8 Likes

That’s good to know – thanks!
Do you know if it’s expected that the native install for m1 Macs (when available) will be more performant than on x86?

Presumably

Just got M1 Macbook and all my stuff runs fine. Performance is a bit better with rosetta than on a 2020 Macbook air.

1 Like

You can compile Julia master to run it natively, it takes about 4 minutes, maybe less with a fast Internet connection.

Some packages with binary dependencies won’t work, but we’re slowly getting there, and after the next LTS is announced it’ll improve more quickly.

13 Likes

Is there a way I can get CI with the nightly to run natively on M1? Will adding a line below
- x64 here

arch:
          - x64

in my ci.yml file work? If so, what do I use to replace x64?

I think GitHub actions does not have m1 runners yet: https://github.com/actions/virtual-environments/issues/2187

1 Like

Not exactly the same, but you can run CI on aarch64 Linux with Drone:

or more recent setup:

Of course you aren’t going to catch any bugs specific to aarch64-apple-darwin, but that’s a good starting point.

For example I’m not using Drone in Measurements.jl but doing so would have caught Don't run `ccall` test on platforms that don't allow it by giordano · Pull Request #105 · JuliaPhysics/Measurements.jl · GitHub much earlier and this makes tests pass on aarch64-apple-darwin as well.

5 Likes

Can you please share how she got it on there? I am newbie to both programming and macs

Thanks

She just told me it works

Has anyone run into this problem?

Or found a work around apparently?

Yes, I have. Apparently it will be fixed in 1.8 Segmentation faults on Julia 1.7 M1 · Issue #1722 · fonsp/Pluto.jl · GitHub

1 Like

FWIW 1.8-beta3 works great on my M1. I’d recommend just switching to it now.

5 Likes

1.8-rc1 is out - so anyone following here, please try the latest binaries.

5 Likes

Hello, what is the most common recommendation to use M1 native binary or with Rosseta for research?