hope this is the right place to post, I apologize if it is not.
I wrote a piece of code to run part of a program written in matlab to the gpu. I had to write a mex file to pass the data from matlab to C environment, than the cuda code to pass data from host to device, make here the computations and pass back the output from device to host to matlab again. Now I compiled the code and it gave me no errors but the output that I’m getting is not correct, it’s just zero. Now with a piece of “normal” code I would go step by step, ouputting intermediate results, to see where is the bug; but once given the data to the mex function it is like a black box untill I don’t have them back. How can I access the data flow to debug my code?
I managed to run the compute visual profiler but that is not of great help.
My system is windows xp 32bit and cuda 4.0
Does anyone have a suggestion?