Roughly 700-800 MB is the maximum I’ve managed to allocate on windows using non-professional cards. From what i understand this is related to the drivers and WDDM.
That’s exactly what I’m talking about aswell. There appears to be driver related limitation to how much pinned host memory you can allocate on Windows. If you have a pro card you would have pro drivers which from what I’ve heard solves this problem.
Thanks Jimmy. Thats seems to be the case. Ive retested and in fact cudaHostAlloc returns cudaErrorMemoryAllocation for n = 2102410241024 but it works for n = 10241024*1024 - 1 i.e 2GB - 1 byte !
My code is cross platform but at the moment its easier for me to work in Visual Studio in Windows. How can I get around this problem?
Also by pro card you mean Tesla?
And finally this doesnt help me with my cudaGetMemInfo problem when using dev = 3 i.e. GTX 680.
The call still crashes the program for any cudaHostAlloc more than about 700MB …
Rework your memory management, maybe your kernel doesn’t need to have 2 GB of data available at each call, maybe you can segment this into several calls or streams.
Unlock your Geforce card to trick your system that it’s a professional card ( The Official NVIDIA Forums | NVIDIA , this might be difficult and painful )
Unfortunately none of those options are possible for me.
Im prepared to live with the 2GB limit for pinned memory for the time being. However when I try this with the GTX 680 as I mentioned before the cudaGetMemInfo call fails and in fact any memory allocation on the device itself also fails (for pinned host memory of 700MB or more).
I feel this has got to be a driver bug and not a way to force customers to buy Teslas because otherwise it would also be capped at the 2GB limit.
Regardless of potential allocation limitations due to the operating system or driver model, it seems to me that a cudaGetMemInfo() call should not segfault, but return a suitable error status if it cannot proceed for whatever reason. I would suggest filing a bug with a self-contained repro case. BTW, does this issue repro with just the GTX680 in the machine by any chance? That would make things easier to repro on the NVIDIA side. The bug reporting form can be reached via a link on the registered developer website. Thank you for your help.
I have downloaded Cuda 5.0 beta and the relevant drivers and it appears that the cudaGetMemInfo crash when using the 680 has disappeared.
Furthermore I can now allocate 2GB of pinned memory per allocation for all the cards (680 included) which is good enough for me for the moment.
@tmurray do you know how I can turn off the 2GB cap in Cuda 5.0? I would like to be able to allocate up to 4GB per pinned memory allocation or even 6GB.
Also, thanks for the help everyone. I really appreciate it!