Global Memory

Hi all,

I am trying to declare an huge array on Global Memory:

device float A[51210241024]

but I get this error:

ptxas /tmp/tmpxft_000067c7_00000000-2_XXX.ptx, line 509; �%J�Y: Parsing error near ‘-’: syntax error
ptxas �%J�Y: Ptx assembly aborted due to errors
make: *** [XXX.o] Error 255

The gpu has 4 GB of global memory, and that would be 2GB so I don’t know why that’s happening.

I’ve also tried:

device float A[536870912u]

But nothing change. It seems like there is a limitation of 2GB for an array (when I change float to char I get no errors).

Any idea?

Thank you.


What OS are you using?

I also encountered the same error.

It seems we cannot declare an array of size more than 2 GB.


It is because of WDDM, if you are using Win Vista/7.

I am using Ubuntu, but still have the same problem.