albeam <[email protected]> writes:
> I'm having issues getting pycuda to run properly. I had issues installing,
> which I suspect is the root of my issue now. Following these instructions: 
>
> http://wiki.tiker.net/PyCuda/Installation/Linux/Ubuntu
>
> I had to remove the last configuration flag --no-use-shipped-boost, because
> it said there was no such argument. Also, I'm not using python3, so I
> changed all references to python.

The flag should exist if you don't already have a PyCUDA configuration
sitting around (siteconf.py, ~/.aksetup-defaults.py).

> Doing that, I got it to install. I can import all of the tools, but when I
> try to get to the SourceModule reference in demo.py, I get the following
> error:
>
> Traceback (most recent call last):
>   File "hello_gpu.py", line 14, in <module>
>     """)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-2013.1-py2.7-linux-x86_64.egg/pycuda/compiler.py",
> line 262, in __init__
>     arch, code, cache_dir, include_dirs)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-2013.1-py2.7-linux-x86_64.egg/pycuda/compiler.py",
> line 252, in compile
>     return compile_plain(source, options, keep, nvcc, cache_dir)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-2013.1-py2.7-linux-x86_64.egg/pycuda/compiler.py",
> line 134, in compile_plain
>     cmdline, stdout=stdout.decode("utf-8"), stderr=stderr.decode("utf-8"))
> pycuda.driver.CompileError: nvcc compilation of /tmp/tmpxghGAe/kernel.cu
> failed
> [command: nvcc --cubin -arch sm_30
> -I/usr/local/lib/python2.7/dist-packages/pycuda-2013.1-py2.7-linux-x86_64.egg/pycuda/cuda
> kernel.cu]
> [stderr:
> nvcc fatal   : Value 'sm_30' is not defined for option 'gpu-architecture'
> ]
>
> If I change the shader model to a smaller value, e.g. sm_21, I get the
> following error:
>
>>>> mod = SourceModule(
> ... """
> ... __global__ void multiply_them(float *dest, float *a, float *b)
> ... {
> ...   const int i = threadIdx.x;
> ...   dest[i] = a[i] * b[i];
> ... }
> ... """,arch="sm_21")
> Traceback (most recent call last):
>   File "<stdin>", line 8, in <module>
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-2013.1-py2.7-linux-x86_64.egg/pycuda/compiler.py",
> line 265, in __init__
>     self.module = module_from_buffer(cubin)
> pycuda._driver.LogicError: cuModuleLoadDataEx failed: invalid source - 
>
> Can someone point me to a resource to fix this?

This looks like your CUDA toolkit is too old. Specifically, your GPU
appears to be a Kepler (compute capability 3.0), but hte nvcc you've got
installed apparently can't generated code for that. My best guess for a
fix: Upgrade the CUDA toolkit.

HTH,
Andreas

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to