Linux-based CUDA v3.x compiler issue affecting CUDA Surface APIs

Answer ID 2869
Published 12/13/2010 01:42 PM
Updated 12/13/2010 01:42 PM
Linux-based CUDA v3.x compiler issue affecting CUDA Surface APIs

This is due to a known issue that may occur when the CUDA toolkit is installed is a system directory.  This will be addressed in an upcoming version of the CUDA toolit.  In the interim, you can work around the issue by installing the Linux-based CUDA v3.x Toolkit in a non-system directory. (The default Linux directory for CUDA Toolkit installation is "/usr/local/cuda")

An example of the type of errors that can occur with an application software using CUDA Surface functions are:

/usr/local/cuda/include/surface_functions.h: In function 'void surf1Dread(T*, surface<void, 1>, int, int, cudaSurfaceBoundaryMode)':
/usr/local/cuda/include/surface_functions.h:100: error: there are no arguments to '__surf1Dreadc1' that depend on a template parameter, so a declaration of '__surf1Dreadc1' must be available
/usr/local/cuda/include/surface_functions.h:100: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/cuda/include/surface_functions.h:101: error: there are no arguments to '__surf1Dreads1' that depend on a template parameter, so a declaration of '__surf1Dreads1' must be available
/usr/local/cuda/include/surface_functions.h:102: error: there are no arguments to '__surf1Dreadu1' that depend on a template parameter, so a declaration of '__surf1Dreadu1' must be available
/usr/local/cuda/include/surface_functions.h:103: error: there are no arguments to '__surf1Dreadu2' that depend on a template parameter, so a declaration of '__surf1Dreadu2' must be available
/usr/local/cuda/include/surface_functions.h:104: error: there are no arguments to '__surf1Dreadu4' that depend on a template parameter, so a declaration of '__surf1Dreadu4' must be available
/usr/local/cuda/include/surface_functions.h: In function 'void surf2Dread(T*, surface<void, 2>, int, int, int, cudaSurfaceBoundaryMode)':
/usr/local/cuda/include/surface_functions.h:460: error: there are no arguments to '__surf2Dreadc1' that depend on a template parameter, so a declaration of '__surf2Dreadc1' must be available
/usr/local/cuda/include/surface_functions.h:461: error: there are no arguments to '__surf2Dreads1' that depend on a template parameter, so a declaration of '__surf2Dreads1' must be available
/usr/local/cuda/include/surface_functions.h:462: error: there are no arguments to '__surf2Dreadu1' that depend on a template parameter, so a declaration of '__surf2Dreadu1' must be available
/usr/local/cuda/include/surface_functions.h:463: error: there are no arguments to '__surf2Dreadu2' that depend on a template parameter, so a declaration of '__surf2Dreadu2' must be available
/usr/local/cuda/include/surface_functions.h:464: error: there are no arguments to '__surf2Dreadu4' that depend on a template parameter, so a declaration of '__surf1Dreadu4' must be available

Was this answer helpful?
Your rating has been submitted, please tell us how we can make this answer more useful.

Answers others found helpful

LIVE CHAT

Chat online with one of our support agents

CHAT NOW

ASK US A QUESTION

Contact Support for assistance

CONTACT US