<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks, David.  I didn’t read the description well.<div class=""><br class=""></div><div class=""><div class="">Sincerely,</div><div class="">Chao-Chin</div><div class=""><br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 22, 2017, at 8:48 PM, David Strubbe <<a href="mailto:dstrubbe@macports.org" class="">dstrubbe@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello Chao-Chin,<div class=""><br class=""></div><div class="">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" class="">openmpi-gcc7 instead.</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">David</span></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Nov 22, 2017 at 11:51 AM, Chao-Chin Yang <span dir="ltr" class=""><<a href="mailto:chaochinyang@icloud.com" target="_blank" class="">chaochinyang@icloud.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="">
<br class="">
I installed openmpi with gcc7 by:<br class="">
<br class="">
$ sudo port install openmpi +threads<br class="">
…<br class="">
$ port installed | grep openmpi<br class="">
openmpi @1.10.3_0 (active)<br class="">
openmpi-default @1.10.3_0+gcc7+threads (active)<br class="">
$ port select mpi<br class="">
Available versions for mpi:<br class="">
        none<br class="">
        openmpi-mp-fortran (active)<br class="">
<br class="">
However, gcc is not invoked by the mpi wrapper:<br class="">
<br class="">
$ which mpicc<br class="">
/opt/local/bin/mpicc<br class="">
$ mpicc --show<br class="">
/usr/bin/clang -I/opt/local/include/openmpi-<wbr class="">mp -L/opt/local/lib/openmpi-mp -lmpi<br class="">
<br class="">
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 class="">
<br class="">
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 class="">
<br class="">
Sincerely,<br class="">
Chao-Chin<br class="">
<br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></div></body></html>