Visual Profiler - error non-zero code

Hello people,

I am aware that this topic was covered some time ago at this forum, but that explanation did not help me at all. I am a newbie at CUDA programming and I would like to receive a very simple instruction how to fix this error: “Error: application being profiled returned a non-zero return code …”.

Here is the topic which I found useless:

The CUDA sample codes do not work at mine Profiler either…

I would appreciate your help!

If you cannot profile the cuda sample codes, there may be a problem with your CUDA install, such as no cuda-capable GPU.

Which CUDA version are you using?

What happens if you run the deviceQuery and bandwidthTest cuda samples normally (i.e. from the command line, not using profiler or any IDE).

What operating system are you using?

I am using cuda v5.5. The deviceQuery option works fine. This is the result:

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GT 540M"
  CUDA Driver Version / Runtime Version          5.5 / 5.5
  CUDA Capability Major/Minor version number:    2.1
  Total amount of global memory:                 1024 MBytes (1073741824 bytes)
  ( 2) Multiprocessors, ( 48) CUDA Cores/MP:     96 CUDA Cores
  GPU Clock rate:                                1344 MHz (1.34 GHz)
  Memory Clock rate:                             900 Mhz
  Memory Bus Width:                              128-bit
  L2 Cache Size:                                 131072 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65535),
3D=(2048, 2048, 2048)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (65535, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display Driver Mo
  Device supports Unified Addressing (UVA):      No
  Device PCI Bus ID / PCI location ID:           1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simu
ltaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 5.5, CUDA Runtime Versi
on = 5.5, NumDevs = 1, Device0 = GeForce GT 540M
Result = PASS

I am using Win 7 Home Premium

How are you running the visual profiler?
What is the result if you profile the vectorAdd sample code?

I am running it normally as an administrator. The vectorAdd sample code shows the same error statement :(

Actually I was asking for details, like how do you start nvvp (do you type nvvp at a command line or?) How are you starting profiling (are you selecting new session)? Do you enter anything into the start profiling wizard like any path or environment variables, arguments, time-out, etc.

When you attempt to profile vectorAdd, does anything appear in the “Console” tab at the bottom of the nvvp display window? For example, if you run the vectorAdd sample from the command line, it should display [vectorAdd.exe] starting … (and more). Do you see any of that in the console tab?

Yes, I type ‘nvvp.exe’ at the command line.
In the wizard I just type the path of the file - I select the *.cu file.
I do not enter the rest of the fields.

What instruction should I type in the command tab?
When I type ‘nvvp vectorAdd.exe’ or regular ‘nvvp’ I do not see ‘[vectorAdd.exe] starting … (and more)’

The *.cu file is not the correct file to profile. You need to profile the executable/application. You need to profile the same file that you would run at the command line in order to run the program. If you tell the profiler to profile a .cu file, it will attempt to run the .cu file, and the operating system will give an error, which is why you are getting the non-zero return code error.

For example, if you have, and it compiles to vectorAdd.exe, then the file you want to profile is vectorAdd.exe, NOT

Thank you very much txbob. That clarified me a lot. I wasn’t smart enough to figure out that I needed the .exe file. However, we all learn from mistakes. Thank you once again.