Re: [hwloc-users] hwloc-1.6.1rc2 Build failure with Cray compiler
I realise I did not mention the flags I used when configuring hwloc. I am using -g -h gnu -O3 which explicitly asks to recognise GNU extensions. (I need to use -h gnu to compile certain other code.) This would explain why __GNUC__ is defined... Apologies for omitting this earlier. -erik On Thu, Jan 17, 2013 at 2:21 PM, Jeff Hammondwrote: > I was not able to reproduce the behavior described by Erik on the > NERSC Cray XE6, which is to say, Cray C does not claim to be GCC > there. As I can't verify the problem, I can't report it. > > I have no experience with Cray bug fix latency but I suspect this > needs to be worked-around (I refuse to call it a fix since there is no > problem in hwloc) because Cray won't backport whatever fix they > implement to all their compilers that users might come across. > > Jeff > > On Thu, Jan 17, 2013 at 1:15 PM, Erik Schnetter > wrote: > > I have no idea how fast Cray acts in such a case. > > > > -erik > > > > > > On Thu, Jan 17, 2013 at 2:05 PM, Brice Goglin > wrote: > >> > >> Does Cray fix such bugs quickly usually? If so, no need to change hwloc. > >> If not, I'll need somebody to test the change on other cray platforms > and > >> compiler versions. > >> Brice > >> > >> > >> > >> Jeff Hammond a écrit : > >>> > >>> This is a bug in the Cray compiler. They cannot and should not set > >>> the __GNUC__ flag unless they are fully compatible with GCC. There > >>> > >>> are many ways to define "fully compatible" but at a minimum, code that > >>> compiles with GCC needs to compile with any compiler that elects to > >>> define __GNUC__. It is prudent to impose a higher standard in some > >>> > >>> cases but that's not pertinent to this discussion. > >>> > >>> Lots of vendor compilers pretend to be __GNUC__ for any number of > >>> reasons. I believe that they are all wrong for doing it. > >>> > >>> Regarding this specific issue, there is nothing wrong with hwloc and I > >>> > >>> don't know why anyone should bother trying to fix Cray's problem, but > >>> I suspect that pragmatism will prevail, as it appears to have in the > >>> case of Boost > >>> ( > http://www.boost.org/doc/libs/1_52_0/boost/config/select_platform_config.hpp > ). > >>> > >>> > >>> I'll reproduce this locally and contact Cray directly about fixing > >>> this on their end. > >>> > >>> Best, > >>> > >>> Jeff > >>> > >>> On Thu, Jan 17, 2013 at 12:19 PM, Erik Schnetter > >>> wrote: > >>> > hwloc-1.6.1rc2 fails to build with the Cray compiler > > Cray C : Version 8.1.2 Thu Jan 17, 2013 12:18:54 > > > The error message is > > CC bitmap.lo > CC-147 craycc: ERROR > Declaration is incompatible with "int ffsl(long)" (declared at line > 526 > of > "/opt/cray/xe-sysroot/4.1.20/usr/include/string.h"). > > > (Yes, there is no line number with the error message.) > > This seems to be caused by the fact that the Cray c! > ompiler > sets __GNUC__, > > but is not quite compatible. A work-around is to change line 56 of > include/private/misc.h from > > #elif defined(__GNUC__) > > to > > #elif defined(__GNUC__) && !defined(_CRAYC) > > > -erik > > -- > Erik Schnetter > http://www.perimeterinstitute.ca/personal/eschnetter/ > > > > > hwloc-users mailing list > hwloc-us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users > >>> > >>> > >>> > >> > >> ___ > >> > >> hwloc-users mailing list > >> hwloc-us...@open-mpi.org > >> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users > > > > > > > > > > -- > > Erik Schnetter > > http://www.perimeterinstitute.ca/personal/eschnetter/ > > > > -- > Jeff Hammond > Argonne Leadership Computing Facility > University of Chicago Computation Institute > jhamm...@alcf.anl.gov / (630) 252-5381 > http://www.linkedin.com/in/jeffhammond > https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond > -- Erik Schnetter http://www.perimeterinstitute.ca/personal/eschnetter/
Re: [hwloc-users] hwloc-1.6.1rc2 Build failure with Cray compiler
Does Cray fix such bugs quickly usually? If so, no need to change hwloc. If not, I'll need somebody to test the change on other cray platforms and compiler versions. Brice Jeff Hammonda écrit : >This is a bug in the Cray compiler. They cannot and should not set >the __GNUC__ flag unless they are fully compatible with GCC. There >are many ways to define "fully compatible" but at a minimum, code that >compiles with GCC needs to compile with any compiler that elects to >define __GNUC__. It is prudent to impose a higher standard in some >cases but that's not pertinent to this discussion. > >Lots of vendor compilers pretend to be __GNUC__ for any number of >reasons. I believe that they are all wrong for doing it. > >Regarding this specific issue, there is nothing wrong with hwloc and I >don't know why anyone should bother trying to fix Cray's problem, but >I suspect that pragmatism will prevail, as it appears to have in the >case of Boost >(http://www.boost.org/doc/libs/1_52_0/boost/config/select_platform_config.hpp). > >I'll reproduce this locally and contact Cray directly about fixing >this on their end. > >Best, > >Jeff > >On Thu, Jan 17, 2013 at 12:19 PM, Erik Schnetter >wrote: >> hwloc-1.6.1rc2 fails to build with the Cray compiler >> >> Cray C : Version 8.1.2 Thu Jan 17, 2013 12:18:54 >> >> The error message is >> >> CC bitmap.lo >> CC-147 craycc: ERROR >> Declaration is incompatible with "int ffsl(long)" (declared at line >526 of >> "/opt/cray/xe-sysroot/4.1.20/usr/include/string.h"). >> >> (Yes, there is no line number with the error message.) >> >> This seems to be caused by the fact that the Cray compiler sets >__GNUC__, >> but is not quite compatible. A work-around is to change line 56 of >> include/private/misc.h from >> >> #elif defined(__GNUC__) >> >> to >> >> #elif defined(__GNUC__) && !defined(_CRAYC) >> >> -erik >> >> -- >> Erik Schnetter >> http://www.perimeterinstitute.ca/personal/eschnetter/ >> >> ___ >> hwloc-users mailing list >> hwloc-us...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users > > > >-- >Jeff Hammond >Argonne Leadership Computing Facility >University of Chicago Computation Institute >jhamm...@alcf.anl.gov / (630) 252-5381 >http://www.linkedin.com/in/jeffhammond >https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond >___ >hwloc-users mailing list >hwloc-us...@open-mpi.org >http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
Re: [hwloc-users] hwloc-1.6.1rc2 Build failure with Cray compiler
Brice This worked earlier. Maybe "earlier" was version 1.5 of hwloc. I agree with your statements regarding __GNUC__. Instead of testing for _CRAYC, one could introduce an autoconf check whether __builtin_ffsl works correctly. -erik On Thu, Jan 17, 2013 at 1:22 PM, Brice Goglinwrote: > Did this work in the past? I don't think we changed this code recently. > Can you run "make check" to make sure this change doesn't break anything? > Thanks > Brice > > > Le 17/01/2013 19:19, Erik Schnetter a écrit : > > hwloc-1.6.1rc2 fails to build with the Cray compiler > > Cray C : Version 8.1.2 Thu Jan 17, 2013 12:18:54 > > The error message is > >CC bitmap.lo > CC-147 craycc: ERROR > Declaration is incompatible with "int ffsl(long)" (declared at line 526 > of > "/opt/cray/xe-sysroot/4.1.20/usr/include/string.h"). > > (Yes, there is no line number with the error message.) > > This seems to be caused by the fact that the Cray compiler > sets __GNUC__, but is not quite compatible. A work-around is to change line > 56 of include/private/misc.h from > > #elif defined(__GNUC__) > > to > > #elif defined(__GNUC__) && !defined(_CRAYC) > > -erik > > -- > Erik Schnetter > http://www.perimeterinstitute.ca/personal/eschnetter/ > > > ___ > hwloc-users mailing > listhwloc-users@open-mpi.orghttp://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users > > > -- Erik Schnetter http://www.perimeterinstitute.ca/personal/eschnetter/
Re: [hwloc-users] hwloc-1.6.1rc2 Build failure with Cray compiler
Did this work in the past? I don't think we changed this code recently. Can you run "make check" to make sure this change doesn't break anything? Thanks Brice Le 17/01/2013 19:19, Erik Schnetter a écrit : > hwloc-1.6.1rc2 fails to build with the Cray compiler > > Cray C : Version 8.1.2 Thu Jan 17, 2013 12:18:54 > > The error message is > > CC bitmap.lo > CC-147 craycc: ERROR > Declaration is incompatible with "int ffsl(long)" (declared at line > 526 of > "/opt/cray/xe-sysroot/4.1.20/usr/include/string.h"). > > (Yes, there is no line number with the error message.) > > This seems to be caused by the fact that the Cray compiler > sets __GNUC__, but is not quite compatible. A work-around is to change > line 56 of include/private/misc.h from > > #elif defined(__GNUC__) > > to > > #elif defined(__GNUC__) && !defined(_CRAYC) > > -erik > > -- > Erik Schnetter> > http://www.perimeterinstitute.ca/personal/eschnetter/ > > > ___ > hwloc-users mailing list > hwloc-us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users