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

444 views
Skip to first unread message

Magnus Wiberg

unread,
Mar 28, 2018, 1:35:05 PM3/28/18
to PyFR Mailing List
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

Freddie Witherden

unread,
Mar 28, 2018, 1:41:42 PM3/28/18
to pyfrmai...@googlegroups.com
Hi Magnus,

On 28/03/18 18:35, Magnus Wiberg wrote:
> 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.

signature.asc

Magnus Wiberg

unread,
Mar 28, 2018, 2:02:31 PM3/28/18
to PyFR Mailing List
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.
Reply all
Reply to author
Forward
0 new messages