Discussion:
[theano-users] pygpu.gpuarray.GpuArrayException: Unknown device
Øystein Schønning-Johansen
2017-03-30 18:16:13 UTC
Permalink
Hi all!

Today I got the 'strange' error message when importing theano. This has worked perfectly before,

I've built theano and libgpuarray from git sources. I've even recompiled from the today's repo code, but I get the same error every time.

Any hints?


Thanks,

-Øystein


[***@jupiter libgpuarray-git]$ python
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 164, in <module>
use(config.device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 151, in use
init_dev(device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 60, in init_dev
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init (pygpu/gpuarray.c:9419)
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init (pygpu/gpuarray.c:9110)
File "pygpu/gpuarray.pyx", line 1021, in pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
pygpu.gpuarray.GpuArrayException: Unknown device error: -1
[***@jupiter libgpuarray-git]$ cat ~/.theanorc
[global]
floatX = float32
device = cuda
allow_gc = False
[lib]
cnmem=1.0
--
---
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Pascal Lamblin
2017-03-30 18:26:00 UTC
Permalink
Are you able to run other CUDA programs on that GPU, for instance devicQuery (source included in cuda SDK)?
What does deviceQuery return, vs nvidia-smi?
Post by Øystein Schønning-Johansen
Hi all!
Today I got the 'strange' error message when importing theano. This has worked perfectly before,
I've built theano and libgpuarray from git sources. I've even recompiled from the today's repo code, but I get the same error every time.
Any hints?
Thanks,
-Øystein
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 164, in <module>
use(config.device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 151, in use
init_dev(device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 60, in init_dev
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init (pygpu/gpuarray.c:9419)
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init (pygpu/gpuarray.c:9110)
File "pygpu/gpuarray.pyx", line 1021, in pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
pygpu.gpuarray.GpuArrayException: Unknown device error: -1
[global]
floatX = float32
device = cuda
allow_gc = False
[lib]
cnmem=1.0
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
For more options, visit https://groups.google.com/d/optout.
--
Pascal
--
---
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Øystein Schønning-Johansen
2017-03-30 19:39:31 UTC
Permalink
Thanks for answering, Pascal.

Just before I ran deviceQuery and nvidia-smi, I did a reboot of the computer,
and guess what?
[***@jupiter release]$ *python*
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
Post by Pascal Lamblin
Post by Øystein Schønning-Johansen
*import theano*
*Using cuDNN version 5105 on context None*
*Mapped name None to device cuda: GeForce GTX 1080 (0000:02:00.0)*

It works again! I guess the reboot helped.

I've no idea what triggered the bug in the first place. I might have had a
nvidia driver upgrade pending a reboot or something.

Thanks anyway,
-Øystein
Post by Pascal Lamblin
Are you able to run other CUDA programs on that GPU, for instance
devicQuery (source included in cuda SDK)?
What does deviceQuery return, vs nvidia-smi?
Post by Øystein Schønning-Johansen
Hi all!
Today I got the 'strange' error message when importing theano. This has
worked perfectly before,
Post by Øystein Schønning-Johansen
I've built theano and libgpuarray from git sources. I've even recompiled
from the today's repo code, but I get the same error every time.
Post by Øystein Schønning-Johansen
Any hints?
Thanks,
-Øystein
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 164, in <module>
Post by Øystein Schønning-Johansen
use(config.device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 151, in use
Post by Øystein Schønning-Johansen
init_dev(device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 60, in init_dev
Post by Øystein Schønning-Johansen
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init
(pygpu/gpuarray.c:9419)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init
(pygpu/gpuarray.c:9110)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 1021, in
pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
Post by Øystein Schønning-Johansen
pygpu.gpuarray.GpuArrayException: Unknown device error: -1
[global]
floatX = float32
device = cuda
allow_gc = False
[lib]
cnmem=1.0
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
Post by Øystein Schønning-Johansen
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Pascal
--
---
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-03-31 12:53:28 UTC
Permalink
lib.cnmem isn't used by the new backend. Use gpuarray.preallocate instead.

Fred
Post by Øystein Schønning-Johansen
Thanks for answering, Pascal.
Just before I ran deviceQuery and nvidia-smi, I did a reboot of the computer,
and guess what?
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
Post by Øystein Schønning-Johansen
*import theano*
*Using cuDNN version 5105 on context None*
*Mapped name None to device cuda: GeForce GTX 1080 (0000:02:00.0)*
It works again! I guess the reboot helped.
I've no idea what triggered the bug in the first place. I might have had a
nvidia driver upgrade pending a reboot or something.
Thanks anyway,
-Øystein
Are you able to run other CUDA programs on that GPU, for instance
devicQuery (source included in cuda SDK)?
What does deviceQuery return, vs nvidia-smi?
Post by Øystein Schønning-Johansen
Hi all!
Today I got the 'strange' error message when importing theano. This has
worked perfectly before,
Post by Øystein Schønning-Johansen
I've built theano and libgpuarray from git sources. I've even recompiled
from the today's repo code, but I get the same error every time.
Post by Øystein Schønning-Johansen
Any hints?
Thanks,
-Øystein
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 164, in <module>
Post by Øystein Schønning-Johansen
use(config.device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 151, in use
Post by Øystein Schønning-Johansen
init_dev(device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 60, in init_dev
Post by Øystein Schønning-Johansen
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init
(pygpu/gpuarray.c:9419)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init
(pygpu/gpuarray.c:9110)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 1021, in
pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
Post by Øystein Schønning-Johansen
pygpu.gpuarray.GpuArrayException: Unknown device error: -1
[global]
floatX = float32
device = cuda
allow_gc = False
[lib]
cnmem=1.0
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
Post by Øystein Schønning-Johansen
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Pascal
--
---
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
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
El Houssine Talab
2017-09-15 10:18:24 UTC
Permalink
Hi, can you please elaborate how to implement the solution you are
suggesting? Thank you.
Post by Frédéric Bastien
lib.cnmem isn't used by the new backend. Use gpuarray.preallocate instead.
Fred
Post by Øystein Schønning-Johansen
Thanks for answering, Pascal.
Just before I ran deviceQuery and nvidia-smi, I did a reboot of the computer,
and guess what?
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
Post by Pascal Lamblin
Post by Øystein Schønning-Johansen
*import theano*
*Using cuDNN version 5105 on context None*
*Mapped name None to device cuda: GeForce GTX 1080 (0000:02:00.0)*
It works again! I guess the reboot helped.
I've no idea what triggered the bug in the first place. I might have had
a nvidia driver upgrade pending a reboot or something.
Thanks anyway,
-Øystein
Post by Pascal Lamblin
Are you able to run other CUDA programs on that GPU, for instance
devicQuery (source included in cuda SDK)?
What does deviceQuery return, vs nvidia-smi?
Post by Øystein Schønning-Johansen
Hi all!
Today I got the 'strange' error message when importing theano. This
has worked perfectly before,
Post by Øystein Schønning-Johansen
I've built theano and libgpuarray from git sources. I've even
recompiled from the today's repo code, but I get the same error every time.
Post by Øystein Schønning-Johansen
Any hints?
Thanks,
-Øystein
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 164, in <module>
Post by Øystein Schønning-Johansen
use(config.device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 151, in use
Post by Øystein Schønning-Johansen
init_dev(device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 60, in init_dev
Post by Øystein Schønning-Johansen
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init
(pygpu/gpuarray.c:9419)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init
(pygpu/gpuarray.c:9110)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 1021, in
pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
Post by Øystein Schønning-Johansen
pygpu.gpuarray.GpuArrayException: Unknown device error: -1
[global]
floatX = float32
device = cuda
allow_gc = False
[lib]
cnmem=1.0
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
Pascal
--
---
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
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Øystein Schønning-Johansen
2017-09-15 10:21:18 UTC
Permalink
@El Houssine Talab:
Reboot your computer. That helped me!
-Ø

On Fri, Sep 15, 2017 at 12:18 PM, El Houssine Talab <
Post by El Houssine Talab
Hi, can you please elaborate how to implement the solution you are
suggesting? Thank you.
Post by Frédéric Bastien
lib.cnmem isn't used by the new backend. Use gpuarray.preallocate instead.
Fred
Post by Øystein Schønning-Johansen
Thanks for answering, Pascal.
Just before I ran deviceQuery and nvidia-smi, I did a reboot of the computer,
and guess what?
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
Post by Pascal Lamblin
Post by Øystein Schønning-Johansen
*import theano*
*Using cuDNN version 5105 on context None*
*Mapped name None to device cuda: GeForce GTX 1080 (0000:02:00.0)*
It works again! I guess the reboot helped.
I've no idea what triggered the bug in the first place. I might have had
a nvidia driver upgrade pending a reboot or something.
Thanks anyway,
-Øystein
Post by Pascal Lamblin
Are you able to run other CUDA programs on that GPU, for instance
devicQuery (source included in cuda SDK)?
What does deviceQuery return, vs nvidia-smi?
Post by Øystein Schønning-Johansen
Hi all!
Today I got the 'strange' error message when importing theano. This
has worked perfectly before,
Post by Øystein Schønning-Johansen
I've built theano and libgpuarray from git sources. I've even
recompiled from the today's repo code, but I get the same error every time.
Post by Øystein Schønning-Johansen
Any hints?
Thanks,
-Øystein
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more
information.
Post by Øystein Schønning-Johansen
import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 164, in <module>
Post by Øystein Schønning-Johansen
use(config.device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 151, in use
Post by Øystein Schønning-Johansen
init_dev(device)
File "/usr/lib/python3.6/site-packages/theano/gpuarray/__init__.py",
line 60, in init_dev
Post by Øystein Schønning-Johansen
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init
(pygpu/gpuarray.c:9419)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init
(pygpu/gpuarray.c:9110)
Post by Øystein Schønning-Johansen
File "pygpu/gpuarray.pyx", line 1021, in
pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
Post by Øystein Schønning-Johansen
pygpu.gpuarray.GpuArrayException: Unknown device error: -1
[global]
floatX = float32
device = cuda
allow_gc = False
[lib]
cnmem=1.0
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
Pascal
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to a topic in the
Google Groups "theano-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/theano-users/-_YFZsTfwxY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...