I took another shot at trying to get this working and finally managed to
massage it into running. The code still looks very rough and ugly so any
fixes or suggestions are very welcome. Since I'm still inexperienced at
openGL its likely that the performance isn't as good as it should be.
All it does is draw a rotating teapot, using cuda to invert the RGB value
each frame. Pressing 'a' toggles rotation, pressing 'e' toggles processing
with cuda. Hopefully someone else finds this useful
I have been using CUDA and Python/Numpy for my research. I just
recently came across PyCUDA. I am currently wondering if PyCUDA has
support to create Numpy arrays that use pinned memory allocated by
cudaMallocHost() as storage. Is such a thing available in PyCUDA? I
looked through the documentation but didn't see anything that was what
I was looking for. Anyways, I came across this page
http://blog.enthought.com/?p=62 on how to create a custom Python Type
that will allow Numpy to use different allocators besides malloc. If
this hasn't been done I'm willing to write the necessary code to get
this to work. Let me know what you all think. -- Maybe I should be
asking the numpy list too.
Thanks in advance,
After a lot of messing around with pycuda attempting to solve my "Python:
version mismatch?" error, I figured out that the boost library is calling
the system python that comes installed on macs (the one in
/System/Library/Frameworks instead of the one in /Library/Frameworks). I
changed all of the install settings, and boost says that it is using the
proper python, but it is not. Despite all indications, boost continues to
access the system python. So to fix this, I created a symbolic link in the
system python that redirects to the real python. This is kind of a hack, but
it worked temporarily. Obviously I can't leave that, but I don't know what
else to do.
So now I am at the point where pycuda runs, but still doesn't work. For some
reason, the Cuda.init() call run when importing pycuda cannot find any
devices... I am on one of the unibody MacBook Pros, and I am wondering if
the problem might be the presence of both graphics cards (I don't think the
9400M supports Cuda).
If anyone has any insight, I would really appreciate it!