Hi Bryan,

On Wed, 29 Sep 2010 17:17:25 -0700, Bryan Catanzaro 
<catan...@eecs.berkeley.edu> wrote:
> I recently upgraded to CUDA 3.2 RC, and pulled PyCUDA from git, on my Mac OS 
> X installation (running a 32 bit Python 2.6).
> For some reason, trying to create a GPUArray, using 
> pycuda.tools.DeviceMemoryPool.allocate as the allocator, causes an error.
> Creating the same GPUArray, using the default allocator, seems to work fine.  
> Before upgrading CUDA and PyCUDA, creating GPUArrays with the memory pool 
> worked for me.
> 
> I've attached a minimal program with this problem.  Has anyone else seen this 
> error?

Easy solution: Call

allocator.stop_holding()

before the end of your program (e.g. in a try-finally). Why? The
allocator holds on to chunks of memory on the device, and by the time
it's told to let go of these memory blocks, all of CUDA and PyCUDA may
have already been torn down, at which point stuff starts going wrong.

HTH,
Andreas

Attachment: pgp2Ll6xP4ySH.pgp
Description: PGP signature

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to