[PyCUDA] trouble with pycuda-0.93.1rc2 - test_driver.py, etc.

Janet Jacobsen jsjacobsen at lbl.gov
Thu Nov 19 18:20:15 PST 2009


Hi.  I built Python 2.6.4 and boost 1.40 using gcc 4.4.2.
I also installed NumPy 1.3.0.

I downloaded PyCuda 0.93, couldn't get it to install,
read the posts, and then downloaded PyCuda 0.93.1rc2.

I used the siteconf.py from the 0.93 directory, which I
think is okay:
> BOOST_INC_DIR = ['/usr/common/usg/boost/1_40_0/pool/include']
> BOOST_LIB_DIR = ['/usr/common/usg/boost/1_40_0/pool/lib']
> BOOST_COMPILER = 'gcc442'
> BOOST_PYTHON_LIBNAME = ['boost_python']
> BOOST_THREAD_LIBNAME = ['boost_thread']
> CUDA_TRACE = False
> CUDA_ROOT = '/usr/local/cuda'
> CUDA_ENABLE_GL = False
> CUDADRV_LIB_DIR = ['/usr/lib64']
> CUDADRV_LIBNAME = ['cuda']
> CXXFLAGS = []
> LDFLAGS = []
However, I don't have sudo privileges on the machine
with the GPUs, so I tried "python setup.py install".

It looks like the install was okay - lots of running,
writing, copying, building, and creating lines.  At the
end:
> Installed 
> /global/common/tesla/usg/python/2.6.4/lib/python2.6/site-packages/pycuda-0.93.1rc2-py2.6-linux-x86_64.egg
> Processing dependencies for pycuda==0.93.1rc2
> Searching for pytools>=8
> Reading http://pypi.python.org/simple/pytools/
> Reading http://mathema.tician.de/software/pytools
> Best match: pytools 9
> Downloading 
> http://pypi.python.org/packages/source/p/pytools/pytools-9.tar.gz#md5=5cf7944bba89d8bf7d7187b702fbf587
> Processing pytools-9.tar.gz
> Running pytools-9/setup.py -q bdist_egg --dist-dir 
> /tmp/easy_install-LsZWTT/pytools-9/egg-dist-tmp-a3SJHd
> Adding pytools 9 to easy-install.pth file
> Installing logtool script to /usr/common/usg/python/2.6.4/bin
> Installing runalyzer-gather script to /usr/common/usg/python/2.6.4/bin
> Installing runalyzer script to /usr/common/usg/python/2.6.4/bin
>
> Installed 
> /global/common/tesla/usg/python/2.6.4/lib/python2.6/site-packages/pytools-9-py2.6.egg
> Finished processing dependencies for pycuda==0.93.1rc2
Am I missing something?  Did I omit a step?

I then tried the first line of the tutorial:
> Python 2.6.4 (r264:75706, Nov 16 2009, 18:40:23)
> [GCC 4.4.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pycuda.driver as cuda
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "pycuda/driver.py", line 1, in <module>
>     from _driver import *
> ImportError: No module named _driver
(In one of the archive posts, the same error was
reported, but in the next post, he said that he had
resolved the error, but didn't say how.)

So then I tried running test_driver.py.  The first time I
got an undefined lib file that went away after I set
my LD_LIBRARY_PATH to include
/usr/common/usg/boost/1_40_0/pool/lib

Then I tried running test_driver.py again.  This is what
I got.
> % python test_driver.py
> Traceback (most recent call last):
>   File "test_driver.py", line 3, in <module>
>     import pycuda.autoinit
>   File 
> "/usr/common/usg/python/2.6.4/lib/python2.6/site-packages/pycuda-0.93.1rc2-py2.6-linux-x86_64.egg/pycuda/autoinit.py", 
> line 1, in <module>
>     import pycuda.driver as cuda
>   File 
> "/usr/common/usg/python/2.6.4/lib/python2.6/site-packages/pycuda-0.93.1rc2-py2.6-linux-x86_64.egg/pycuda/driver.py", 
> line 1, in <module>
>     from _driver import *
> ImportError: 
> /usr/common/usg/boost/1_40_0/pool/lib/libboost_python.so.1.40.0: 
> undefined symbol: PyUnicodeUCS4_FromEncodedObject
What am I missing/need to do?  The machine (x86_64) I am
working on is running Linux.  The sys admin installed all
of the NVIDA and CUDA stuff (2.3).  Others in the group
have been able to run CUDA programs.

Thank you for your help,
Janet








More information about the PyCUDA mailing list