[mpich-discuss] MPICH 3.2.1 build error with icc+ifort: undefined reference to `_Static_assert'

Gus Correa gus at ldeo.columbia.edu
Thu Jun 14 15:32:08 CDT 2018


Hi Jeff

No, I haven't tried to compile with GCC 8.
The computer has gcc 7.3.1 from Fedora 26.
I also doubt the code is really Fortran 90 compliant.
It has Cray pointers, included files (chains of them),
and things the like.
This is a small project to get a postdoc
here up and running with his research,
and the solution you provided is fine.

Many thanks,
Gus

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

_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list