I want to use CURAND device api, which requires -Mcuda=nollvm.
My code works on CentOS with CUDA-10.0 and PGI 18.10.
It does not work under Ubuntu 18.10 with CUDA-10.1 and PGI 18.10.
The error message is :
In file included from /opt/pgi/linux86-64/2018/cuda/10.0/include/cuda_runtime.h:83,
from /tmp/pgcudaforJgJfPIzD7NCc.gpu:1:
/opt/pgi/linux86-64/2018/cuda/10.0/include/crt/host_config.h:127:2: error: #error – unsupported GNU version! gcc versions later than 7 are not supported!
#error – unsupported GNU version! gcc versions later than 7 are not supported!
^~~~~
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (a.cuf: 1)
PGF90/x86-64 Linux 18.10-1: compilation aborted
But CUDA 10.1 is supposed to support gcc 8, which I have.
I now realize that PGI 18.10 officially does not support Ubuntu 18.10. Is this the problem? Code not requiring -Mcuda=nollvm seem to work without any problem.