Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-30 Thread Pascal Lamblin


On Friday, June 30, 2017 at 9:50:58 PM UTC-4, Daniel Seita wrote:
>
> your plan worked!
>

Nice to hear that :)
 

> Pascal and nouiz, just one last thing, this GPU backend is the first time 
> that Theano can run float64 with the GPU, right? I'm hoping to take 
> existing code which uses float64 only and running it on the GPU. (That's 
> why I've been using the CPU recently, to use float64.)
>

Yes, indeed.
Note that float64 performance can be much slower than float32, depending on 
the GPU. For instance, on a Titan X (Pascal), it would be 32x slower than 
float32, K40 and K80 should be only 3x slower, and P100 / GP100 2x slower.
 

>
>
>
> On Friday, June 30, 2017 at 6:48:08 PM UTC-7, Daniel Seita wrote:
>>
>> Hi nouiz and Pascal, thanks for the responses. I've been busy using the 
>> CPU version of Theano in the meantime, so sorry for the delay in responding.
>>
>> nouiz:
>>
>> I actually had my `cudnn.h` file in both a `lib64` directory and an 
>> `include` directory:
>>
>> ~$ ls -lh /usr/local/cuda-8.0/include/cudnn.h 
>> -r--r--r-- 1 root root 98K Oct 17  2016 /usr/local/cuda-8.0/include/cudnn
>> .h
>> ~$ ls -lh /usr/local/cuda-8.0/lib64/cudnn.h 
>> -r--r--r-- 1 root root 98K Oct 17  2016 /usr/local/cuda-8.0/lib64/cudnn.h
>>
>> I must have copied them to both when I was installing it. Also, here is 
>> my error message in full, assuming that my `~/.theanorc` file is
>>
>> ~$ cat ~/.theanorc
>> [global]
>> device = cuda
>> floatX = float64
>>
>> [cuda]
>> root = /usr/local/cuda-8.0
>> ~$ ipython
>> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) 
>> Type "copyright", "credits" or "license" for more information.
>>
>> IPython 5.3.0 -- An enhanced Interactive Python.
>> ? -> Introduction and overview of IPython's features.
>> %quickref -> Quick reference.
>> help  -> Python's own help system.
>> object?   -> Details about 'object', use 'object??' for extra details.
>>
>> In [1]: import theano
>> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
>> Traceback (most recent call last):
>>   File 
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>> , line 164, in 
>> use(config.device)
>>   File 
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>> , line 151, in use
>> init_dev(device)
>>   File 
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>> , line 68, in init_dev
>> context.cudnn_handle = dnn._make_handle(context)
>>   File 
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
>> , line 80, in _make_handle
>> cudnn = _dnn_lib()
>>   File 
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
>> , line 67, in _dnn_lib
>> raise RuntimeError('Could not find cudnn library (looked for v5[.1])'
>> )
>> RuntimeError: Could not find cudnn library (looked for v5[.1])
>>
>> This happens if I also set the device to be `cuda0` instead of `cuda`, 
>> and trying with `float32` instead of `float64`.
>>
>>
>>
>>
>> On Friday, June 30, 2017 at 5:43:35 PM UTC-7, Pascal Lamblin wrote:
>>>
>>> Something weird seems to be happening:
>>> - theano detects that cuDNN is available, in fact it called 
>>> _dnn_check_compile() and _dnn_check_version() successfully
>>> - however, calling _dnn_lib() failed, which means ctypes did not manage 
>>> to find the cudnn library.
>>>
>>> Is /usr/local/cuda-8.0/lib64 in your LIBRARY_PATH (in addition to 
>>> LD_LIBRARY_PATH)?
>>>
>>> On Monday, June 19, 2017 at 6:16:37 PM UTC-4, nouiz wrote:

 Your cudnn.h file should not be in the lib64 directory, but in an 
 include directory. Tensorflow does none standard stuff related to import 
 and cause problem in other setup, but it seem to tolerate your non 
 standard 
 setup. Theano does the standard setup.

 You can use the Theano flag dnn.include_path and dnn.library_path to 
 tell Theano where your cudnn.h and cudnn.so* files are.

 I did not see your last error in full.

 Le ven. 16 juin 2017 19:35, Daniel Seita  a 
 écrit :

> Ack, sorry, half of my post got deleted! Hopefully you can still see 
> it (i can find it by looking at the original post but it's in a really 
> ugly 
> format, sorry).
>
>
>
> On Friday, June 16, 2017 at 4:33:20 PM UTC-7, Daniel Seita wrote:
>
>> I was running into some more difficulties, so I gave up on getting 
>> this to work and tried to uninstall and then reinstall Theano. Just to 
>> be 
>> extra clear, here is my setup:
>>
>>- Ubuntu 16.04
>>- Cuda 8.0, stored in `usr/local/cuda-8.0`
>>- Titan X GPU with Pascal
>>
>> cuDNN is here:
>>
>> $ ls /usr/local/cuda-8.0/lib64/cudnn.h 
>> /usr/local/cuda-8.0/lib64/cudnn.h
>>
>> To verify that I can use my GPU I started this quick TensorFlow 
>> computation:
>>

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-30 Thread Daniel Seita
Pascal:

your plan worked! I previously had:

$ echo $LD_LIBRARY_PATH 
/usr/local/lib:/usr/local/cuda-8.0:/usr/local/cuda-8.0/lib64:/usr/local/cuda
-8.0/include:/home/daniel/mjpro131/bin:/home/daniel/mjpro131
~$ echo $LIBRARY_PATH 
/usr/local/cuda/lib64


AH! My library path actually had `cuda` and not `cuda-8.0`. Gh. I reset 
my bashrc file with the correct cuda folder and:


$ cat ~/.theanorc
[global]
device = cuda
floatX = float64

[cuda]
root = /usr/local/cuda-8.0
~$ ipython
Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) 
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import theano
Using cuDNN version 5105 on context None
Mapped name None to device cuda: TITAN X (Pascal) (:01:00.0)

In [2]: 



Awesome! No wonder this was a problem, it was a bit hard for me to see. 
Anyway I think things look OK. Thank you very much.

