Just found out that I was using the latest cudatoolkit and this happend to be incompatible with the latest available pycuda module.
With cudatoolkit_3.2.16_linux_64_ubuntu10.04 i have no problems so far...
I think my real problem starts with the nvidia driver, as I think the normal proprietary driver is not enough...
trying something from the examples like:
Code: Alles auswählen
import pycuda.autoinit
import pycuda.driver as drv
import numpy
from pycuda.compiler import SourceModule
mod = SourceModule("""
__global__ void multiply_them(float *dest, float *a, float *b)
{
const int i = threadIdx.x;
dest[i] = a[i] * b[i];
}
""")
multiply_them = mod.get_function("multiply_them")
a = numpy.random.randn(400).astype(numpy.float32)
b = numpy.random.randn(400).astype(numpy.float32)
dest = numpy.zeros_like(a)
multiply_them(
drv.Out(dest), drv.In(a), drv.In(b),
block=(400,1,1), grid=(1,1))
print dest-a*b
Gives:
Traceback (most recent call last):
File "/home/jeckstein/Dokumente/pycuda/autoinit.py", line 17, in <module>
""")
File "/usr/local/lib/python2.6/dist-packages/pycuda-0.94.2-py2.6-linux-x86_64.egg/pycuda/compiler.py", line 238, in __init__
arch, code, cache_dir, include_dirs)
File "/usr/local/lib/python2.6/dist-packages/pycuda-0.94.2-py2.6-linux-x86_64.egg/pycuda/compiler.py", line 228, in compile
return compile_plain(source, options, keep, nvcc, cache_dir)
File "/usr/local/lib/python2.6/dist-packages/pycuda-0.94.2-py2.6-linux-x86_64.egg/pycuda/compiler.py", line 47, in compile_plain
checksum.update(get_nvcc_version(nvcc))
File "<string>", line 2, in get_nvcc_version
File "/usr/local/lib/python2.6/dist-packages/pytools-2011.3-py2.6.egg/pytools/__init__.py", line 309, in memoize
result = func(*args)
File "/usr/local/lib/python2.6/dist-packages/pycuda-0.94.2-py2.6-linux-x86_64.egg/pycuda/compiler.py", line 21, in get_nvcc_version
% (nvcc, str(e)))
OSError: nvcc was not found (is it on the PATH?) [error invoking 'nvcc --version': [Errno 2] No such file or directory]
Script terminated.
the PATH is correctly set and also the LD_LIBRARY_PATH and i also tried the PYTHONPATH to set for the location of nvcc...
I have no Idea now where to go, please help anyone?
SOLVED: in Ubuntu 10.10 the default python is of version 2.6.6, after installing 2.7 it works now...