Discussion:
[PyCUDA] 2nd try: 2014.1 git build, without siteconf.py
Chris O'Halloran
2014-09-18 10:30:29 UTC
Permalink
Hello all,
Following up on the above post.

I've had pycuda working successfully on ubuntu 12.04 laptop using an
Optimus card using Nvidia and Intel graphics cards.

I then upgraded to 14.04 but have subsequently found Bumblebee to be a bit
broken and am now using nvidia-prime as the nvidia driver.

Trying to keep everything tidy, I thought I'd install python-pycuda using
apt-get and it was very pleasing to see all the cuda toolkit automagically
install. Great work. I'm not too fussy about being on the latest cuda
toolkit since I'm a bit of a hobbyist.

However, I think I've determined that the opengl part of the python-pycuda
package hasn't been enabled properly.

Normally when you install pycuda from the tar package and run configure you
need to pass the ---cuda-enable-gl option. I note in pycuda 2014 that has
changed to --no-cuda-enable-gl

I find on my machine I can

import pycuda.driver as cuda_drv
import pycuda.compiler as Source_module

etc

but I cannot
import pycuda.gl

I've downloaded the ubuntu source deb package with a view to recompiling to
enable gl but I get so many compilation errors I thought it best to
describe the issue on this mailing list. Reading the debian/rules it seems
as though the --cuda-enable-gl is selected for so I'm not really sure where
to proceed. A lot of modifications have been made to the ubuntu source
package.

I should add that code that doesn't rely on pycuda.gl compiles and runs
fine.

Thanks for all the packaging work.

Cheers and regards,

Chris O'Halloran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140918/34fe0922/attachment.html>
Tomasz Rybak
2014-09-28 10:40:39 UTC
Permalink
Dnia 2014-09-18, czw o godzinie 22:30 +1200, Chris O'Halloran pisze:
[ cut ]
Post by Chris O'Halloran
However, I think I've determined that the opengl part of the
python-pycuda package hasn't been enabled properly.
Normally when you install pycuda from the tar package and run
configure you need to pass the ---cuda-enable-gl option. I note in
pycuda 2014 that has changed to --no-cuda-enable-gl
Thanks for trying PyCUDA packages.
Post by Chris O'Halloran
I find on my machine I can
import pycuda.driver as cuda_drv
import pycuda.compiler as Source_module
etc
but I cannot
import pycuda.gl
Sorry - it's my fault.
OpenGL is enabled, but Python files from pycuda/gl/ packages
are not installed when package is build. I'll look into it
and let you know when it's fixed.

Best regards.
--
Tomasz Rybak GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
http://member.acm.org/~tomaszrybak

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140928/59f335d4/attachment.sig>
Chris O'Halloran
2014-09-29 01:35:30 UTC
Permalink
Hi Tomasz,

Thanks for the confirmation. Hopefully you'll be able resolve this without
too much trouble.

For now I've just installed pycuda from the 2014.1 tar file. I didn't
uninstall the ubuntu pycuda package so I've probably overwritten some
things but I hope that this action has not ruined other things.

For now though

import pycuda.gl

now works.

Thanks again for the response,

Keep up the good work with the packages.

Regards,

Chris O'Halloran
Post by Tomasz Rybak
[ cut ]
Post by Chris O'Halloran
However, I think I've determined that the opengl part of the
python-pycuda package hasn't been enabled properly.
Normally when you install pycuda from the tar package and run
configure you need to pass the ---cuda-enable-gl option. I note in
pycuda 2014 that has changed to --no-cuda-enable-gl
Thanks for trying PyCUDA packages.
Post by Chris O'Halloran
I find on my machine I can
import pycuda.driver as cuda_drv
import pycuda.compiler as Source_module
etc
but I cannot
import pycuda.gl
Sorry - it's my fault.
OpenGL is enabled, but Python files from pycuda/gl/ packages
are not installed when package is build. I'll look into it
and let you know when it's fixed.
Best regards.
--
Tomasz Rybak GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
http://member.acm.org/~tomaszrybak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140929/6bffa93e/attachment.html>
Tomasz Rybak
2014-10-05 19:05:19 UTC
Permalink
Post by Chris O'Halloran
Hi Tomasz,
Thanks for the confirmation. Hopefully you'll be able resolve this
without too much trouble.
For now I've just installed pycuda from the 2014.1 tar file. I didn't
uninstall the ubuntu pycuda package so I've probably overwritten some
things but I hope that this action has not ruined other things.
No, rather not.

Thanks for the patience. I've just uploaded fixed version of PyCUDA
to Debian, version 2014.1-2. I've tested it with CUDA 5.5 and 6.0,
both versions available in Debian, and it works. I'm not sure
when this PyCUDA version will migrate to Ubuntu though.

At the same time it does not fix two rather important problems.
First - I do not "feel" Ubuntu way, and my attempts to contact people
dealing with GPU in Ubuntu failed, and I do not know what I should've
done differently. I have account on Launchpad,
but I do not receive any notifications of bugs. I've just went
there and there are 5 bugs opened against PyOpenCL! But I do not
use Ubuntu, I do not know what they've changed in graphics stack
that PyOpenCL tries to install NVIDIA ICD by default.

The other problem is that I do not use PyCUDA/PyOpenCL daily. I
currently work on other stuff, and it does not leave much time
or mental energy to switch to different field. I try to react to bugs,
but it's rather mechanical now. My latest GPU is two generations behind
(Fermi, not Kepler not Maxwell) and I do not see the need to buy the new
one. At the same time I do not want to orphan my packages; the queue
of packages waiting for adoption is really long and I do not want to
lengthen it.

So, I have the task for members of the list. If you are using PyCUDA
or PyOpenCL on Debian or Ubuntu and there is something odd or wrong
with packages, please let me know. Preferably on the mailing list, or
fill the bug against appropriate package in Debian bug tracker, so
others have the chance to comment on it. I might not respond to it right
away, but I'll try to fix it.

Best regards.
--
Tomasz Rybak GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
http://member.acm.org/~tomaszrybak

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20141005/61699f12/attachment.sig>
Loading...