Pascal and nouiz, just one last thing, this GPU backend is the first time 
that Theano can run float64 with the GPU, right? I'm hoping to take 
existing code which uses float64 only and running it on the GPU. (That's 
why I've been using the CPU recently, to use float64.)



On Friday, June 30, 2017 at 6:48:08 PM UTC-7, Daniel Seita wrote:
>
> Hi nouiz and Pascal, thanks for the responses. I've been busy using the 
> CPU version of Theano in the meantime, so sorry for the delay in responding.
>
> nouiz:
>
> I actually had my `cudnn.h` file in both a `lib64` directory and an 
> `include` directory:
>
> ~$ ls -lh /usr/local/cuda-8.0/include/cudnn.h 
> -r--r--r-- 1 root root 98K Oct 17  2016 /usr/local/cuda-8.0/include/cudnn.
> h
> ~$ ls -lh /usr/local/cuda-8.0/lib64/cudnn.h 
> -r--r--r-- 1 root root 98K Oct 17  2016 /usr/local/cuda-8.0/lib64/cudnn.h
>
> I must have copied them to both when I was installing it. Also, here is my 
> error message in full, assuming that my `~/.theanorc` file is
>
> ~$ cat ~/.theanorc
> [global]
> device = cuda
> floatX = float64
>
> [cuda]
> root = /usr/local/cuda-8.0
> ~$ ipython
> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) 
> Type "copyright", "credits" or "license" for more information.
>
> IPython 5.3.0 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
>
> In [1]: import theano
> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
> Traceback (most recent call last):
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 164, in 
> use(config.device)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 151, in use
> init_dev(device)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 68, in init_dev
> context.cudnn_handle = dnn._make_handle(context)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
> , line 80, in _make_handle
> cudnn = _dnn_lib()
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
> , line 67, in _dnn_lib
> raise RuntimeError('Could not find cudnn library (looked for v5[.1])')
> RuntimeError: Could not find cudnn library (looked for v5[.1])
>
> This happens if I also set the device to be `cuda0` instead of `cuda`, and 
> trying with `float32` instead of `float64`.
>
>
>
>
> On Friday, June 30, 2017 at 5:43:35 PM UTC-7, Pascal Lamblin wrote:
>>
>> Something weird seems to be happening:
>> - theano detects that cuDNN is available, in fact it called 
>> _dnn_check_compile() and _dnn_check_version() successfully
>> - however, calling _dnn_lib() failed, which means ctypes did not manage 
>> to find the cudnn library.
>>
>> Is /usr/local/cuda-8.0/lib64 in your LIBRARY_PATH (in addition to 
>> LD_LIBRARY_PATH)?
>>
>> On Monday, June 19, 2017 at 6:16:37 PM UTC-4, nouiz wrote:
>>>
>>> Your cudnn.h file should not be in the lib64 directory, but in an 
>>> include directory. Tensorflow does none standard stuff related to import 
>>> and cause problem in other setup, but it seem to tolerate your non standard 
>>> setup. Theano does the standard setup.
>>>
>>> You can use the Theano flag dnn.include_path and dnn.library_path to 
>>> tell Theano where your cudnn.h and cudnn.so* files are.
>>>
>>> I did not see your last error in full.
>>>
>>> Le ven. 16 juin 2017 19:35, Daniel Seita  a écrit :
>>>
 Ack, sorry, half of my post got deleted! Hopefully you can still see it 
 (i can find it by looking at the original post but it's in a really ugly 
 format, sorry).

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-30 Thread Daniel Seita
Hi nouiz and Pascal, thanks for the responses. I've been busy using the CPU 
version of Theano in the meantime, so sorry for the delay in responding.

nouiz:

I actually had my `cudnn.h` file in both a `lib64` directory and an 
`include` directory:

~$ ls -lh /usr/local/cuda-8.0/include/cudnn.h 
-r--r--r-- 1 root root 98K Oct 17  2016 /usr/local/cuda-8.0/include/cudnn.h
~$ ls -lh /usr/local/cuda-8.0/lib64/cudnn.h 
-r--r--r-- 1 root root 98K Oct 17  2016 /usr/local/cuda-8.0/lib64/cudnn.h

I must have copied them to both when I was installing it. Also, here is my 
error message in full, assuming that my `~/.theanorc` file is

~$ cat ~/.theanorc
[global]
device = cuda
floatX = float64

[cuda]
root = /usr/local/cuda-8.0
~$ ipython
Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) 
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
, line 164, in 
use(config.device)
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
, line 151, in use
init_dev(device)
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
, line 68, in init_dev
context.cudnn_handle = dnn._make_handle(context)
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py", 
line 80, in _make_handle
cudnn = _dnn_lib()
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py", 
line 67, in _dnn_lib
raise RuntimeError('Could not find cudnn library (looked for v5[.1])')
RuntimeError: Could not find cudnn library (looked for v5[.1])

This happens if I also set the device to be `cuda0` instead of `cuda`, and 
trying with `float32` instead of `float64`.




On Friday, June 30, 2017 at 5:43:35 PM UTC-7, Pascal Lamblin wrote:
>
> Something weird seems to be happening:
> - theano detects that cuDNN is available, in fact it called 
> _dnn_check_compile() and _dnn_check_version() successfully
> - however, calling _dnn_lib() failed, which means ctypes did not manage to 
> find the cudnn library.
>
> Is /usr/local/cuda-8.0/lib64 in your LIBRARY_PATH (in addition to 
> LD_LIBRARY_PATH)?
>
> On Monday, June 19, 2017 at 6:16:37 PM UTC-4, nouiz wrote:
>>
>> Your cudnn.h file should not be in the lib64 directory, but in an include 
>> directory. Tensorflow does none standard stuff related to import and cause 
>> problem in other setup, but it seem to tolerate your non standard setup. 
>> Theano does the standard setup.
>>
>> You can use the Theano flag dnn.include_path and dnn.library_path to tell 
>> Theano where your cudnn.h and cudnn.so* files are.
>>
>> I did not see your last error in full.
>>
>> Le ven. 16 juin 2017 19:35, Daniel Seita > > a écrit :
>>
>>> Ack, sorry, half of my post got deleted! Hopefully you can still see it 
>>> (i can find it by looking at the original post but it's in a really ugly 
>>> format, sorry).
>>>
>>>
>>>
>>> On Friday, June 16, 2017 at 4:33:20 PM UTC-7, Daniel Seita wrote:
>>>
 I was running into some more difficulties, so I gave up on getting this 
 to work and tried to uninstall and then reinstall Theano. Just to be extra 
 clear, here is my setup:

