I am trying to compile C++ code using OpenACC. The serial version of the code works just fine. The code runs with OpenMP, too. So I am not sure what is wrong with OpenACC. One solution online said I needed to run “sudo apt install gcc-offload-nvptx”. However this did not fix my errors below. Maybe I need to add the path or something?
lto1: error: ‘-fcf-protection=full’ is not supported for this target
mkoffload: fatal error: /usr/bin/x86_64-linux-gnu-accel-nvptx-none-gcc-9 returned 1 exit status
lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/9//accel/nvptx-none/mkoffload returned 1 exit status
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
I should note that the errors above only show up when I add this statement “#pragma acc parallel reduction (+:sum)”. When I just find the package and link the target libraries, things work fine.