I'm having a devil of a time getting pyCUDA to work on my MacBook and I
can't get past this error:
host47:examples ian$ python demo.py
Traceback (most recent call last):
File "demo.py", line 22, in <module>
""")
File "/Library/Python/2.5/site-packages/pycuda/compiler.py", line 203, in
__init__
arch, code, cache_dir, include_dirs)
File "/Library/Python/2.5/site-packages/pycuda/compiler.py", line 188, in
compile
include_dirs = include_dirs + [_find_pycuda_include_path()]
File "/Library/Python/2.5/site-packages/pycuda/compiler.py", line 149, in
_find_pycuda_include_path
raise RuntimeError("could not find path to PyCUDA's C header files")
RuntimeError: could not find path to PyCUDA's C header files
Below I have version info and the full build process leading up to the
error...Any pointers would be *hugely* appreciated. If someone could
explain what's happening here and what pyCUDA is looking for, that might
point me in the right direction.
Am I missing something silly? I spent yesterday banging my head against the
'make' process until I found a spurious '=' in the ./configuration.py
arguments (entirely my fault), maybe I've missed something silly here too?
Versions:
OS: Mac OS X Leopard 10.5.8
GFX: MacBook's NVIDIA 9400M
CUDA: 2.3 (drivers installed, binary NVIDIA demos run fine)
Boost: 1.41 built from source
Python: 2.5.1 (Mac default)
numpy: 1.4
setuptools: 0.6c11 (upgraded from Mac default of 0.6c9 or 0.6c7 (can't
remember!) via Phil Eby's comment:
http://andreasjacobsen.com/2008/10/10/using-python-setuptools-on-the-mac/)
pytools: installed using easy_install as it didn't auto-install
pyCUDA: 0.94beta (today's) and also 0.93 via a separate directory - same
problem occurs for both
Build process:
host47:pycuda ian$ pwd
/Users/ian/Documents/pycudahead/pycuda
# ./build and ./siteconf.py are removed, <site-packages>/pycuda* are deleted
host47:pycuda ian$ ./configure.py
--boost-inc-dir=/Users/ian/Documents/boost_1_41_0
--boost-lib-dir=/Users/ian/Documents/boost_1_41_0/stage/lib
--boost-compiler=gcc --boost-python-libname=boost_python
--boost-thread-libname=boost_thread --cuda-root=/usr/local/cuda
Scanning installed packages
Setuptools installation detected at /Users/ian/Documents/pycudahead/pycuda
Non-egg installation
Removing elements out of the way...
Already patched.
/Users/ian/Documents/pycudahead/pycuda/setuptools-0.6c9-py2.5.egg-info
already patched.
Extracting in /var/folders/kJ/kJextB8zHm0fVbN-6ulON++++TI/-Tmp-/tmpOn2tkB
Now working in
/var/folders/kJ/kJextB8zHm0fVbN-6ulON++++TI/-Tmp-/tmpOn2tkB/distribute-0.6.4
Building a Distribute egg in /Users/ian/Documents/pycudahead/pycuda
/Users/ian/Documents/pycudahead/pycuda/setuptools-0.6c9-py2.5.egg-info
already exists
host47:pycuda ian$ more siteconf.py
BOOST_INC_DIR = ['/Users/ian/Documents/boost_1_41_0']
BOOST_LIB_DIR = ['/Users/ian/Documents/boost_1_41_0/stage/lib']
BOOST_COMPILER = 'gcc'
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 = []
CUDADRV_LIBNAME = ['cuda']
CXXFLAGS = []
LDFLAGS = []
host47:pycuda ian$ ls -l /usr/local/cuda/
total 0
drwxrwxr-x 11 ian admin 374 3 Sep 09:00 bin
drwxrwxr-x 16 ian admin 544 3 Sep 09:00 doc
drwxrwxr-x 35 ian admin 1190 3 Sep 09:00 include
drwxr-xr-x 9 root wheel 306 6 Jan 12:06 lib
drwxrwxr-x 4 ian admin 136 3 Sep 09:00 man
drwxrwxr-x 4 ian admin 136 3 Sep 09:00 open64
drwxrwxr-x 3 ian admin 102 3 Sep 09:00 src
host47:pycuda ian$
####
##MAKE##
####
host47:pycuda ian$ make
ctags -R src || true
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
setup.py build
Scanning installed packages
Setuptools installation detected at /Users/ian/Documents/pycudahead/pycuda
Non-egg installation
Removing elements out of the way...
Already patched.
/Users/ian/Documents/pycudahead/pycuda/setuptools-0.6c9-py2.5.egg-info
already patched.
Extracting in /var/folders/kJ/kJextB8zHm0fVbN-6ulON++++TI/-Tmp-/tmpIYrNXM
Now working in
/var/folders/kJ/kJextB8zHm0fVbN-6ulON++++TI/-Tmp-/tmpIYrNXM/distribute-0.6.4
Building a Distribute egg in /Users/ian/Documents/pycudahead/pycuda
/Users/ian/Documents/pycudahead/pycuda/setuptools-0.6c9-py2.5.egg-info
already exists
/Users/ian/Documents/boost_1_41_0 /boost/ python .hpp
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_python .so
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_python .dylib
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_thread .so
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_thread .dylib
/usr/local/cuda /bin/ nvcc
/usr/local/cuda/include / cuda .h
/usr/local/cuda/lib / lib cuda .so
/usr/local/cuda/lib / lib cuda .dylib
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py:263:
UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build
running build_py
creating build
creating build/lib.macosx-10.5-i386-2.5
creating build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/__init__.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/autoinit.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/compiler.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/cumath.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/curandom.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/driver.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/elementwise.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/gpuarray.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/reduction.py -> build/lib.macosx-10.5-i386-2.5/pycuda
copying pycuda/tools.py -> build/lib.macosx-10.5-i386-2.5/pycuda
creating build/lib.macosx-10.5-i386-2.5/pycuda/gl
copying pycuda/gl/__init__.py -> build/lib.macosx-10.5-i386-2.5/pycuda/gl
copying pycuda/gl/autoinit.py -> build/lib.macosx-10.5-i386-2.5/pycuda/gl
running build_ext
building '_driver' extension
creating build/temp.macosx-10.5-i386-2.5
creating build/temp.macosx-10.5-i386-2.5/src
creating build/temp.macosx-10.5-i386-2.5/src/cpp
creating build/temp.macosx-10.5-i386-2.5/src/wrapper
<...SNIP gcc and boost warnings cut out...>
g++ -Wl,-F. -bundle -undefined dynamic_lookup
build/temp.macosx-10.5-i386-2.5/src/cpp/cuda.o
build/temp.macosx-10.5-i386-2.5/src/cpp/bitlog.o
build/temp.macosx-10.5-i386-2.5/src/wrapper/wrap_cudadrv.o
build/temp.macosx-10.5-i386-2.5/src/wrapper/mempool.o
-L/Users/ian/Documents/boost_1_41_0/stage/lib -L/usr/local/cuda/lib
-lboost_python -lboost_thread -lcuda -o
build/lib.macosx-10.5-i386-2.5/pycuda/_driver.so -arch i386
####
## SUDO MAKE INSTALL ##
####
host47:pycuda ian$ sudo make install
Password:
ctags -R src || true
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
setup.py install
Scanning installed packages
Setuptools installation detected at /Users/ian/Documents/pycudahead/pycuda
Non-egg installation
Removing elements out of the way...
Already patched.
/Users/ian/Documents/pycudahead/pycuda/setuptools-0.6c9-py2.5.egg-info
already patched.
Extracting in /tmp/tmpj4hJyk
Now working in /tmp/tmpj4hJyk/distribute-0.6.4
Building a Distribute egg in /Users/ian/Documents/pycudahead/pycuda
/Users/ian/Documents/pycudahead/pycuda/setuptools-0.6c9-py2.5.egg-info
already exists
/Users/ian/Documents/boost_1_41_0 /boost/ python .hpp
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_python .so
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_python .dylib
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_thread .so
/Users/ian/Documents/boost_1_41_0/stage/lib / lib boost_thread .dylib
/usr/local/cuda /bin/ nvcc
/usr/local/cuda/include / cuda .h
/usr/local/cuda/lib / lib cuda .so
/usr/local/cuda/lib / lib cuda .dylib
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py:263:
UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
running build_ext
running install_lib
creating /Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/__init__.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/_driver.so ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/autoinit.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/compiler.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/cumath.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/curandom.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/driver.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/elementwise.py ->
/Library/Python/2.5/site-packages/pycuda
creating /Library/Python/2.5/site-packages/pycuda/gl
copying build/lib.macosx-10.5-i386-2.5/pycuda/gl/__init__.py ->
/Library/Python/2.5/site-packages/pycuda/gl
copying build/lib.macosx-10.5-i386-2.5/pycuda/gl/autoinit.py ->
/Library/Python/2.5/site-packages/pycuda/gl
copying build/lib.macosx-10.5-i386-2.5/pycuda/gpuarray.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/reduction.py ->
/Library/Python/2.5/site-packages/pycuda
copying build/lib.macosx-10.5-i386-2.5/pycuda/tools.py ->
/Library/Python/2.5/site-packages/pycuda
byte-compiling /Library/Python/2.5/site-packages/pycuda/__init__.py to
__init__.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/autoinit.py to
autoinit.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/compiler.py to
compiler.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/cumath.py to
cumath.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/curandom.py to
curandom.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/driver.py to
driver.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/elementwise.py to
elementwise.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/gl/__init__.py to
__init__.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/gl/autoinit.py to
autoinit.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/gpuarray.py to
gpuarray.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/reduction.py to
reduction.pyc
byte-compiling /Library/Python/2.5/site-packages/pycuda/tools.py to
tools.pyc
running install_data
running install_egg_info
Writing /Library/Python/2.5/site-packages/pycuda-0.94beta-py2.5.egg-info
host47:pycuda ian$ python
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycuda
>>> pycuda.VERSION
(0, 94)
>>> pycuda.VERSION_STATUS
'beta'
host47:examples ian$ python demo.py
Traceback (most recent call last):
File "demo.py", line 22, in <module>
""")
File "/Library/Python/2.5/site-packages/pycuda/compiler.py", line 203, in
__init__
arch, code, cache_dir, include_dirs)
File "/Library/Python/2.5/site-packages/pycuda/compiler.py", line 188, in
compile
include_dirs = include_dirs + [_find_pycuda_include_path()]
File "/Library/Python/2.5/site-packages/pycuda/compiler.py", line 149, in
_find_pycuda_include_path
raise RuntimeError("could not find path to PyCUDA's C header files")
RuntimeError: could not find path to PyCUDA's C header files
Many thanks if you can help!
Ian.
--
Ian Ozsvald (Professional Screencaster)
[email protected]
http://ProCasts.co.uk/examples.html
http://TheScreencastingHandbook.com
http://IanOzsvald.com + http://ShowMeDo.com
http://twitter.com/ianozsvald
_______________________________________________
PyCUDA mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net