openmpi is not using gcc7

David Strubbe dstrubbe at macports.org
Thu Nov 23 04:48:38 UTC 2017


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 icloud.com>
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: <http://lists.macports.org/pipermail/macports-users/attachments/20171122/d7493853/attachment.html>


More information about the macports-users mailing list