On Donnerstag 31 Dezember 2009, Ying Wai (Daniel) Fan wrote: > Hi, > > I seem to find the solution to my own problem. After changing > atexit.register(context.pop) > to > atexit.register(context.detach) > in pycuda.autoinit.py, the error message doesn't come out again. > > Is there any disadvantage of using context.detach instead of context.pop?
I think the issue is that PyCUDA doesn't yet take into account that its context is being shared by the runtime API (via CUFFT). Since it's unaware of this sharing, it orders the destruction of the context, which is impossible when the runtime API is still attached, hence the error. Your proposed fix has roughly the right effect, but not quite. The right point in time for detach() to be called is from PyCUDA's guts, when it notices that it needs to clean up. A correct fix should be in git. I'd much appreciate it if you could test it. Thanks for reporting this. (Btw, thanks also for the complex-valued bits--I'll merge those soon.) Andreas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyCUDA mailing list [email protected] http://tiker.net/mailman/listinfo/pycuda_tiker.net
