2

gcc supports offloading openmp code to nvidia cards since gcc version 7.1 but I'm unable to use it. I'm on ubuntu 17.10 and I have installed nvptx-tools and gcc-offload-nvptx packages. when I try to compile openmp target code I get this error

ptxas /tmp/ccqGsx2p.o, line 383; error   : State space mismatch between instruction and address in instruction 'ld'
ptxas /tmp/ccqGsx2p.o, line 456; error   : State space mismatch between instruction and address in instruction 'ld'
ptxas /tmp/ccqGsx2p.o, line 383; error   : Unknown symbol '__stack_chk_guard'
ptxas /tmp/ccqGsx2p.o, line 383; fatal   : Label expected for forward reference of '__stack_chk_guard'
ptxas fatal   : Ptx assembly aborted due to errors
nvptx-as: ptxas returned 255 exit status
mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-7 returned 1 exit status
compilation terminated.
lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/7//accel/nvptx-none/mkoffload returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

I was unable to find any solutions for this and openmp in gcc with nvptx support has almost no documentaion

Mohibeyki
  • 459
  • 6
  • 16

0 Answers0