- Ubuntu 16.04
- Cuda 8.0, stored in `usr/local/cuda-8.0`
- Titan X GPU with Pascal

 cuDNN is here:

 $ ls /usr/local/cuda-8.0/lib64/cudnn.h 
 /usr/local/cuda-8.0/lib64/cudnn.h

 To verify that I can use my GPU I started this quick TensorFlow 
 computation:

 In [1]: import tensorflow as tf

 In [2]: tf.__version__
 Out[2]: '1.1.0'

 In [3]: tf.GPUOptions
 Out[3]: tensorflow.core.protobuf.config_pb2.GPUOptions

 In [4]: with tf.device('/gpu:0'):
...: a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3
 ], name='a')
...: b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2
 ], name='b')
...: c = tf.matmul(a,b)
...: 

 In [5]: with tf.Session() as sess:
...: print(sess.run(c))
...: 
 2017-06-16 16:10:54.402311: W tensorflow/core/platform/
 cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use 
 SSE4.1 instructions, but these are available on your machine and could 
 speed up CPU computations.
 2017-06-16 16:10:54.402328: W 
 tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library 
 wasn't compiled to use SSE4.2 instructions, but these are available on 
 your machine and

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-30 Thread Pascal Lamblin
Something weird seems to be happening:
- theano detects that cuDNN is available, in fact it called 
_dnn_check_compile() and _dnn_check_version() successfully
- however, calling _dnn_lib() failed, which means ctypes did not manage to 
find the cudnn library.

Is /usr/local/cuda-8.0/lib64 in your LIBRARY_PATH (in addition to 
LD_LIBRARY_PATH)?

On Monday, June 19, 2017 at 6:16:37 PM UTC-4, nouiz wrote:
>
> Your cudnn.h file should not be in the lib64 directory, but in an include 
> directory. Tensorflow does none standard stuff related to import and cause 
> problem in other setup, but it seem to tolerate your non standard setup. 
> Theano does the standard setup.
>
> You can use the Theano flag dnn.include_path and dnn.library_path to tell 
> Theano where your cudnn.h and cudnn.so* files are.
>
> I did not see your last error in full.
>
> Le ven. 16 juin 2017 19:35, Daniel Seita  a 
> écrit :
>
>> Ack, sorry, half of my post got deleted! Hopefully you can still see it 
>> (i can find it by looking at the original post but it's in a really ugly 
>> format, sorry).
>>
>>
>>
>> On Friday, June 16, 2017 at 4:33:20 PM UTC-7, Daniel Seita wrote:
>>
>>> I was running into some more difficulties, so I gave up on getting this 
>>> to work and tried to uninstall and then reinstall Theano. Just to be extra 
>>> clear, here is my setup:
>>>
>>>- Ubuntu 16.04
>>>- Cuda 8.0, stored in `usr/local/cuda-8.0`
>>>- Titan X GPU with Pascal
>>>
>>> cuDNN is here:
>>>
>>> $ ls /usr/local/cuda-8.0/lib64/cudnn.h 
>>> /usr/local/cuda-8.0/lib64/cudnn.h
>>>
>>> To verify that I can use my GPU I started this quick TensorFlow 
>>> computation:
>>>
>>> In [1]: import tensorflow as tf
>>>
>>> In [2]: tf.__version__
>>> Out[2]: '1.1.0'
>>>
>>> In [3]: tf.GPUOptions
>>> Out[3]: tensorflow.core.protobuf.config_pb2.GPUOptions
>>>
>>> In [4]: with tf.device('/gpu:0'):
>>>...: a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3
>>> ], name='a')
>>>...: b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2
>>> ], name='b')
>>>...: c = tf.matmul(a,b)
>>>...: 
>>>
>>> In [5]: with tf.Session() as sess:
>>>...: print(sess.run(c))
>>>...: 
>>> 2017-06-16 16:10:54.402311: W tensorflow/core/platform/cpu_feature_guard
>>> .cc:45] The TensorFlow library wasn't compiled to use SSE4.1 
>>> instructions, but these are available on your machine and could speed up 
>>> CPU computations.
>>> 2017-06-16 16:10:54.402328: W 
>>> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library 
>>> wasn't compiled to use SSE4.2 instructions, but these are available on 
>>> your machine and could speed up CPU computations.
>>> 2017-06-16 16:10:54.402346: W tensorflow/core/platform/cpu_feature_guard
>>> .cc:45] The TensorFlow library wasn't compiled to use AVX instructions, 
>>> but these are available on your machine and could speed up CPU computations.
>>> 2017-06-16 16:10:54.402350: W 
>>> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library 
>>> wasn't compiled to use AVX2 instructions, but these are available on 
>>> your machine and could speed up CPU computations.
>>> 2017-06-16 16:10:54.402356: W tensorflow/core/platform/cpu_feature_guard
>>> .cc:45] The TensorFlow library wasn't compiled to use FMA instructions, 
>>> but these are available on your machine and could speed up CPU computations.
>>> 2017-06-16 16:10:54.527167: I 
>>> tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA 
>>> node read from SysFS had negative value (-1), but there must be at least 
>>> one NUMA node, so returning NUMA node zero
>>> 2017-06-16 16:10:54.527553: I 
>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with 
>>> properties: 
>>> name: TITAN X (Pascal)
>>> major: 6 minor: 1 memoryClockRate (GHz) 1.531
>>> pciBusID :01:00.0
>>> Total memory: 11.90GiB
>>> Free memory: 11.38GiB
>>> 2017-06-16 16:10:54.527565: I 
>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 
>>> 2017-06-16 16:10:54.527568: I 
>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y 
>>> 2017-06-16 16:10:54.527590: I 
>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow 
>>> device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 
>>> :01:00.0)
>>> [[ 22.  28.]
>>>  [ 49.  64.]]
>>>
>>>
>>> This looks like it indicates a successful GPU and/or cuDNN installation.
>>>
>>> Great, now let's install the *development version* of Theano. The 
>>> instructions I'm following step-by-step: 
>>> http://deeplearning.net/software/theano_versions/dev/install_ubuntu.html
>>>
>>> The first step seems to be to install miniconda. I downloaded the bash 
>>> script for Python 2.7 and ran it:
>>>
>>> ~/Downloads$ bash Miniconda2-latest-Linux-x86_64.sh 
>>>
>>> Welcome to Miniconda2 4.3.21 (by Continuum Analytics, Inc.)
>>>
>>> In order to continue the installation process, please review the license
>>> agreem

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-19 Thread Frédéric Bastien
Your cudnn.h file should not be in the lib64 directory, but in an include
directory. Tensorflow does none standard stuff related to import and cause
problem in other setup, but it seem to tolerate your non standard setup.
Theano does the standard setup.

