visual profiler 1.01 error

I made a CUDA program ( it has an UI and uses CUDA as DLL when you press a button ). When I try to execute the Visual Profiler 1.0.11 under Vista x64 it says

“Error -96 in reading profiler output. No data rows in profiler output file”

Any idea how can I solve that, pls? I tried checking/unchecking all the timestamp, profiler counter options, etc… but it says always the same.

The profiler is looking in another directory than the ‘current’ directory when running CUDA probably. This happens when changing directories in your program after it was started by the visual profiler.

Thanks! Yep, the program changes the current folder because the application needs the user to select some files, reads some DLL plugins in other folder, etc…

Any idea how can be solved, pls? I set the working directory as the .exe folder… but it does not work 8(

I can only tell you how I do it with my matlab things.

In the working directory in the profiler I set the directory where the program will be when running CUDA. Than in my script I go back to some higher directories where I have to do initiailization.

What you can do (I guess) is have CUDA start the program in C:\prof & then in your program, just before you start your CUDA call change the current directory to C:\prof.
I hope that helps, I am not really a C-programming expert ;)

I tried to copy the profiler into my app’s folder but the error -96 is still present 8(

No, I mean in the runtime settings in your cude profiler. There you have to set the directory where the program should be looking for its data. It is in the configuration part.

What I cannot understand is how the profiler’s programmers are writting the log files to the current directory instead of inside a fixed path… it’s more than obvious that an application can make a chdir() while it’s executing…

A question… do I need to set programatically CUDA_PROFILE=1 and CUDA_PROFILE=0 to tell the profiler the code section I want to profile?

No, all of your kernels will be profiled.

And I guess it will have something to do with the driver dumping a text file in the current directory. The profiler tool is really just some user-interface that will set an environment variable before running your program and reading in (and visualizing) the file that was dumped, I doubt it does much more than that.

Pls, profiler team… can you fix it? It’s hard to debug a CUDA application used as a DLL inside a GUI app that changes the current folder, loads DLL plugins from other directories, calls OpenFileDialog, SaveFileDialog, etc…


What you can do is just set the environment variables needed by the debugger yourself, run your program, take the .csv file that was created from whichever directory it was created in and import it in the visual profiler with file->import.