Julia on M1 Macs

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?

It depends a bit on how adventurous you want to be. Rosetta is probably more stable, but native will have higher performance. If you’re new to Julia and/or just want something that will work, use rosetta. If you don’t mind the possibility of losing an hour or two now and then to bug-hunting in Julia itself, use native.

2 Likes

Any clue about this issue with jl_n_threads loading the julia library? Juliacall on Apple M1 · Issue #175 · cjdoris/PythonCall.jl · GitHub ?

1 Like

Not a recommendation, but I personally mostly use the native version since julia 1.8-rc1 was released, although I do have the rosetta version installed as well. (I use one script to run computations and save results, and another script to make plots, and I used to have to do the plotting with rosetta, but not anymore.)

1 Like