I’ve got a GTX295 card and am trying to launch code that will run on both GPUs simultaniously.
cudaGetDeviceCount returns 2 as expected.
I’ve got two windows threads running the following code :
cudaSetDevice(num); cutilSafeCall(cudaMalloc((void **)&ptr, 400*1024*1024));
(one thread has num set to 0 and one to 1)
Since the device has 896 MB for each GPU 400MB should not be a problem.
Yet the second thread to allocate always gets cudaErrorMemoryAllocation.
I’ve tried taking the SDK’s multipleGPU project and increasing its ram usage to > 0.5*RamSize and got the same error.
(Please notice I’m not even using 0.5*RamSize in my code, it works for 397 MB but not for anything larger)
(I do this by increasing DATA_N, anything beyond 1048576*203 generates this result, which means it allocates 406 MB without crashing)
I’ve tried both toolkit 2.2 and 2.3b.
I’m using SDK 2.3B, Windows XP, VS 2008, nvidia driver 186.18.
How do I fix this?