<div dir="ltr">Hello Chao-Chin,<div><br></div><div>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 <span style="font-size:12.8px">openmpi-gcc7 instead.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">David</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 22, 2017 at 11:51 AM, Chao-Chin Yang <span dir="ltr"><<a href="mailto:chaochinyang@icloud.com" target="_blank">chaochinyang@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I installed openmpi with gcc7 by:<br>
<br>
$ sudo port install openmpi +threads<br>
…<br>
$ port installed | grep openmpi<br>
openmpi @1.10.3_0 (active)<br>
openmpi-default @1.10.3_0+gcc7+threads (active)<br>
$ port select mpi<br>
Available versions for mpi:<br>
        none<br>
        openmpi-mp-fortran (active)<br>
<br>
However, gcc is not invoked by the mpi wrapper:<br>
<br>
$ which mpicc<br>
/opt/local/bin/mpicc<br>
$ mpicc --show<br>
/usr/bin/clang -I/opt/local/include/openmpi-<wbr>mp -L/opt/local/lib/openmpi-mp -lmpi<br>
<br>
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.<br>
<br>
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?<br>
<br>
Sincerely,<br>
Chao-Chin<br>
<br>
</blockquote></div><br></div>