Why are you using "sudo python". libgpuarray and/or pygpu do not require root priviledges and shouldn't be run as root. This is why it can't find the library in the first case (since sudo remove LD_LIBRARY_PATH from the environment).
For the second problem, "Unknown error" during context initialization means that the GPU cannot be used for computation (ie it is prohibited or in exclusive mode and busy). If that is not the case, then please post the output of "nvcc --version" and "nvidia-smi", preferably not as root. 2016-08-16 17:48 GMT-04:00 Nikita Pustovoytov <[email protected]>: > Hi Dave, > > Did you manage to solve the last error (ERROR: Failure: GpuArrayException > (Unknown error))? > > I encountered exactly the same problem on Fedora 24 with Bumblebee drivers > and have no idea how to solve it... > > понедельник, 25 августа 2014 г., 18:35:47 UTC+4 пользователь Dave Lauer > написал: > >> Yep, that did it. Of course, now I'm getting other errors: >> >> % sudo LD_LIBRARY_PATH=/src/pylearn2/libgpuarray/lib python -c "import >> pygpu;pygpu.test()" >> ✹ ✭ >> pygpu is installed in /usr/local/lib/python2.7/dist- >> packages/pygpu-0.2.1-py2.7-linux-x86_64.egg/pygpu >> NumPy version 1.8.1 >> NumPy is installed in /usr/lib/python2.7/dist-packages/numpy >> Python version 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] >> nose version 1.3.1 >> EEEE...............................EE >> ====================================================================== >> ERROR: Failure: GpuArrayException (Unknown error) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 411, in >> loadTestsFromName >> addr.filename, addr.module) >> File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in >> importFromPath >> return self.importFromDir(dir_path, fqname) >> File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in >> importFromDir >> mod = load_module(part_fqname, fh, filename, desc) >> File "/usr/local/lib/python2.7/dist-packages/pygpu-0.2.1-py2.7- >> linux-x86_64.egg/pygpu/tests/test_blas.py", line 3, in <module> >> from .support import (guard_devsup, gen_gpuarray, context) >> File "/usr/local/lib/python2.7/dist-packages/pygpu-0.2.1-py2.7- >> linux-x86_64.egg/pygpu/tests/support.py", line 32, in <module> >> context = gpuarray.init(get_env_dev()) >> File "gpuarray.pyx", line 575, in pygpu.gpuarray.init >> (pygpu/gpuarray.c:7315) >> File "gpuarray.pyx", line 546, in pygpu.gpuarray.pygpu_init >> (pygpu/gpuarray.c:7244) >> File "gpuarray.pyx", line 950, in pygpu.gpuarray.GpuContext.__cinit__ >> (pygpu/gpuarray.c:10818) >> GpuArrayException: Unknown error >> >> >> On Monday, August 25, 2014 10:14:35 AM UTC-4, Olivier Delalleau wrote: >>> >>> Is the folder containing libgpuarray.so in your LD_LIBRARY_PATH? >>> >>> -=- Olivier >>> >>> >>> 2014-08-25 9:23 GMT-04:00 Dave Lauer <[email protected]>: >>> >>>> Hi, >>>> >>>> I've followed the instructions for installing libgpuarray with no >>>> problems, once I made the same fix described in this topic for pthread: >>>> https://groups.google.com/forum/#!topic/theano-users/nEr9PqQF880 >>>> >>>> I then build and install pygpu, again with no errors (at least as far >>>> as I can tell). However when I try to test pygpu, I get this error: >>>> >>>> % sudo python -c "import pygpu;pygpu.test()" >>>> Traceback (most recent call last): >>>> File "<string>", line 1, in <module> >>>> File "/usr/local/lib/python2.7/dist-packages/pygpu-0.2.1-py2.7- >>>> linux-x86_64.egg/pygpu/__init__.py", line 7, in <module> >>>> from . import gpuarray >>>> ImportError: libgpuarray.so: cannot open shared object file: No such >>>> file or directory >>>> >>>> >>>> I see the same issue when trying to import via python command line: >>>> >>>> % sudo python >>>> Python 2.7.6 (default, Mar 22 2014, 22:59:56) >>>> [GCC 4.8.2] on linux2 >>>> Type "help", "copyright", "credits" or "license" for more information. >>>> >>> import gpuarray >>>> Traceback (most recent call last): >>>> File "<stdin>", line 1, in <module> >>>> ImportError: No module named gpuarray >>>> >>>> >>>> I'm stuck! >>>> >>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "theano-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- > > --- > You received this message because you are subscribed to the Google Groups > "theano-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
