I have an application that uses OpenGL interoperability. Once I create the CUDA + OpenGL ocntext I start getting serious memory allocation problems. I’m not sure yet if it also happens with a regular context, trying to verify.
This application allocates several buffers using pinned memory, an OpenGL texture, a render buffer object and two CUDA buffers. The application itself is 32bit but the system is 64bit windows 7 (driver is 280.26)
On one machine (desktop with GeForce gtx 570) I can allocate all buffers with no problem. That machine has 4GB memory and the GPU has 1.2 GB memory.
On the laptop with 8GB memory, and a Quadro 2000m with 2GB memory, i run out of memory way before I get there. The problem is that even before GPU allocations fail, the pinned memory allocation start to fail, and even regular c++ new throws out of memory.
It does look like the GPU is playing something strange with the memory as Windows (via the NVIDIA control panel) reports the GPU as 2GB with 0MB video memory and 3816MB shared system memory.
Same behavior happens if I bypass optimus and tell the laptop to use the discrete GPU only.
Any ideas what is going on and if there is a way to fix this?
Thanks