Intel oneAPI (no cost) does not come with MPI on MacOS. The gemini3d/external repo can build MPICH for oneAPI on MacOS.
NOTE: Apple Silicon CPU (arm64) is not compatible with Intel oneAPI.
oneAPI relies on the underlying AppleClang compiler for libc and libstdc++. Xcode is required:
xcode-select --install
Install oneAPI Base Toolkit with these options:
Install oneAPI HPC Toolkit with these options:
We recommend making a little shell script named like “~/intel_oneapi.sh”. The contents of this script would be like:
source /opt/intel/oneapi/setvars.sh
export FC=ifort CC=icc CXX=icpc
To enable oneAPI in this Terminal:
source ~/intel_oneapi.sh
git clone https://github.com/gemini3d/external
cmake -S external -B external/build -DCMAKE_INSTALL_PREFIX=~/lib_intel
cmake --build external/build
that installs Gemini3d external libraries (including MPI) under ~/lib_intel. This path is arbitrary but should be distinct between compilers.
git clone https://github.com/gemini3d/gemini3d
cmake -S gemini3d -B build/gemini3d -DCMAKE_PREFIX_PATH=~/lib_intel
cmake --build gemini3d/build
ctest --test-dir gemini3d/build
If there are compiler failures in general, try adding to “~/intel_oneapi.sh”:
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 CXXFLAGS=-I$CPLUS_INCLUDE_PATH
export CFLAGS=$CXXFLAGS