<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div><div dir="auto">It’s shocking that a compliant Fortran 90 code doesn’t compile with GCC 8. Have you reported the bugs to GCC bugzilla?</div></div><div dir="auto"><br></div><div dir="auto">Jeff</div><div><br><div class="gmail_quote"><div>On Thu, Jun 14, 2018 at 12:56 PM Gus Correa <<a href="mailto:gus@ldeo.columbia.edu">gus@ldeo.columbia.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jeff<br>
<br>
This is actually to compile a Fortran90 program,<br>
which uses MPI and another library (netCDF) through<br>
Fortran modules (use MPI, use netcdf).<br>
The code doesn't compile under gfortran, only with ifort.<br>
Optimization and efficiency is not the top priority,<br>
if we can get the code to compile and run that is fine.<br>
<br>
Since Fortran modules are compiler-dependent, I need to<br>
build MPICH (and netCDF) with the Intel compilers.<br>
I have done this for a variety of compilers and compiler<br>
versions for our clusters (before Infiniband with MPICH,<br>
then with Open MPI),<br>
but this turn it is for a single workstation,<br>
hence MPICH is a good fit.<br>
<br>
That Fortran90 modules are compiler-dependent really sucks,<br>
and is the negation of software inter-operability<br>
and portability.<br>
It may serve well the compiler vendors,<br>
but for users it is just a pain.<br>
<br>
Anyway, your suggestion to tweak with that include file worked,<br>
and I could build MPICH 3.2.1 with the archaic Intel 2012.<br>
<br>
Many thanks!<br>
Gus Correa<br>
<br>
<br>
On 06/13/2018 11:34 PM, Jeff Hammond wrote:<br>
> I don’t know for sure, but I’d guess that GCC 8 or Clang 6 optimizes <br>
> better than ICC 12 and the likelihood goes up the newer the hardware. <br>
> Intel people contribute to the OSS compilers, particularly when it comes <br>
> to architecture-specific optimizations.<br>
> <br>
> Jeff<br>
> <br>
> On Wed, Jun 13, 2018 at 5:02 PM Jeff Hammond <<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <br>
> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>>> wrote:<br>
> <br>
>     On Wed, Jun 13, 2018 at 4:44 PM, Gus Correa <<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a><br>
>     <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>>> wrote:<br>
> <br>
> <br>
> <br>
>         On 06/13/2018 07:36 PM, Jeff Hammond wrote:<br>
> <br>
>             Why don't you just use a newer ICC?  September 28, 2012 was<br>
>             a long time ago...<br>
> <br>
>         > Jeff<br>
> <br>
>         The cost of a new license.  :(<br>
> <br>
> <br>
>     Do any of the options on<br>
>     <a href="https://software.intel.com/en-us/qualify-for-free-software" rel="noreferrer" target="_blank">https://software.intel.com/en-us/qualify-for-free-software</a> work for you?<br>
> <br>
>     It is temporary, but you can get Intel 19 beta for free<br>
>     (<a href="https://software.intel.com/en-us/articles/intel-parallel-studio-xe-2019-beta" rel="noreferrer" target="_blank">https://software.intel.com/en-us/articles/intel-parallel-studio-xe-2019-beta</a>).<br>
> <br>
>     What code are you developing?<br>
> <br>
>     Jeff<br>
> <br>
> <br>
>             On Wed, Jun 13, 2018 at 4:32 PM, Gus Correa<br>
>             <<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a> <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>><br>
>             <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a><br>
>             <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>>>> wrote:<br>
> <br>
>                  Thank you Jeff and Min!<br>
> <br>
>                  Would you know if MPICH 3.2 has the same issue?<br>
>                  I would rather use an older version instead, as long as<br>
>             it builds.<br>
> <br>
>                  Many thanks,<br>
>                  Gus Correa<br>
> <br>
>                  On 06/13/2018 06:34 PM, Min Si wrote:<br>
> <br>
>                      I was just creating the issue on MPICH github when<br>
>             Jeff replied.<br>
> <br>
>                      Please use this issue to keep track:<br>
>             <a href="https://github.com/pmodels/mpich/issues/3178" rel="noreferrer" target="_blank">https://github.com/pmodels/mpich/issues/3178</a><br>
>                      <<a href="https://github.com/pmodels/mpich/issues/3178" rel="noreferrer" target="_blank">https://github.com/pmodels/mpich/issues/3178</a>><br>
> <br>
>                      Min<br>
>                      On 2018/06/13 15:19, Jeff Hammond wrote:<br>
> <br>
>                          _Static_assert comes from C11.<br>
> <br>
>                          src/include/mpir_assert.h does a direct test<br>
>             for C11 support<br>
>                          based upon the GCC version, which is unsafe<br>
>             since ICC (and<br>
>                          other non-GCC compilers) define these macros.<br>
> <br>
>                          /* GCC 4.6 added support for _Static_assert:<br>
>                            * <a href="http://gcc.gnu.org/gcc-4.6/changes.html" rel="noreferrer" target="_blank">http://gcc.gnu.org/gcc-4.6/changes.html</a><br>
>                          <<a href="http://gcc.gnu.org/gcc-4.6/changes.html" rel="noreferrer" target="_blank">http://gcc.gnu.org/gcc-4.6/changes.html</a>> */<br>
>                          #if (__GNUC__ > 4 || (__GNUC__ == 4 &&<br>
>             __GNUC_MINOR__ >= 6))<br>
>                          && !defined __cplusplus<br>
>                          #define HAVE_C11__STATIC_ASSERT 1<br>
>                          #endif<br>
> <br>
>                          MPICH needs to test for _Static_assert properly<br>
>             using<br>
>                          configure.  You should file a GitHub issue to<br>
>             track this.<br>
> <br>
>                          Jeff<br>
> <br>
>                          On Wed, Jun 13, 2018 at 2:33 PM, Gus Correa<br>
>                          <<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a><br>
>             <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>> <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a><br>
>             <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>>><br>
>                          <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a><br>
>             <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>><br>
> <br>
>                          <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a><br>
>             <mailto:<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>>>>> wrote:<br>
> <br>
>                               Hi MPICH experts<br>
> <br>
>                               I am trying to build MPICH 3.2.1 with Intel<br>
>                               compilers (icc, ifort).<br>
>                               C++ is disabled.<br>
> <br>
>                               The configuration step goes well,<br>
>                               but make fails,<br>
>                               after a lot of stuff is compiled,<br>
>                               with the error below (undefined reference to<br>
>                          `_Static_assert').<br>
> <br>
>                               FYI, the OS is Linux Fedora Core 26:<br>
> <br>
>                               Linux 4.15.17-200.fc26.x86_64 #1 SMP Thu<br>
>             Apr 12<br>
>                          18:28:26 UTC 2018<br>
>                               x86_64 x86_64 GNU/Linux<br>
> <br>
>                               The Intel compiler version is 12.1.6:<br>
>                               ifort (IFORT) 12.1.6 20120928<br>
>                               icc (ICC) 12.1.6 20120928<br>
> <br>
>                               The Intel compiler environment is set the<br>
>             standard way<br>
>                               recommended by Intel:<br>
> <br>
>                               source /path/to/intel/bin/compilervars.sh<br>
>             intel64<br>
> <br>
> <br>
>                               Any help is appreciated.<br>
>                               Gus Correa<br>
> <br>
>                               ****** make errror message<br>
>                          *************************************<br>
>                               make[2]: Entering directory<br>
>                                         <br>
>             '/home/sw/mpich/inst/3.2.1/mpich-3.2.1/build_intel-2011.13.367'<br>
>                                 CCLD     src/env/mpivars<br>
>                              <br>
>             lib/.libs/libmpi.a(lib_libmpi_la-ch3_progress.o): In<br>
>                          function<br>
>                               `MPIDI_CH3I_Shm_send_progress':<br>
>                                         <br>
>             ../src/mpid/ch3/channels/nemesis/src/ch3_progress.c:(.text+0x1ea2):<br>
>                          undefined<br>
>                               reference to `_Static_assert'<br>
>                              <br>
>             lib/.libs/libmpi.a(lib_libmpi_la-ch3i_eagernoncontig.o): In<br>
>                               function `MPIDI_CH3I_SendNoncontig':<br>
>                                         <br>
>             ../src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c:(.text+0x1d3):<br>
>                               undefined reference to `_Static_assert'<br>
>                               make[2]: *** [Makefile:19701:<br>
>             src/env/mpivars] Error 1<br>
>                               make[2]: Leaving directory<br>
>                                         <br>
>             '/home/sw/mpich/inst/3.2.1/mpich-3.2.1/build_intel-2011.13.367'<br>
>                               make[1]: *** [Makefile:38608:<br>
>             all-recursive] Error 1<br>
>                               make[1]: Leaving directory<br>
>                                         <br>
>             '/home/sw/mpich/inst/3.2.1/mpich-3.2.1/build_intel-2011.13.367'<br>
>                               make: *** [Makefile:10337: all] Error 2<br>
>                                         <br>
>             *******************************************************************<br>
> <br>
>                              <br>
>             _______________________________________________<br>
>                               discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>><br>
>                          <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>>> <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>><br>
>                          <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>>>><br>
>                               To manage subscription options or unsubscribe:<br>
>             <a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>                          <<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a>><br>
>                              <br>
>             <<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>                          <<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a>>><br>
> <br>
> <br>
> <br>
> <br>
>                          --             Jeff Hammond<br>
>             <a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>><br>
>             <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>>><br>
>                          <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br>
>             <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>><br>
>             <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>>>><br>
>             <a href="http://jeffhammond.github.io/" rel="noreferrer" target="_blank">http://jeffhammond.github.io/</a><br>
> <br>
> <br>
>                          _______________________________________________<br>
>                          discuss mailing <a href="mailto:listdiscuss@mpich.org" target="_blank">listdiscuss@mpich.org</a><br>
>             <mailto:<a href="mailto:listdiscuss@mpich.org" target="_blank">listdiscuss@mpich.org</a>><br>
>                          <mailto:<a href="mailto:listdiscuss@mpich.org" target="_blank">listdiscuss@mpich.org</a><br>
>             <mailto:<a href="mailto:listdiscuss@mpich.org" target="_blank">listdiscuss@mpich.org</a>>><br>
>                          To manage subscription options or unsubscribe:<br>
>             <a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>                          <<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a>><br>
> <br>
> <br>
> <br>
> <br>
>                      _______________________________________________<br>
>                      discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>> <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>>><br>
>                      To manage subscription options or unsubscribe:<br>
>             <a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>                      <<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a>><br>
> <br>
> <br>
>                  _______________________________________________<br>
>                  discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>> <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>>><br>
>                  To manage subscription options or unsubscribe:<br>
>             <a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>                  <<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a>><br>
> <br>
> <br>
> <br>
> <br>
>             -- <br>
>             Jeff Hammond<br>
>             <a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>><br>
>             <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>>><br>
>             <a href="http://jeffhammond.github.io/" rel="noreferrer" target="_blank">http://jeffhammond.github.io/</a><br>
> <br>
> <br>
>             _______________________________________________<br>
>             discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
>             <mailto:<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>><br>
>             To manage subscription options or unsubscribe:<br>
>             <a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
> <br>
> <br>
> <br>
>     -- <br>
>     Jeff Hammond<br>
>     <a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>><br>
>     <a href="http://jeffhammond.github.io/" rel="noreferrer" target="_blank">http://jeffhammond.github.io/</a><br>
> <br>
> -- <br>
> Jeff Hammond<br>
> <a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a> <mailto:<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>><br>
> <a href="http://jeffhammond.github.io/" rel="noreferrer" target="_blank">http://jeffhammond.github.io/</a><br>
<br>
_______________________________________________<br>
discuss mailing list     <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>