Satish, Cuda 5 has the same check and error out. Only Cuda 5 supports up to gcc 4.6.x.
As far as I know, the same issue will be relevant for future cuda releases. I talked to an Nvidia person at SC12 who indicated there were issues that were not that easy to work around. Based on that, I would guess that the same restriction on gcc version will be in Cuda 5.1 - except that maybe it will support gcc 4.7.x. I was trying to understand why Asmund has problems building petsc with 4.7.x gnu compilers when I am able to build fine with cuda support using 4.7.2 as long as I force nvcc to use 4.6.3 or earlier as mentioned below. Dave ________________________________________ From: petsc-dev-bounces at mcs.anl.gov [petsc-dev-bounces at mcs.anl.gov] on behalf of Satish Balay [[email protected]] Sent: Wednesday, March 13, 2013 8:43 AM To: For users of the development version of PETSc Subject: Re: [petsc-dev] PETSc-Cuda with gfortran 4.7 Since CUDA is very specific about the version of gcc - should we bother supporting such combinations [that cuda doesn't support?] For eg: for a very long time - you needed gcc-4.4 for cuda 4.x series. [it would do a version check and give error]. Does cuda-5 do the same check and error out? Do you do someting to supress this error? Will this problem stay with say cuda-5.1 or future releases? So I'm not sure if this should go into include/petsc-private/petscimpl.h. Perhaps a configure test for the appropriate case [of cuda version + gcc version that requires it - in petscconf.h or CXXFLAGS?] Satish On Wed, 13 Mar 2013, ?smund Ervik wrote: > Hi Karli, > > I don't think this interferes with anything else, since all it does is > undef some C++ stuff which conflicts with CUDA, and was introduced in > gcc 4.7. That is, the things it undefines are also undefined when one > uses gcc 4.6 or lower. It is general for gcc >= 4.7. > > Best regards, > \AA smund > > On 12. mars 2013 15:13, Karl Rupp wrote: > > Hi Ervik, > > > > thanks for the hint. Do you happen to have any information on whether > > the suggested fix interferes with other versions of GCC or CUDA? Is this > > specific to version 4.7.2 or a 'general fix' for GCC? > > > > Best regards, > > Karli > > > > > > On 03/12/2013 02:35 AM, ?smund Ervik wrote: > >> Hi all, > >> > >> (This suggestion is two lines of code, so I hope it will survive the > >> git/hg apocalypse/transition today. If not, I'll resend it tomorrow.) > >> > >> Trying to compile PETSc with Cuda enabled, following the example in > >> config/examples/arch-cuda-double.py, I get an error with gfortran 4.7.2 > >> when making (configure works fine). > >> This error is apparently well-known with Cuda and gcc 4.7.2. To fix it, I > >> added two lines to include/petsc-private/petscimpl.h: > >> #undef _GLIBCXX_ATOMIC_BUILTINS > >> #undef _GLIBCXX_USE_INT128 > >> and everything works fine. I guess you should add this to petsc-dev, > >> possibly with some if-statement around these lines. > >> > >> Best regards, > >> ?smund Ervik > >> > > > > > > -- > Sendt fra Thunderbird >
