Discussion:
[PyCUDA] How to run the sample code GlInterop.py? Thanks!
LFC
2014-07-15 17:39:08 UTC
Permalink
Dear All,

Sorry to interrupt you by this way.

When I tried to test the sample code GlInterop.py, I met a problem as below:

-----------------------------------------------------------------------------------------------------------------------------------
File "GlInterop.py", line 15, in <module>
import pycuda.gl as cuda_gl
File
"/usr/local/lib/python2.7/dist-packages/pycuda-2013.1.1-py2.7-linux-x86_64.egg/pycuda/gl/__init__.py",
line 4, in <module>
raise ImportError("PyCUDA was compiled without GL extension support")
ImportError: PyCUDA was compiled without GL extension support
-----------------------------------------------------------------------------------------------------------------------------------

I tried to switch on the "CUDA_ENABLE_GL" in setup.py and re-compile pyCUDA.

But, it doesn't work. My system is Ubuntu 12.04 and CUDA 6.0.

Hope someone could give me a solution.

Thanks in advance.

LFC
Andreas Kloeckner
2014-07-15 17:51:24 UTC
Permalink
Post by LFC
Dear All,
Sorry to interrupt you by this way.
-----------------------------------------------------------------------------------------------------------------------------------
File "GlInterop.py", line 15, in <module>
import pycuda.gl as cuda_gl
File
"/usr/local/lib/python2.7/dist-packages/pycuda-2013.1.1-py2.7-linux-x86_64.egg/pycuda/gl/__init__.py",
line 4, in <module>
raise ImportError("PyCUDA was compiled without GL extension support")
ImportError: PyCUDA was compiled without GL extension support
-----------------------------------------------------------------------------------------------------------------------------------
I tried to switch on the "CUDA_ENABLE_GL" in setup.py and re-compile pyCUDA.
But, it doesn't work. My system is Ubuntu 12.04 and CUDA 6.0.
You need to

rm -Rf build

before you reinstall.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140715/f1b19ef6/attachment.sig>
Andreas Kloeckner
2014-07-16 01:31:27 UTC
Permalink
Dear LFC,
I did the command "rm -Rf build" and "setup.py build" and "setup.py
install".
But I sill have the same problem. I don't know why.
First, please make sure to keep the list cc'd, for archival. Next,
please post a complete build log to some pastebin and send the link.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140715/e0ee5cff/attachment.sig>
LFC
2014-07-16 02:11:31 UTC
Permalink
Dear Andreas,

I switch on "CUDA_ENABLE_GL" in the line 47 in the ~/pycuda/pysetup.py
like this:
Switch("CUDA_ENABLE_GL", True, "Enable CUDA GL interoperability"),

And, I did "rm -Rf build" and "setup.py build".

The complete build log is in the link: http://www.pastebin.ca/2821498

Thank you.

LFC
Post by Andreas Kloeckner
Dear LFC,
I did the command "rm -Rf build" and "setup.py build" and "setup.py
install".
But I sill have the same problem. I don't know why.
First, please make sure to keep the list cc'd, for archival. Next,
please post a complete build log to some pastebin and send the link.
Andreas
Andreas Kloeckner
2014-07-16 13:45:30 UTC
Permalink
Post by LFC
Dear Andreas,
I switch on "CUDA_ENABLE_GL" in the line 47 in the ~/pycuda/pysetup.py
Switch("CUDA_ENABLE_GL", True, "Enable CUDA GL interoperability"),
That's the wrong spot. You need to change this in siteconf.py or
$HOME/.aksetup-defaults.py, depending on which of those you created.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140716/bc43c9cb/attachment.sig>
lfc
2014-07-17 07:26:59 UTC
Permalink
Dear Andreas,

Yes, I fixed the problem by changing "CUDA_ENABLE_GL" to "True" in
siteconf.py.

Thank a lot. The pyCuda is really a great library. Good job!

Best,
LFC
Post by Andreas Kloeckner
Post by LFC
Dear Andreas,
I switch on "CUDA_ENABLE_GL" in the line 47 in the ~/pycuda/pysetup.py
Switch("CUDA_ENABLE_GL", True, "Enable CUDA GL interoperability"),
That's the wrong spot. You need to change this in siteconf.py or
$HOME/.aksetup-defaults.py, depending on which of those you created.
Andreas
Freddie Witherden
2014-07-15 17:41:48 UTC
Permalink
Post by LFC
Dear All,
Sorry to interrupt you by this way.
-----------------------------------------------------------------------------------------------------------------------------------
File "GlInterop.py", line 15, in <module>
import pycuda.gl as cuda_gl
File
"/usr/local/lib/python2.7/dist-packages/pycuda-2013.1.1-py2.7-linux-x86_64.egg/pycuda/gl/__init__.py",
line 4, in <module>
raise ImportError("PyCUDA was compiled without GL extension support")
ImportError: PyCUDA was compiled without GL extension support
-----------------------------------------------------------------------------------------------------------------------------------
I tried to switch on the "CUDA_ENABLE_GL" in setup.py and re-compile pyCUDA.
Could you paste the exact set of commands you used to rebuild and
install PyCUDA? A possible explanation -- and one that I normally fall
foul of -- is forgetting to reinstall a package after I've recompiled it!

Regards, Freddie.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140715/bed4b4ff/attachment.sig>
Loading...