You can use the Theano flag dnn.include_path and dnn.library_path to tell
Theano where your cudnn.h and cudnn.so* files are.

I did not see your last error in full.

Le ven. 16 juin 2017 19:35, Daniel Seita  a écrit :

> Ack, sorry, half of my post got deleted! Hopefully you can still see it (i
> can find it by looking at the original post but it's in a really ugly
> format, sorry).
>
>
>
> On Friday, June 16, 2017 at 4:33:20 PM UTC-7, Daniel Seita wrote:
>
>> I was running into some more difficulties, so I gave up on getting this
>> to work and tried to uninstall and then reinstall Theano. Just to be extra
>> clear, here is my setup:
>>
>>- Ubuntu 16.04
>>- Cuda 8.0, stored in `usr/local/cuda-8.0`
>>- Titan X GPU with Pascal
>>
>> cuDNN is here:
>>
>> $ ls /usr/local/cuda-8.0/lib64/cudnn.h
>> /usr/local/cuda-8.0/lib64/cudnn.h
>>
>> To verify that I can use my GPU I started this quick TensorFlow
>> computation:
>>
>> In [1]: import tensorflow as tf
>>
>> In [2]: tf.__version__
>> Out[2]: '1.1.0'
>>
>> In [3]: tf.GPUOptions
>> Out[3]: tensorflow.core.protobuf.config_pb2.GPUOptions
>>
>> In [4]: with tf.device('/gpu:0'):
>>...: a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3],
>> name='a')
>>...: b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2],
>> name='b')
>>...: c = tf.matmul(a,b)
>>...:
>>
>> In [5]: with tf.Session() as sess:
>>...: print(sess.run(c))
>>...:
>> 2017-06-16 16:10:54.402311: W tensorflow/core/platform/cpu_feature_guard.
>> cc:45] The TensorFlow library wasn't compiled to use SSE4.1
>> instructions, but these are available on your machine and could speed up
>> CPU computations.
>> 2017-06-16 16:10:54.402328: W
>> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
>> wasn't compiled to use SSE4.2 instructions, but these are available on
>> your machine and could speed up CPU computations.
>> 2017-06-16 16:10:54.402346: W tensorflow/core/platform/cpu_feature_guard.
>> cc:45] The TensorFlow library wasn't compiled to use AVX instructions,
>> but these are available on your machine and could speed up CPU computations.
>> 2017-06-16 16:10:54.402350: W
>> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
>> wasn't compiled to use AVX2 instructions, but these are available on
>> your machine and could speed up CPU computations.
>> 2017-06-16 16:10:54.402356: W tensorflow/core/platform/cpu_feature_guard.
>> cc:45] The TensorFlow library wasn't compiled to use FMA instructions,
>> but these are available on your machine and could speed up CPU computations.
>> 2017-06-16 16:10:54.527167: I
>> tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA
>> node read from SysFS had negative value (-1), but there must be at least
>> one NUMA node, so returning NUMA node zero
>> 2017-06-16 16:10:54.527553: I
>> tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with
>> properties:
>> name: TITAN X (Pascal)
>> major: 6 minor: 1 memoryClockRate (GHz) 1.531
>> pciBusID :01:00.0
>> Total memory: 11.90GiB
>> Free memory: 11.38GiB
>> 2017-06-16 16:10:54.527565: I
>> tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0
>> 2017-06-16 16:10:54.527568: I
>> tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y
>> 2017-06-16 16:10:54.527590: I
>> tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow
>> device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id:
>> :01:00.0)
>> [[ 22.  28.]
>>  [ 49.  64.]]
>>
>>
>> This looks like it indicates a successful GPU and/or cuDNN installation.
>>
>> Great, now let's install the *development version* of Theano. The
>> instructions I'm following step-by-step:
>> http://deeplearning.net/software/theano_versions/dev/install_ubuntu.html
>>
>> The first step seems to be to install miniconda. I downloaded the bash
>> script for Python 2.7 and ran it:
>>
>> ~/Downloads$ bash Miniconda2-latest-Linux-x86_64.sh
>>
>> Welcome to Miniconda2 4.3.21 (by Continuum Analytics, Inc.)
>>
>> In order to continue the installation process, please review the license
>> agreement.
>> Please, press ENTER to continue
>>
>> and it seemed to work without issues.
>>
>> The next step is to install requirements through conda. Here I did:
>>
>> $ conda install numpy scipy mkl nose sphinx pydot-ng
>> Fetching package metadata .
>> Solving package specifications: .
>>
>> Package plan for installation in environment /home/daniel/miniconda2:
>>
>> The following NEW packages will be INSTALLED:
>>
>> alabaster:0.7.10-py27_0
>> babel:2.4.0-py27_0
>> docutils: 0.13.1-py27_0
>> imagesize:  

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-16 Thread Daniel Seita
Ack, sorry, half of my post got deleted! Hopefully you can still see it (i 
can find it by looking at the original post but it's in a really ugly 
format, sorry).


