Intel oneAPI MacOS MPI install

NOTE: This process is for Intel CPU hardware only! While it may be possible to compile MPICH on Apple Silicon with Intel oneAPI, most programs will not compile or run.

Intel oneAPI for MacOS currently does NOT include MPI. MPICH can be compiled with Intel oneAPI for MPI programs on MacOS with Intel oneAPI. This process also produces “mpiexec” for running MPI programs.

We suggest using the “online installer” download, which is a small download. The “online” installer can be copied over SSH to your HPC user account for example and installed from the Terminal. Install Xcode and Xcode Command Line Tools.

Install the oneAPI Base Toolkit with options:

  • Math Kernel Library (oneMKL)
  • (optional) GDB debugger

Install the oneAPI HPC toolkit with options:

  • Intel C++ compiler
  • Intel Fortran compiler

Each time to use Intel oneAPI:

source /opt/intel/oneapi/


MPICH will work with Intel oneAPI to provide the MPI libraries and MPIexec with Intel CPU. Download and extract the stable MPICH source. Use commands like:

source /opt/intel/oneapi/

export FC=ifort CC=icc CXX=icpc

mkdir -p $HOME/lib_intel/mpich

./configure --prefix=$HOME/lib_intel/mpich
# the configure step may take tens of minutes

make -j4
# limit number of parallel to avoid crashing build

make install -j4

To use this MPICH with Intel oneAPI in general via CMake, make a file ~/ like:

source /opt/intel/oneapi/

export FC=ifort CC=icc CXX=icpc

export MPI_ROOT=$HOME/lib_intel/mpich


If upon compiling a C program stdio.h isn’t found or a C++ program wchar.h isn’t found, install Xcode Command Line Tools for the Xcode version currently installed. If the program persists, the problem may be that the Xcode include path may not be in Intel’s scripts. To workaround this issue, look for the Command Line Tools include directory and make a file ~/ including (check the directory name):


set -o errexit

source /opt/intel/oneapi/

export LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
export CPLUS_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include


export FC=ifort CC=icc CXX=icpc
# oneAPI on MacOS doesn't yet have the IntelLLVM compilers


source ~/

to use Intel oneAPI.

If you try to use Apple Silicon with Intel oneAPI:

Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel(R) Math Kernel Library.
The processor must support the Intel(R) Supplemental Streaming SIMD Extensions 3 (Intel(R) SSSE3) instructions.
The processor must support the Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) instructions.
The processor must support the Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.