Hi there, I would like to share
a native macOS port of mumax3! I hope this will be useful to researchers who have an Apple-silicon Mac but do not have local access to an CUDA system.
Repository:
https://github.com/TaewoooPark/mumax3-for-macUpstream pull request:
https://github.com/mumax/3/pull/413This is currently a community-maintained fork, not an official mumax3 release.
On Apple Silicon, the port replaces the CUDA execution layer with Metal compute shaders and an Objective-C++ runtime bridge. MPSGraph provides the R2C/C2R FFT operations, and thermal noise uses Philox4x32-10 with Box–Muller generation. The backend is selected at build time, so the existing CUDA implementation remains available on supported Linux and Windows systems.
And the port does not change the physical equations, material terms, solvers, integration methods, .mx3 language, or output formats.
Validation on a base 10-core-GPU Apple M4 MacBook Air(actually it's my labtop) produced:
- All 15 examples published on the official mumax3 examples page completed successfully.
- 15/15 selected unchanged upstream non-thermal physics tests passed.
- All 103 assertions satisfied the original upstream tolerances.
- The official 4-million-cell benchmark produced a median throughput of 66.02 million cells/s.
The complete inputs, logs, outputs, and validation methodology are available in the repository.
In practical terms,
existing .mx3 can be used on Apple Silicon in the same way as with the CUDA version, including the Web UI and standard OVF and table outputs. The main goal of this port is to enable local development, prototyping, and moderate-scale micromagnetic simulations without an NVIDIA GPU or a remote Linux machine. Modern discrete NVIDIA GPUs will still be preferable for very large meshes or high-throughput parameter sweeps. The current requirements are Apple Silicon (M1 or newer) and macOS 14 or later. Intel Macs are not supported.
The installer checks the prerequisites, builds the Metal backend, configures the executable path, and finishes with mumax3 -test. The full Xcode application and CUDA are not required.
I would especially appreciate test results from other Apple Silicon systems, including M1/M2/M3/M4 Pro, Max, and Ultra systems. Reports involving larger meshes, thermal simulations, or less common physics terms would be particularly useful. Issues and contributions are welcome through the repository, and reviews of the upstream PR would also be greatly appreciated.
I hope this work is helpful. Thank you!
Taewoo Park (ptw1...@kaist.ac.kr)
Undergraduate student at KAIST Physics Department
Research intern at the KAIST USDL led by Prof. Kab-Jin Kim