Ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'

Hi, I am using a systems with Centos 8, with a GTX950, installed gcc-offload-nvptx.
I try to offload OpenMP code to GPU, using a very simple example with #omp target.
Unfortunately in compile I get the error messages:

ptxas fatal : Value ‘sm_30’ is not defined for option ‘gpu-name’
nvptx-as: ptxas returned 255 exit status
mkoffload: fatal error: x86_64-redhat-linux-accel-nvptx-none-gcc returned 1 exit status
compilation terminated.

How to deal with this ptxas fatal error?

Thnx

1 Like

I believe this is due to NVIDIA dropping support for SM_30 in latest CUDA and gcc-offload-nvptx to force use it. I’m still banging my head on this myself. Trying older CUDA if that works for you may be the easiest route out. See also https://github.com/spack/spack/issues/18444

Finally installed pgcc from NVidia, which works fine.

I have the same problem, I have to run opencv < 4 because the camera SDK I have uses IplImage, which has been eliminated from opencv 4, so I am trying to use opencv 3.3.1 but can’t compile with Cuda 11.2 and get the same error ‘sm_30’ … etc. (NB: under ubuntu 20.04).

So my question is : what is pgcc and where can I find it, since it seems to have solved the problem for you ?

Thanks

Please look here: PGI Compilers & Tools
I have been informed today by email, so the answer is a bit delayed

Hi, I think this could help as I’ve been struggling with this issue. I’m trying to offload some code to GPU with openmp.

I found that the option -foffload=-misa=sm_35 avoid buiding the SM_30 architecture which is not supported anymore on cuda 11.

My full command line looks like this :
g++ -fopenmp -foffload=nvptx-none -fcf-protection=none -foffload=-misa=sm_35 -fno-stack-protector -O3 myfile.cpp -o mybinary

Hoping this might help someone.