New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR (theano.gpuarray): Could not initialize pygpu, support disabled #5928

Closed
jiqiujia opened this Issue May 9, 2017 · 11 comments

Comments

Projects
None yet
6 participants
@jiqiujia

jiqiujia commented May 9, 2017

I use the latest theano 0.9. And I set .theanorc as follows as suggested by http://deeplearning.net/software/theano/tutorial/using_gpu.html
[global] floatX=float32 device=cuda cast_policy=numpy+floatX [nvcc] fastmath=True arch=sm_50 optimizer=fast_compile

But I got the following error:

ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "/home/dl/anaconda2/lib/python2.7/site-packages/theano/gpuarray/init.py", line 175, in
use(config.device)
File "/home/dl/anaconda2/lib/python2.7/site-packages/theano/gpuarray/init.py", line 162, in use
init_dev(device, preallocate=preallocate)
File "/home/dl/anaconda2/lib/python2.7/site-packages/theano/gpuarray/init.py", line 65, in init_dev
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init (pygpu/gpuarray.c:9415)
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init (pygpu/gpuarray.c:9106)
File "pygpu/gpuarray.pyx", line 1021, in pygpu.gpuarray.GpuContext.cinit (pygpu/gpuarray.c:13468)
GpuArrayException: Unknown device error: -1

If I set device=cuda0, the program goes well.
By the way, I install the libgpuarray backend using conda install pygpu and I have three nvidia xp cards installed.

@jiqiujia

This comment has been minimized.

Show comment
Hide comment
@jiqiujia

jiqiujia May 9, 2017

I update the graphic card driver to 375 and everything goes well now. But I wonder if there is a feasible way to specify which card to use programmatically?

jiqiujia commented May 9, 2017

I update the graphic card driver to 375 and everything goes well now. But I wonder if there is a feasible way to specify which card to use programmatically?

@lamblin

This comment has been minimized.

Show comment
Hide comment
@lamblin

lamblin May 9, 2017

Member

You could use device=cpu, and then manually call theano.gpuarray.use() after you determine which GPU you want.

Member

lamblin commented May 9, 2017

You could use device=cpu, and then manually call theano.gpuarray.use() after you determine which GPU you want.

@lamblin lamblin closed this May 9, 2017

@alyato

This comment has been minimized.

Show comment
Hide comment
@alyato

alyato Jun 5, 2017

hi i meet this error.
Then i run the python -c "import pygpu;pygpu.test()"
it show me that
34

like:https://stackoverflow.com/questions/43577788/error-loading-library-gpuarray-with-theano

my os is 14.04, the version of cuda is 7.0
how to solve it ? THanks.

alyato commented Jun 5, 2017

hi i meet this error.
Then i run the python -c "import pygpu;pygpu.test()"
it show me that
34

like:https://stackoverflow.com/questions/43577788/error-loading-library-gpuarray-with-theano

my os is 14.04, the version of cuda is 7.0
how to solve it ? THanks.

@jiqiujia

This comment has been minimized.

Show comment
Hide comment
@jiqiujia

jiqiujia Jun 5, 2017

@alyato It seems that you are using the system python environment and you install pygpu by pip. I would suggest you do as the answer said from the link you post. That is,

completely uninstall python [ If you use the system python environment, don't do this, or your system will crash ]
install cuda 8.0 (with cudnn 5.1)
install anaconda
install theano through anaconda: conda install theano pygpu

jiqiujia commented Jun 5, 2017

@alyato It seems that you are using the system python environment and you install pygpu by pip. I would suggest you do as the answer said from the link you post. That is,

completely uninstall python [ If you use the system python environment, don't do this, or your system will crash ]
install cuda 8.0 (with cudnn 5.1)
install anaconda
install theano through anaconda: conda install theano pygpu

@nouiz

This comment has been minimized.

Show comment
Hide comment
@nouiz

nouiz Jun 5, 2017

Member
Member

nouiz commented Jun 5, 2017

@alyato

This comment has been minimized.

Show comment
Hide comment
@alyato

alyato Jun 6, 2017

@nouiz @jiqiujia Thanks. It works now.

alyato commented Jun 6, 2017

@nouiz @jiqiujia Thanks. It works now.

@alyato

This comment has been minimized.

Show comment
Hide comment
@alyato

alyato Jun 6, 2017

hi @nouiz ,i meet another question by installing libgpyarray in another os.
when i run python setup.py build in libgpuarray
it show me that

Exception: cython is too old or not installed (at least 0.25 required)

Then i install the cython.

cython --version
Cython version 0.25.1

Then i rerun python setup.py build ,it also show me the same error.

Exception: cython is too old or not installed (at least 0.25 required)

it's so crazy. Do you give me some advice? Thanks.

alyato commented Jun 6, 2017

hi @nouiz ,i meet another question by installing libgpyarray in another os.
when i run python setup.py build in libgpuarray
it show me that

Exception: cython is too old or not installed (at least 0.25 required)

Then i install the cython.

cython --version
Cython version 0.25.1

Then i rerun python setup.py build ,it also show me the same error.

Exception: cython is too old or not installed (at least 0.25 required)

it's so crazy. Do you give me some advice? Thanks.

@lamblin

This comment has been minimized.

Show comment
Hide comment
@lamblin

lamblin Jun 9, 2017

Member

You may have more than one version of cython installed. The one first picked up in the command line may not be the same as the one imported from python.

Member

lamblin commented Jun 9, 2017

You may have more than one version of cython installed. The one first picked up in the command line may not be the same as the one imported from python.

@Lan1991Xu

This comment has been minimized.

Show comment
Hide comment
@Lan1991Xu

Lan1991Xu Oct 10, 2017

Hi @jiqiujia. I meet the same problem, but my Driver Version already : 375.66. So any suggestions about this situation

Lan1991Xu commented Oct 10, 2017

Hi @jiqiujia. I meet the same problem, but my Driver Version already : 375.66. So any suggestions about this situation

@nouiz

This comment has been minimized.

Show comment
Hide comment
@nouiz

nouiz Oct 10, 2017

Member

Install Theano dev version of the last beta. This should include the fix. Don'T use Theano 0.9

Member

nouiz commented Oct 10, 2017

Install Theano dev version of the last beta. This should include the fix. Don'T use Theano 0.9

@wyichew2708

This comment has been minimized.

Show comment
Hide comment
@wyichew2708

wyichew2708 Dec 22, 2017

I spent 1 day try to solve this problem.
Finally, i decided to change device = cpu.
easy way, although it's compiled slower than gpu.

wyichew2708 commented Dec 22, 2017

I spent 1 day try to solve this problem.
Finally, i decided to change device = cpu.
easy way, although it's compiled slower than gpu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment