openacc-best-practices-guide icon indicating copy to clipboard operation
openacc-best-practices-guide copied to clipboard

Codes possibly broken in GCC

Open jefflarkin opened this issue 1 year ago • 0 comments

          Can this practice code be compiled with Gcc using acceleration right now?

I have installed gcc-offload-nvptx lib, but failed to compile laplace2d example with gcc -fopenacc.

All of the gcc commands test failed with following output:

/usr/bin/ld: /tmp/ccgHqtwA.crtoffloadtable.o: warning: relocation against __offload_vars_end' in read-only section .rodata' /usr/bin/ld: /tmp/cctTGv8q.o: in function main': laplace2d-parallel.c:(.text+0x287): undefined reference to GOACC_parallel_keyed' /usr/bin/ld: laplace2d-parallel.c:(.text+0x303): undefined reference to GOACC_parallel_keyed' /usr/bin/ld: /tmp/ccT24dnM.target.o: in function init': ccGkwQvx.c:(.text+0x27): undefined reference to GOMP_offload_register_ver' /usr/bin/ld: /tmp/ccT24dnM.target.o: in function fini': ccGkwQvx.c:(.text+0x55): undefined reference to `GOMP_offload_unregister_ver' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status

Originally posted by @RudiFeiman in https://github.com/OpenACC/openacc-best-practices-guide/issues/14#issuecomment-1639747673

jefflarkin avatar Jul 19 '23 13:07 jefflarkin