Can Intel OneAPI run on Apple's M1 chip?

Hi guys,

A quick question, has anyone here with macbook pro or mac with any M1 chip, installed Intel OneAPI ?
If so, can Intel OneAPI compile and run Fortran code correctly?

I am working on a package for win/linux/mac, the computation engine is Fortran.
I am OK with win/linux. But I do not have M1 chip mac to test. But I am curious if Intel OneAPI works on M1 chip.

If OneAPI does not work on M1 chip, then I may just suggest mac using gfortran.

Thank you very much in advance!

I would be very surprised if it did. Intel processors and M1 processors have very different instruction sets, and Intel’s OneAPI is intended to sell Intel chips, not Mac chips. While OneAPI uses LLVM for its intermediate processing, and that is relatively portable among processors, the final output is an “Intel” binary and the compiler and associated codes are Intel binaries.

2 Likes

The Mac M1 can, in my experience, run Mac Intel binaries under emulation.

1 Like

Just tried to install the latest Intel OneAPI base and HPC kits for MacOS on other people’s M1 mac.
It can install sucessfully. But the python part needs to be unselected during installation.

Anyway, just tested, for Intel OneAPI on Ma chip, with -O3 -mach=native or -O3 -xhost, the speed is roughly the same level as gfortran’s -O0. So perhaps OneAPI either cannot optimize for M1 chip or need to use some more specific flags.

1 Like

I expect it is running slowly because the M1 chip is running software to emulate the intel instructions.

At one time, intel was negotiating with apple to supply the ARM chips for phones, tablets, and computers. However, they could not make the chips with a 4nm process, and other suppliers could do so, so apple went with the other suppliers. Those 4nm chips are expected later this year (2022). Benchmarks with the current 6nm and 5nm chips show that the apple cpus are a little faster than the current intel chips, but they only dissipate a fraction of the heat. That translates to longer battery life and to smaller and quieter devices.

2 Likes

The Intel OneAPI compiler, tools and libraries know nothing about the ARM architecture. They run and put out AMD64/Intel64 instructions, period. Apple provides an emulator/translator from X64 to ARM64. Whatever code is optimum on the X64 architecture is quite unlikely to be optimum after translation and under emulation.

Gfortran, on the other hand, may already be available in the form of ARM64 binaries or will be available soon. The a.out-s that it produces will be native ARM64, and so we should expect that those will run significantly faster than the OneAPI-produced and subsequently Rosetta emulated/translated a.out-s.

1 Like

Thanks. The latest brew gfortran and mpich, which is 11.3 I believe, work fast and flawlessly on my MBA M1 for my code. It seems some compatibility issues has been fixed in version 11.3 Very nice! Looking forward to version 12 for brew.