On Friday, June 16, 2017 at 4:33:20 PM UTC-7, Daniel Seita wrote:
>
> I was running into some more difficulties, so I gave up on getting this to 
> work and tried to uninstall and then reinstall Theano. Just to be extra 
> clear, here is my setup:
>
>- Ubuntu 16.04
>- Cuda 8.0, stored in `usr/local/cuda-8.0`
>- Titan X GPU with Pascal
>
> cuDNN is here:
>
> $ ls /usr/local/cuda-8.0/lib64/cudnn.h 
> /usr/local/cuda-8.0/lib64/cudnn.h
>
> To verify that I can use my GPU I started this quick TensorFlow 
> computation:
>
> In [1]: import tensorflow as tf
>
> In [2]: tf.__version__
> Out[2]: '1.1.0'
>
> In [3]: tf.GPUOptions
> Out[3]: tensorflow.core.protobuf.config_pb2.GPUOptions
>
> In [4]: with tf.device('/gpu:0'):
>...: a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], 
> name='a')
>...: b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], 
> name='b')
>...: c = tf.matmul(a,b)
>...: 
>
> In [5]: with tf.Session() as sess:
>...: print(sess.run(c))
>...: 
> 2017-06-16 16:10:54.402311: W tensorflow/core/platform/cpu_feature_guard.
> cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, 
> but these are available on your machine and could speed up CPU computations.
> 2017-06-16 16:10:54.402328: W 
> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library 
> wasn't compiled to use SSE4.2 instructions, but these are available on 
> your machine and could speed up CPU computations.
> 2017-06-16 16:10:54.402346: W tensorflow/core/platform/cpu_feature_guard.
> cc:45] The TensorFlow library wasn't compiled to use AVX instructions, 
> but these are available on your machine and could speed up CPU computations.
> 2017-06-16 16:10:54.402350: W 
> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library 
> wasn't compiled to use AVX2 instructions, but these are available on your 
> machine and could speed up CPU computations.
> 2017-06-16 16:10:54.402356: W tensorflow/core/platform/cpu_feature_guard.
> cc:45] The TensorFlow library wasn't compiled to use FMA instructions, 
> but these are available on your machine and could speed up CPU computations.
> 2017-06-16 16:10:54.527167: I 
> tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA 
> node read from SysFS had negative value (-1), but there must be at least 
> one NUMA node, so returning NUMA node zero
> 2017-06-16 16:10:54.527553: I 
> tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with 
> properties: 
> name: TITAN X (Pascal)
> major: 6 minor: 1 memoryClockRate (GHz) 1.531
> pciBusID :01:00.0
> Total memory: 11.90GiB
> Free memory: 11.38GiB
> 2017-06-16 16:10:54.527565: I 
> tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 
> 2017-06-16 16:10:54.527568: I 
> tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y 
> 2017-06-16 16:10:54.527590: I 
> tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow 
> device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 
> :01:00.0)
> [[ 22.  28.]
>  [ 49.  64.]]
>
>
> This looks like it indicates a successful GPU and/or cuDNN installation.
>
> Great, now let's install the *development version* of Theano. The 
> instructions I'm following step-by-step: 
> http://deeplearning.net/software/theano_versions/dev/install_ubuntu.html
>
> The first step seems to be to install miniconda. I downloaded the bash 
> script for Python 2.7 and ran it:
>
> ~/Downloads$ bash Miniconda2-latest-Linux-x86_64.sh 
>
> Welcome to Miniconda2 4.3.21 (by Continuum Analytics, Inc.)
>
> In order to continue the installation process, please review the license
> agreement.
> Please, press ENTER to continue
>
> and it seemed to work without issues.
>
> The next step is to install requirements through conda. Here I did:
>
> $ conda install numpy scipy mkl nose sphinx pydot-ng
> Fetching package metadata .
> Solving package specifications: .
>
> Package plan for installation in environment /home/daniel/miniconda2:
>
> The following NEW packages will be INSTALLED:
>
> alabaster:0.7.10-py27_0 
> babel:2.4.0-py27_0  
> docutils: 0.13.1-py27_0 
> imagesize:0.7.1-py27_0  
> jinja2:   2.9.6-py27_0  
> libgfortran:  3.0.0-1   
> markupsafe:   0.23-py27_2   
> mkl:  2017.0.1-0
> nose: 1.3.7-py27_1  
> numpy:1.13.0-py27_0 
> pydot-ng: 1.0.0.15-py27_0   
> pygments: 2.2.0-py27_0  
> pytz: 2017.2-py27_0 
> scipy:0.19.0-np1

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-16 Thread Daniel Seita
Thanks. I checked them and also that I was on the dev version:

In [1]: import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
, line 164, in 
use(config.device)
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
, line 151, in use
init_dev(device)
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
, line 68, in init_dev
context.cudnn_handle = dnn._make_handle(context)
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py", 
line 80, in _make_handle
cudnn = _dnn_lib()
  File 
"/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py", 
line 67, in _dnn_lib
raise RuntimeError('Could not find cudnn library (looked for v5[.1])')
RuntimeError: Could not find cudnn library (looked for v5[.1])

In [2]: theano.config.dnn
Out[2]: 

In [3]: theano.config.dnn.include_path
Out[3]: '/usr/local/cuda-8.0/include'

In [4]: theano.config.dnn.library_path
Out[4]: '/usr/local/cuda-8.0/lib64

In [5]: theano.__version__
Out[5]: '0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291'


Unfortunately, they make sense. This is exactly where my CUDA libraries are 
stored. For the above, I had this as my configuration:

[global]
floatX = float64
device = cuda

[cuda]
root = /usr/local/cuda-8.0

What do you recommend now?

