openmp fails to compile with rtx4090 cuda 12.3

71 Views Asked by At

This is a somewhat duplicate post but since I cant comment on OpenMP offloading says 'fatal error: could not find accel/nvptx-none/mkoffload' and it does not solve my issue I am forced to make a new post.

(base) user@user-System-Product-Name:~/Desktop/c_stuff/learning_omp$ gcc-12 -fopenmp -foffload=nvptx-none='-march=sm_80' -fcf-protection=none main.c
ptxas fatal   : Value 'sm_30' is not defined for option 'gpu-name'
nvptx-as: ptxas returned 255 exit status
mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-12 returned 1 exit status
compilation terminated.
lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/12//accel/nvptx-none/mkoffload returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
(base) user@user-System-Product-Name:~/Desktop/c_stuff/learning_omp$

Now whatever I set the offload to seems to be completely ignored it just runs sm_30 and crashes. I don't know why or how to fix this but I did get

sudo apt install gcc-offload-nvptx

and I tried gcc 11 and 12 with their respective offloader and also nvcc and nothing helped.

0

There are 0 best solutions below