[petsc-dev] PETSc-Cuda with gfortran 4.7
Åsmund Ervik
Asmund.Ervik at sintef.no
Wed Mar 13 07:32:35 CDT 2013
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
More information about the petsc-dev
mailing list