inducer / pycuda

CUDA integration for Python, plus shiny features
http://mathema.tician.de/software/pycuda
Other
1.82k stars 285 forks source link

Sending large memory to device with GPUArray gives "Python int too large to convert to C unsigned long" #219

Closed t-tetsuya222 closed 4 years ago

t-tetsuya222 commented 4 years ago

Hi, I have developed computational fluid dynamics code(Lattice Boltzmann Method) with PyCUDA. I need to use large memory for large scale calculation. When I send the Numpy array with shape of (27,500,500,500) to device by gpuarray.to_gpu(arr), PyCUDA gives a following error; "OverflowError: Python int too large to convert to C unsigned long"

I think the memory size of arr is larger than maximum of C unsigned long. Is there any solution ?

inducer commented 4 years ago

That sounds like something that should have been fixed by this MR. What version are you using?

t-tetsuya222 commented 4 years ago

Thank you for your response. My version was "2018.1 ". Now, updating to the latest version can solve this error. Thank you!