Visual Profiler Error

Hi!!
I need to use visual profiler with a cuda mex-file, and I have this problem: the program is running,but at the end I have this error:
EMPTY HEADER LINE FOUND IN CSV FILE.
Someone knows why?
Thanks in advance.

What you need to do is make a matlab-script that performs your cuda mex file, and then exits matlab.

And you need to call matlab from the visual profiler, telling it to run that script (I believe it is the -r command line option).

You also need to adjust the runtime in the visual profiler. If your matlab runs too long, the visual profiler will try to read the profiling file too early (leading to these errors)

And last but not least, if your matlab program changes the current directory before starting the cuda calculation, the file is in a different directory as expected, so you will also get this error message.