On Tuesday, June 13, 2017 at 3:03:32 PM UTC-7, nouiz wrote:
>
> Check the Theano flag dnn.include_path and dnn.librairy_path. you can set 
> them to the corresponding path. This will probably make Theano find them.
>
> Le mar. 13 juin 2017 14:26, Daniel Seita  > a écrit :
>
>> nouiz, thanks for the response, but I ran into basically the same exact 
>> errors with the bleeding edge version (that's the dev, right?). At this 
>> point it seems to be harder to switch to the new backend.
>>
>>
>> On Monday, June 12, 2017 at 3:00:53 PM UTC-7, nouiz wrote:
>>
>>> Ça an you update to Theano dev version? It contains fixes. It don't have 
>>> the old backend anymore.  Cudnn should be optional in the dev version and 
>>> Should give better error msg.
>>>
>>> Fred
>>>
>>> Le lun. 12 juin 2017 15:32, Daniel Seita  a écrit :
>>>
>> I can run Theano using `device = gpu` in the configuration. It complains 
 about not being able to find the new backend, but at this point I see no 
 reason why to switch to the new backend.


 On Monday, June 12, 2017 at 12:29:30 PM UTC-7, Daniel Seita wrote:
>
> I'm trying to follow the *simplest theano installation instructions I 
> can find*. I'm using Ubuntu 16.04 (along with other settings 
> described in the title) and the instructions seem to be here: 
> http://deeplearning.net/software/theano/install_ubuntu.html# for 
> Theano 0.9.
>
> I'm using Anaconda for Python 2.7.
>
> Running
>
> conda install numpy scipy mkl nose sphinx pydot-ng
>
> works without issues. 
>
> Then the instructions say to get the GPU and CUDA set up. I've 
> installed my CUDA drivers and they should be working, since I'm able to 
> run 
> TensorFlow. I set up these in the bashrc:
>
> export PATH="/usr/local/cuda-8.0/bin:$PATH"
> export CUDA_HOME=/usr/local/cuda-8.0
> export LD_LIBRARY_PATH=/usr/local/lib
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
>
> Finally, I ran
>
> conda install theano pygpu
>
> I was hoping this is it,  because that automatically installs the GPU 
> backend.  In addition, pygpu seems to be working (I deleted the long line 
> of periods):
>
> In [1]: import pygpu
>
> In [2]: pygpu.test()
> pygpu is installed in /home/daniel/anaconda2/lib/python2.7/site-
> packages/pygpu
> NumPy version 1.12.1
> NumPy relaxed strides checking option: True
> NumPy is installed in /home/daniel/anaconda2/lib/python2.7/site-
> packages/numpy
> Python version 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016
> , 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
> nose version 1.3.7
> *** Testing for TITAN X (Pascal)
> --
> Ran 7051 tests in 138.494s
>
> OK
>
> I have this in my theanorc:
>
> [global]
> floatX = float64
> device = cuda0
>
> [cuda]
> root = /usr/local/cuda-8.0
>
> Now let's see what happens:
>
> $ ipython
> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:
> 15) 
> Type "copyright", "credits" or "license" for more information.
>
> IPython 5.3.0 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own hel

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-13 Thread Frédéric Bastien
Check the Theano flag dnn.include_path and dnn.librairy_path. you can set
them to the corresponding path. This will probably make Theano find them.

Le mar. 13 juin 2017 14:26, Daniel Seita  a écrit :

