Question

I'm failing to run a python script which wraps CUDA code. It's telling me to update my CUDA SDK, but I think that the problem is a cuda C file getting read instead of a cuda C++ file of the same name. Anyone know how to fix this?

The error message is:

MapSMtoCores undefined SM 3.5 is undefined (please update to the latest SDK)!
1.1...src/cudaconv2/filter_acts.cu(1179) : getLastCudaError() CUDA error : 
filterActs: kernel execution failed : (9) invalid configuration argument.

I'm pretty sure I am using cuda-5 though. To check, according to this, I need to

$ cd $(SDK)
$ make
$ ./C/bin/linux/release/deviceQuery

I don't have root access so I had to

$ mkdir ~/CUDA_SDK
$ cp -r /usr/local/cuda/gpu_sdk ~/CUDA_SDK
$ cd ~/CUDA_SDK
$ make

However, this resulted in:

  • many warnings of the form

../../common/inc/helper_cuda.h:246:12: warning: command line option ‘-Wimplicit’ is valid for C/ObjC but not for C++

../../common/inc/helper_cuda.h:246:12: warning: enumeration value ‘FOO’ not handled in switch

  • many errors of the form

../../common/inc/helper_cuda.h:252:14: error: ‘FOO’ was not declared in this scope

I had a look with find -name at helper_cuda.h. There exist 2 versions of it: ./C/common/inc/helper_cuda.h, a header for cuda C files containing all of the variables mentioned in the errors, ./CUDALibraries/common/inc/helper_cuda.h, a header for cuda C++ files containing none of the variables mentioned in the errors.

I also had a look with grep "is undefined (please update to the latest SDK)!" -r ~/CUDA_SDK for which file might be outputting the error (mentioned at the top) which started all this, and strikingly, helper_cuda.h is one of only 2 files which do.

If I can get the C++ helper_cuda.h to be read instead of the C helper_cuda.h, I reckon I've won. Shall I use environment variables?

Was it helpful?

Solution

There are two different issues. The first issue is that a successfully built CUDA app fails when running and the second is that building a CUDA app fails due to an invalid build environment.

The message,

MapSMtoCores undefined SM 3.5 is undefined (please update to the latest SDK)!

is output when an app (normally one of the CUDA samples) that uses the CUDA samples framework (helper_cuda.h) is run on a device of compute capability 3.5 and the app was built with a version of the samples framework that has not been updated to cover that compute capability.

If CUDA 5 is installed, then it seems likely that the app was built with an earlier version of the SDK.

The second message,

..src/cudaconv2/filter_acts.cu(1179) : getLastCudaError() CUDA error : filterActs: kernel execution failed : (9) invalid configuration argument.

is likely caused by the app not having detected the first error and then going on with trying to launch a kernel with invalid values returned by the function that printed the first error.

The other errors are build errors. These are caused by copying the CUDA SDK to your home folder and attempting to build from there without updating the CUDA environment variables.

Building the CUDA samples outside of their native locations may be a lot of work and should not be necessary to get the "filter acts" app working. To get the "filter acts" working on a machine with a compute capability 3.5 device, you will need to rebuild it with CUDA 5.0 or newer or modify it to no longer rely on the CUDA samples framework (which would be better).

So, you should first establish if you have an actual working CUDA 5 build environment. If you do not have that, someone that has root access should fix it. With a working build environment, you should then be able to rebuild the app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top