Nvcc fatal : Value 'sm_20' is not defined for option 'gpu-architecture'

Hi,

I’m attempting to run

c:\PyFR-1.7.5\examples\euler_vortex_2d>mpiexec -n 2 pyfr run -b cuda -p euler_vortex_2d.pyfrm euler_vortex_2d.ini

with the change in .ini file from device-id = round-robin to device-id = local-rank

I get

pycuda.driver.CompileError: nvcc compilation of C:\Users\admin\AppData\Local\Temp\tmpinwerlob\kernel.cu failed
[command: nvcc --cubin -arch sm_20 -m64 -Ic:\users\admin\appdata\local\programs\python\python36\lib\site-packages\pycuda\cuda kernel.cu]
[stdout:
nvcc fatal : Value 'sm_20' is not defined for option 'gpu-architecture'
]

My understanding (from googling the error) is that sm_20 can not be used with cuda 9. I don’t know how (or where) to change this flag to sm_30 which should work(?). (I’ve tried to set the enviroment variable CUDA_NVCC_FLAGS "-arch=sm_30, but it makes no difference. I still get Value ‘sm_20’ is not defined for option ‘gpu-architecture’)

I guess changing from sm_20 to sm_30 (or something) is what I want to do? Can anyone help me with how to do that?

Running on Windows 10, cuda 9.1 with a 1080 ti (and a gtx 470).
I’m attaching the complete output I get from running the program.

Best regards,
Magnus

cuda-error.txt (8.55 KB)

Hi Magnus,

Running on Windows 10, cuda 9.1 with a 1080 ti (and a gtx 470).
I'm attaching the complete output I get from running the program.

The GTX 470 is an SM_20 device, thus why when you ask PyFR to use this
device it attempts to compile a kernel for SM_20. If this is not the
desired behaviour then you can specify an alternative device in the
configuration file.

If you do wish to use the 470 you will need to downgrade to an earlier
version of CUDA.

Regards, Freddie.

Thank you very much for the quick reply, I understand now and got it working :).

I set device-id=0 and it chose the 1080 ti instead.