Skip to content

Instantly share code, notes, and snippets.

@scivision
Last active February 22, 2021 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scivision/36bacffb4871e1221c3e302cde3303ae to your computer and use it in GitHub Desktop.
Save scivision/36bacffb4871e1221c3e302cde3303ae to your computer and use it in GitHub Desktop.
Intel oneAPI MacOS 11.x: Trying to get MPI library working (MPICH, or OpenMPI)
$ git clone https://github.com/pmodels/mpich.git
$ git checkout v3.4.1
$ ./configure --prefix=$HOME/mpich-3.4.1 --disable-cxx
# NOTE: if CPPFLAGS not set, configure will fail in HWLOC. There is some bug in mpich/configure that just requires CPPFLAGS.
#
# configure complete, but make fails instantly:
$ make
No rule to make target `src/include/mpi_proto.h', needed by `src/binding/fortran/mpif_h/buildiface-stamp'. Stop.
$ ./configure --prefix=$HOME/openmpi-4.1
configure: error: ptrdiff_t type is not available, this is required by C99 standard. Cannot continue
# Each time you open a new Terminal and want to use Intel oneAPI on MacOS:
# source ~/intel.sh
#
# the directory may change--check for your system. They were the same for MacOS 10.15, 11.0, 11.2
export CFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
export CPPFLAGS=$CFLAGS
export LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib
export FC=ifort CC=icc CXX=icpc
source /opt/intel/oneapi/setvars.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment