I have a kinda strange problem when copying memory:
I have a pretty big array of structs (8 byte large, well aligned(2* unsigned long)) located in the host memory. Then i allocate an array of the same size on the device (sometimes the screen completely freezes at this point…ugly). The size is about 50 Mb. I Copy it to the device, no problems - CudaSuccess.
after i worked on it, i try to Copy it back to the host, and everything gets currupted.
with a size of ~40 Mb this problem does not occur.
I’m just wondering, cause my global device memory is at 512 Mb (9800 GTX), and the border of where the error occurs seems not to be fixed. Important to know is maybe, that there is an opengl GUI in the program, with a graphical editor (some kind of CAD software)
Is it possible, that i try to allocate too much device memory?
Is there an easy way to find out, how much device memory is free at a specific moment?
Does the Memory on the device need to be stored in 1 big block(when i allocate such a block), or does it automatically get seperated physically?
When the OpenGl program trys to get more device memory (maybe by adding a geometry obj. ect.), does this possibly overwrite the device memory allocated by the cuda code?
I noted, that cuda processing gets paused totally when any opengl jobs have to be done (zooming, rotating view ect.), can i change this prioritys?
thx for answers :)