> nouiz, thanks for the response, but I ran into basically the same exact
> errors with the bleeding edge version (that's the dev, right?). At this
> point it seems to be harder to switch to the new backend.
>
>
> On Monday, June 12, 2017 at 3:00:53 PM UTC-7, nouiz wrote:
>
>> Ça an you update to Theano dev version? It contains fixes. It don't have
>> the old backend anymore.  Cudnn should be optional in the dev version and
>> Should give better error msg.
>>
>> Fred
>>
>> Le lun. 12 juin 2017 15:32, Daniel Seita  a écrit :
>>
> I can run Theano using `device = gpu` in the configuration. It complains
>>> about not being able to find the new backend, but at this point I see no
>>> reason why to switch to the new backend.
>>>
>>>
>>> On Monday, June 12, 2017 at 12:29:30 PM UTC-7, Daniel Seita wrote:

 I'm trying to follow the *simplest theano installation instructions I
 can find*. I'm using Ubuntu 16.04 (along with other settings described
 in the title) and the instructions seem to be here:
 http://deeplearning.net/software/theano/install_ubuntu.html# for
 Theano 0.9.

 I'm using Anaconda for Python 2.7.

 Running

 conda install numpy scipy mkl nose sphinx pydot-ng

 works without issues.

 Then the instructions say to get the GPU and CUDA set up. I've
 installed my CUDA drivers and they should be working, since I'm able to run
 TensorFlow. I set up these in the bashrc:

 export PATH="/usr/local/cuda-8.0/bin:$PATH"
 export CUDA_HOME=/usr/local/cuda-8.0
 export LD_LIBRARY_PATH=/usr/local/lib
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64

 Finally, I ran

 conda install theano pygpu

 I was hoping this is it,  because that automatically installs the GPU
 backend.  In addition, pygpu seems to be working (I deleted the long line
 of periods):

 In [1]: import pygpu

 In [2]: pygpu.test()
 pygpu is installed in /home/daniel/anaconda2/lib/python2.7/site-
 packages/pygpu
 NumPy version 1.12.1
 NumPy relaxed strides checking option: True
 NumPy is installed in /home/daniel/anaconda2/lib/python2.7/site-
 packages/numpy
 Python version 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016,
 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
 nose version 1.3.7
 *** Testing for TITAN X (Pascal)
 --
 Ran 7051 tests in 138.494s

 OK

 I have this in my theanorc:

 [global]
 floatX = float64
 device = cuda0

 [cuda]
 root = /usr/local/cuda-8.0

 Now let's see what happens:

 $ ipython
 Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:
 15)
 Type "copyright", "credits" or "license" for more information.

 IPython 5.3.0 -- An enhanced Interactive Python.
 ? -> Introduction and overview of IPython's features.
 %quickref -> Quick reference.
 help  -> Python's own help system.
 object?   -> Details about 'object', use 'object??' for extra details.

 In [1]: import theano
 ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
 Traceback (most recent call last):
   File
 "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
 , line 164, in 
 use(config.device)
   File
 "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
 , line 151, in use
 init_dev(device)
   File
 "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
 , line 68, in init_dev
 context.cudnn_handle = dnn._make_handle(context)
   File
 "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
 , line 80, in _make_handle
 cudnn = _dnn_lib()
   File
 "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
 , line 67, in _dnn_lib
 raise RuntimeError('Could not find cudnn library (looked for
 v5[.1])')
 RuntimeError: Could not find cudnn library (looked for v5[.1])

 I cannot even import theano successfully. There are two problems. The
 first is that pygpu isn't initialized (?) and the second is that the cudnn
 library couldn't be found. It was working for TensorFlow and the cudnn
 header is found in `/usr/local/cuda-8.0/lib64/cudnn.h` so I'm guessing the
 issue lies with the pygpu library. I have no idea how to fix this but there
 must be a common fix since this seems to be the default way to install
 theano?

 Another thread (
 https://groups.google.com/forum/#!topic/

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-13 Thread Daniel Seita
nouiz, thanks for the response, but I ran into basically the same exact 
errors with the bleeding edge version (that's the dev, right?). At this 
point it seems to be harder to switch to the new backend.

On Monday, June 12, 2017 at 3:00:53 PM UTC-7, nouiz wrote:
>
> Ça an you update to Theano dev version? It contains fixes. It don't have 
> the old backend anymore.  Cudnn should be optional in the dev version and 
> Should give better error msg.
>
> Fred
>
> Le lun. 12 juin 2017 15:32, Daniel Seita  > a écrit :
>
>> I can run Theano using `device = gpu` in the configuration. It complains 
>> about not being able to find the new backend, but at this point I see no 
>> reason why to switch to the new backend.
>>
>>
>> On Monday, June 12, 2017 at 12:29:30 PM UTC-7, Daniel Seita wrote:
>>>
>>> I'm trying to follow the *simplest theano installation instructions I 
>>> can find*. I'm using Ubuntu 16.04 (along with other settings described 
>>> in the title) and the instructions seem to be here: 
>>> http://deeplearning.net/software/theano/install_ubuntu.html# for Theano 
>>> 0.9.
>>>
>>> I'm using Anaconda for Python 2.7.
>>>
>>> Running
>>>
>>> conda install numpy scipy mkl nose sphinx pydot-ng
>>>
>>> works without issues. 
>>>
>>> Then the instructions say to get the GPU and CUDA set up. I've installed 
>>> my CUDA drivers and they should be working, since I'm able to run 
>>> TensorFlow. I set up these in the bashrc:
>>>
>>> export PATH="/usr/local/cuda-8.0/bin:$PATH"
>>> export CUDA_HOME=/usr/local/cuda-8.0
>>> export LD_LIBRARY_PATH=/usr/local/lib
>>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
>>>
>>> Finally, I ran
>>>
>>> conda install theano pygpu
>>>
>>> I was hoping this is it,  because that automatically installs the GPU 
>>> backend.  In addition, pygpu seems to be working (I deleted the long line 
>>> of periods):
>>>
>>> In [1]: import pygpu
>>>
>>> In [2]: pygpu.test()
>>> pygpu is installed in /home/daniel/anaconda2/lib/python2.7/site-packages
>>> /pygpu
>>> NumPy version 1.12.1
>>> NumPy relaxed strides checking option: True
>>> NumPy is installed in /home/daniel/anaconda2/lib/python2.7/site-packages
>>> /numpy
>>> Python version 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 
>>> 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
>>> nose version 1.3.7
>>> *** Testing for TITAN X (Pascal)
>>> --
>>> Ran 7051 tests in 138.494s
>>>
>>> OK
>>>
>>> I have this in my theanorc:
>>>
>>> [global]
>>> floatX = float64
>>> device = cuda0
>>>
>>> [cuda]
>>> root = /usr/local/cuda-8.0
>>>
>>> Now let's see what happens:
>>>
>>> $ ipython
>>> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15
>>> ) 
>>> Type "copyright", "credits" or "license" for more information.
>>>
>>> IPython 5.3.0 -- An enhanced Interactive Python.
>>> ? -> Introduction and overview of IPython's features.
>>> %quickref -> Quick reference.
>>> help  -> Python's own help system.
>>> object?   -> Details about 'object', use 'object??' for extra details.
>>>
>>> In [1]: import theano
>>> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
>>> Traceback (most recent call last):
>>>   File 
>>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>>> , line 164, in 
>>> use(config.device)
>>>   File 
>>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>>> , line 151, in use
>>> init_dev(device)
>>>   File 
>>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>>> , line 68, in init_dev
>>> context.cudnn_handle = dnn._make_handle(context)
>>>   File 
>>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
>>> , line 80, in _make_handle
>>> cudnn = _dnn_lib()
>>>   File 
>>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
>>> , line 67, in _dnn_lib
>>> raise RuntimeError('Could not find cudnn library (looked for 
>>> v5[.1])')
>>> RuntimeError: Could not find cudnn library (looked for v5[.1])
>>>
>>> I cannot even import theano successfully. There are two problems. The 
>>> first is that pygpu isn't initialized (?) and the second is that the cudnn 
>>> library couldn't be found. It was working for TensorFlow and the cudnn 
>>> header is found in `/usr/local/cuda-8.0/lib64/cudnn.h` so I'm guessing the 
>>> issue lies with the pygpu library. I have no idea how to fix this but there 
>>> must be a common fix since this seems to be the default way to install 
>>> theano?
>>>
>>> Another thread (
>>> https://groups.google.com/forum/#!topic/theano-users/zzaJVrYBD1k) has a 
>>> similar question but `sudo ldconfig` did not work for me and results in the 
>>> same errors.
>>>
>> -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "theano-users" group.
>> To unsubscribe from this group and stop rec

Re: [theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-12 Thread Frédéric Bastien
Ça an you update to Theano dev version? It contains fixes. It don't have
the old backend anymore.  Cudnn should be optional in the dev version and
Should give better error msg.

Fred

Le lun. 12 juin 2017 15:32, Daniel Seita  a écrit :

> I can run Theano using `device = gpu` in the configuration. It complains
> about not being able to find the new backend, but at this point I see no
> reason why to switch to the new backend.
>
>
> On Monday, June 12, 2017 at 12:29:30 PM UTC-7, Daniel Seita wrote:
>>
>> I'm trying to follow the *simplest theano installation instructions I
>> can find*. I'm using Ubuntu 16.04 (along with other settings described
>> in the title) and the instructions seem to be here:
>> http://deeplearning.net/software/theano/install_ubuntu.html# for Theano
>> 0.9.
>>
>> I'm using Anaconda for Python 2.7.
>>
>> Running
>>
>> conda install numpy scipy mkl nose sphinx pydot-ng
>>
>> works without issues.
>>
>> Then the instructions say to get the GPU and CUDA set up. I've installed
>> my CUDA drivers and they should be working, since I'm able to run
>> TensorFlow. I set up these in the bashrc:
>>
>> export PATH="/usr/local/cuda-8.0/bin:$PATH"
>> export CUDA_HOME=/usr/local/cuda-8.0
>> export LD_LIBRARY_PATH=/usr/local/lib
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
>>
>> Finally, I ran
>>
>> conda install theano pygpu
>>
>> I was hoping this is it,  because that automatically installs the GPU
>> backend.  In addition, pygpu seems to be working (I deleted the long line
>> of periods):
>>
>> In [1]: import pygpu
>>
>> In [2]: pygpu.test()
>> pygpu is installed in /home/daniel/anaconda2/lib/python2.7/site-packages/
>> pygpu
>> NumPy version 1.12.1
>> NumPy relaxed strides checking option: True
>> NumPy is installed in /home/daniel/anaconda2/lib/python2.7/site-packages/
>> numpy
>> Python version 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016,
>> 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
>> nose version 1.3.7
>> *** Testing for TITAN X (Pascal)
>> --
>> Ran 7051 tests in 138.494s
>>
>> OK
>>
>> I have this in my theanorc:
>>
>> [global]
>> floatX = float64
>> device = cuda0
>>
>> [cuda]
>> root = /usr/local/cuda-8.0
>>
>> Now let's see what happens:
>>
>> $ ipython
>> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
>> Type "copyright", "credits" or "license" for more information.
>>
>> IPython 5.3.0 -- An enhanced Interactive Python.
>> ? -> Introduction and overview of IPython's features.
>> %quickref -> Quick reference.
>> help  -> Python's own help system.
>> object?   -> Details about 'object', use 'object??' for extra details.
>>
>> In [1]: import theano
>> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
>> Traceback (most recent call last):
>>   File
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>> , line 164, in 
>> use(config.device)
>>   File
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>> , line 151, in use
>> init_dev(device)
>>   File
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
>> , line 68, in init_dev
>> context.cudnn_handle = dnn._make_handle(context)
>>   File
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
>> , line 80, in _make_handle
>> cudnn = _dnn_lib()
>>   File
>> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
>> , line 67, in _dnn_lib
>> raise RuntimeError('Could not find cudnn library (looked for v5[.1])'
>> )
>> RuntimeError: Could not find cudnn library (looked for v5[.1])
>>
>> I cannot even import theano successfully. There are two problems. The
>> first is that pygpu isn't initialized (?) and the second is that the cudnn
>> library couldn't be found. It was working for TensorFlow and the cudnn
>> header is found in `/usr/local/cuda-8.0/lib64/cudnn.h` so I'm guessing the
>> issue lies with the pygpu library. I have no idea how to fix this but there
>> must be a common fix since this seems to be the default way to install
>> theano?
>>
>> Another thread (
>> https://groups.google.com/forum/#!topic/theano-users/zzaJVrYBD1k) has a
>> similar question but `sudo ldconfig` did not work for me and results in the
>> same errors.
>>
> --
>
> ---
> 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+unsubscr...@googlegroups.com.
> 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/opt

[theano-users] Re: Cannot do a simple theano install (Python 2.7, Ubuntu 16.04, Theano 0.9, Cuda 8.0, TitanX GPU) due to pygpu errors

2017-06-12 Thread Daniel Seita
I can run Theano using `device = gpu` in the configuration. It complains 
about not being able to find the new backend, but at this point I see no 
reason why to switch to the new backend.

On Monday, June 12, 2017 at 12:29:30 PM UTC-7, Daniel Seita wrote:
>
> I'm trying to follow the *simplest theano installation instructions I can 
> find*. I'm using Ubuntu 16.04 (along with other settings described in the 
> title) and the instructions seem to be here: 
> http://deeplearning.net/software/theano/install_ubuntu.html# for Theano 
> 0.9.
>
> I'm using Anaconda for Python 2.7.
>
> Running
>
> conda install numpy scipy mkl nose sphinx pydot-ng
>
> works without issues. 
>
> Then the instructions say to get the GPU and CUDA set up. I've installed 
> my CUDA drivers and they should be working, since I'm able to run 
> TensorFlow. I set up these in the bashrc:
>
> export PATH="/usr/local/cuda-8.0/bin:$PATH"
> export CUDA_HOME=/usr/local/cuda-8.0
> export LD_LIBRARY_PATH=/usr/local/lib
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
>
> Finally, I ran
>
> conda install theano pygpu
>
> I was hoping this is it,  because that automatically installs the GPU 
> backend.  In addition, pygpu seems to be working (I deleted the long line 
> of periods):
>
> In [1]: import pygpu
>
> In [2]: pygpu.test()
> pygpu is installed in /home/daniel/anaconda2/lib/python2.7/site-packages/
> pygpu
> NumPy version 1.12.1
> NumPy relaxed strides checking option: True
> NumPy is installed in /home/daniel/anaconda2/lib/python2.7/site-packages/
> numpy
> Python version 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23
> :09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
> nose version 1.3.7
> *** Testing for TITAN X (Pascal)
> --
> Ran 7051 tests in 138.494s
>
> OK
>
> I have this in my theanorc:
>
> [global]
> floatX = float64
> device = cuda0
>
> [cuda]
> root = /usr/local/cuda-8.0
>
> Now let's see what happens:
>
> $ ipython
> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) 
> Type "copyright", "credits" or "license" for more information.
>
> IPython 5.3.0 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
>
> In [1]: import theano
> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
> Traceback (most recent call last):
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 164, in 
> use(config.device)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 151, in use
> init_dev(device)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 68, in init_dev
> context.cudnn_handle = dnn._make_handle(context)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
> , line 80, in _make_handle
> cudnn = _dnn_lib()
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
> , line 67, in _dnn_lib
> raise RuntimeError('Could not find cudnn library (looked for v5[.1])')
> RuntimeError: Could not find cudnn library (looked for v5[.1])
>
> I cannot even import theano successfully. There are two problems. The 
> first is that pygpu isn't initialized (?) and the second is that the cudnn 
> library couldn't be found. It was working for TensorFlow and the cudnn 
> header is found in `/usr/local/cuda-8.0/lib64/cudnn.h` so I'm guessing the 
> issue lies with the pygpu library. I have no idea how to fix this but there 
> must be a common fix since this seems to be the default way to install 
> theano?
>
> Another thread (
> https://groups.google.com/forum/#!topic/theano-users/zzaJVrYBD1k) has a 
> similar question but `sudo ldconfig` did not work for me and results in the 
> same errors.
>

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.