openmpi is not using gcc7

Chao-Chin Yang chaochinyang at
Fri Nov 24 01:48:41 UTC 2017

Thanks, David.  I didn’t read the description well.


> On Nov 22, 2017, at 8:48 PM, David Strubbe <dstrubbe at> wrote:
> Hello Chao-Chin,
> This is not a bug. Note the text in the port description for openmpi-default: "THIS SUBPORT WRAPS MACPORTS' DEFAULT COMPILER FOR C/C++ (AND THE FORTRAN COMPILER SELECTED BY THE VARIANT, IF ANY)" So, you have built OpenMPI for clang for C/C++ and gfortran (from gcc7) for Fortran. If you want openmpi with gcc7 for C, then yes you should install openmpi-gcc7 instead.
> David
> On Wed, Nov 22, 2017 at 11:51 AM, Chao-Chin Yang <chaochinyang at <mailto:chaochinyang at>> wrote:
> Hi,
> I installed openmpi with gcc7 by:
> $ sudo port install openmpi +threads
>> $ port installed | grep openmpi
> openmpi @1.10.3_0 (active)
> openmpi-default @1.10.3_0+gcc7+threads (active)
> $ port select mpi
> Available versions for mpi:
>         none
>         openmpi-mp-fortran (active)
> However, gcc is not invoked by the mpi wrapper:
> $ which mpicc
> /opt/local/bin/mpicc
> $ mpicc --show
> /usr/bin/clang -I/opt/local/include/openmpi-mp -L/opt/local/lib/openmpi-mp -lmpi
> It is using Apple’s native, not gcc at all.  And the mpi wrapper is a series of links to opal_wrapper, which is a binary.
> Has anyone had this problem also?  Is it a bug in the port file?  How can I fix this without installing openmpi-gcc7 and force the mpi selection?
> Sincerely,
> Chao-Chin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list