[theano-users] Re: ImportError undefined symbol: _ZdlPvm possible - compiler problem

2017-03-16 Thread Jonathan Bruck
Ok, so even installing from the git repo doesn't work. 

No idea. Let me know what I can do to help someone diagnose this problem. 

Jonathan

On Tuesday, 14 March 2017 12:03:28 UTC+11, Jonathan Bruck wrote:
>
> Hi 
>
> Running Ubuntu 16.10, installed anaconda3, theano from conda-forge. 
> Nothing works due to the errors below.
> I've tried various options for the cxx flag, g++-5 g++-4.9 
> /usr/bin/g++-4.8 etc
> The theanorc file is recognized as it correctly picks up the gpu when that 
> is enabled, but still fails to compile.
>
> Any help please :)
>
> Jonathan
>
> jonathan@melange:~$ python
> Python 3.5.2 |Anaconda 4.3.0 (64-bit)| (default, Jul  2 2016, 17:53:06) 
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import theano
> >>> theano.__version__
> '0.8.2'
> >>> 
> jonathan@melange:~$ cat .theanorc
> [global]
> floatX = float32
> # device = gpu
>
> [g++]
> cxx = /usr/bin/x86_64-linux-gnu-g++-4.8
>
> [lib]
> cnmem = 0.7
> jonathan@melange:~$ python `python -c "import os, theano; 
> print(os.path.dirname(theano.__file__))"`/misc/check_blas.py
>
> Some Theano flags:
> blas.ldflags= -L/usr/local/lib -lopenblas -lopenblas
> compiledir= /home/jonathan/.theano/compiledir_Linux-4.8--generic-
> x86_64-with-debian-stretch-sid-x86_64-3.5.2-64
> floatX= float32
> device= cpu
> Some OS information:
> sys.platform= linux
> sys.version= 3.5.2 |Anaconda 4.3.0 (64-bit)| (default, Jul  2 2016, 17
> :53:06) 
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
> sys.prefix= /home/jonathan/Apps/Anaconda3
> Some environment variables:
> MKL_NUM_THREADS= None
> OMP_NUM_THREADS= None
> GOTO_NUM_THREADS= None
>
>
> Numpy config: (used when the Theano flag "blas.ldflags" is empty)
> openblas_lapack_info:
> language = c
> define_macros = [('HAVE_CBLAS', None)]
> libraries = ['openblas', 'openblas']
> library_dirs = ['/usr/local/lib']
> lapack_opt_info:
> language = c
> define_macros = [('HAVE_CBLAS', None)]
> libraries = ['openblas', 'openblas']
> library_dirs = ['/usr/local/lib']
> blas_mkl_info:
>   NOT AVAILABLE
> blis_info:
>   NOT AVAILABLE
> openblas_info:
> language = c
> define_macros = [('HAVE_CBLAS', None)]
> libraries = ['openblas', 'openblas']
> library_dirs = ['/usr/local/lib']
> blas_opt_info:
> language = c
> define_macros = [('HAVE_CBLAS', None)]
> libraries = ['openblas', 'openblas']
> library_dirs = ['/usr/local/lib']
> lapack_mkl_info:
>   NOT AVAILABLE
> Numpy dot module: numpy.core.multiarray
> Numpy location: /home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/
> numpy/__init__.py
> Numpy version: 1.12.0
> ERROR (theano.gof.opt): Optimization failure due to: constant_folding
> ERROR (theano.gof.opt): node: DimShuffle{x,x}(TensorConstant{
> 0.80011920929})
> ERROR (theano.gof.opt): TRACEBACK:
> ERROR (theano.gof.opt): Traceback (most recent call last):
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/opt.py"
> , line 1772, in process_node
> replacements = lopt.transform(node)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/tensor/opt.py"
> , line 5825, in constant_folding
> no_recycling=[])
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/op.py"
> , line 970, in make_thunk
> no_recycling)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/op.py"
> , line 879, in make_c_thunk
> output_storage=node_output_storage)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cc.py"
> , line 1200, in make_thunk
> keep_lock=keep_lock)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cc.py"
> , line 1143, in __compile__
> keep_lock=keep_lock)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cc.py"
> , line 1595, in cthunk_factory
> key=key, lnk=self, keep_lock=keep_lock)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cmodule.py"
> , line 1142, in module_from_key
> module = lnk.compile_cmodule(location)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cc.py"
> , line 1506, in compile_cmodule
> preargs=preargs)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cmodule.py"
> , line 2213, in compile_str
> return dlimport(lib_filename)
>   File 
> "/home/jonathan/Apps/Anaconda3/lib/python3.5/site-packages/theano/gof/cmodule.py"
> , line 299, in dlimport
> rval = __import__(module_name, {}, {}, [module_name])
> ImportError: /home/jonathan/.theano/compiledir_Linux-4.8--generic-x86_64-
> with-debian-stretch-sid-x86_64-3.5.2-64/tmppn2ug2zy/
> mdb219947724f79219f7dbd36f0f52c77.so: undefined symbol: _ZdlPvm
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the 

[theano-users] Re: Gaussian-Bernoulli RBM

2017-03-16 Thread Pallabi Saikia
Hi Ray. If you have the code for GRBM, could you please send it to me. I 
have some issues with the implementation like getting 'nan' as output. 
Please help. My email id: pallabi...@gmail.com.


-- 

--- 
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.


[theano-users] Re: Some help optimizing a function involving 1D dot products for multidimensional tensors

2017-03-16 Thread Jesse Livezey
If I'm understanding your code correctly, you should be able to use 
tensordot
http://deeplearning.net/software/theano/library/tensor/basic.html#theano.tensor.tensordot
rather than doing the multiply and sum.

On Thursday, March 16, 2017 at 10:59:14 AM UTC-4, Eelke Spaak wrote:
>
> Apologies for the messed up profiling code, here is attempt 2:
>
> Class
> ---
> <% time> <#call> <#apply> 
> 
>   46.2%46.2%  10.971s   2.74e-05s C   400764  42   
> theano.sandbox.cuda.basic_ops.GpuElemwise
>   29.9%76.0%   7.098s   3.72e-05s C   190840  20   
> theano.sandbox.cuda.basic_ops.GpuCAReduce
>7.2%83.2%   1.699s   1.48e-05s C   114504  12   
> theano.sandbox.cuda.blas.GpuDot22
>3.8%87.0%   0.911s   4.78e-05s C19084   2   
> theano.sandbox.cuda.basic_ops.GpuJoin
>3.8%90.9%   0.907s   5.59e-06s C   162214  17   
> theano.sandbox.cuda.basic_ops.GpuFromHost
>2.9%93.8%   0.700s   1.05e-05s C66794   7   
> theano.sandbox.cuda.basic_ops.HostFromGpu
>2.1%95.9%   0.501s   1.14e-06s C   438932  46   
> theano.sandbox.cuda.basic_ops.GpuReshape
>1.5%97.4%   0.348s   1.46e-06s C   238550  25   
> theano.tensor.elemwise.Elemwise
>1.4%98.7%   0.327s   3.43e-05s C 9542   1   
> theano.sandbox.cuda.blas.GpuGemv
>0.4%99.2%   0.097s   9.28e-07s C   104962  11   
> theano.sandbox.cuda.basic_ops.GpuDimShuffle
>0.3%99.5%   0.081s   1.06e-06s C76336   8   
> theano.sandbox.cuda.basic_ops.GpuSubtensor
>0.2%99.7%   0.042s   4.35e-06s C 9542   1   
> theano.tensor.basic.Join
>0.1%99.8%   0.033s   8.62e-07s C38168   4   
> theano.tensor.elemwise.DimShuffle
>0.1%99.9%   0.019s   9.75e-07s C19084   2   
> theano.tensor.subtensor.Subtensor
>0.1%99.9%   0.015s   1.54e-06s C 9542   1   
> theano.sandbox.cuda.basic_ops.GpuAllocEmpty
>0.1%   100.0%   0.012s   6.46e-07s C19084   2   
> theano.compile.ops.ViewOp
>... (remaining 0 Classes account for   0.00%(0.00s) of the runtime)
>
> Ops
> ---
> <% time> <#call> <#apply>  name>
>   24.7%24.7%   5.860s   6.14e-05s C 95420   10   
> GpuElemwise{mul,no_inplace}
>   17.6%42.2%   4.173s   1.09e-04s C 381684   
> GpuCAReduce{add}{1,1,1}
>7.2%49.4%   1.699s   1.48e-05s C 114504   12   
> GpuDot22
>4.1%53.5%   0.974s   2.55e-05s C 381684   
> GpuCAReduce{add}{0,1,0}
>4.1%57.6%   0.972s   2.55e-05s C 381684   
> GpuCAReduce{add}{0,1}
>3.8%61.4%   0.911s   4.78e-05s C 190842   
> GpuJoin
>3.8%65.2%   0.907s   5.59e-06s C 162214   17   
> GpuFromHost
>2.9%68.2%   0.700s   1.05e-05s C 667947   
> HostFromGpu
>2.6%70.7%   0.611s   6.40e-05s C 95421   
> GpuElemwise{Composite{(i0 + (-scalar_sigmoid(((i1 + i2) + i3}}[(0, 2)]
>2.1%72.9%   0.503s   5.28e-05s C 95421   
> GpuElemwise{Composite{((i0 * i1) - scalar_softplus(i1))},no_inplace}
>2.0%74.8%   0.468s   4.91e-05s C 95421   
> GpuElemwise{Composite{(i0 + (-scalar_sigmoid(i1)))}}[(0, 1)]
>1.9%76.7%   0.444s   1.16e-05s C 381684   
> GpuCAReduce{add}{0,1,1}
>1.7%78.4%   0.404s   4.24e-05s C 95421   
> GpuElemwise{Composite{((i0 + i1) + i2)}}[(0, 1)]
>1.4%79.8%   0.327s   3.43e-05s C 95421   
> GpuGemv{inplace}
>1.4%81.1%   0.322s   1.69e-05s C 190842   
> GpuCAReduce{add}{0,0,1}
>1.3%82.4%   0.313s   1.09e-05s C 286263   
> GpuElemwise{Composite{((i0 * i1) + i2)}}[(0, 2)]
>1.0%83.5%   0.246s   1.29e-05s C 190842   
> GpuElemwise{scalar_sigmoid,no_inplace}
>0.9%84.4%   0.221s   1.16e-06s C 190840   20   
> GpuReshape{3}
>0.9%85.3%   0.219s   1.15e-06s C 190840   20   
> GpuReshape{2}
>0.9%86.2%   0.214s   1.12e-05s C 190842   
> GpuElemwise{Composite{(i0 + (i1 * sqr(i2)))},no_inplace}
>... (remaining 49 Ops account for  13.76%(3.27s) of the runtime)
>
> Apply
> --
> <% time><#call>  
>   16.3%16.3%   3.882s   4.07e-04s   9542   165   
> GpuCAReduce{add}{1,1,1}(GpuElemwise{Composite{((i0 * i1) - 
> scalar_softplus(i1))},no_inplace}.0)
>3.4%19.7%   0.810s   8.48e-05s   9542   169   
> GpuElemwise{mul,no_inplace}(GpuDimShuffle{0,x,1,2}.0, CudaNdarrayConstant{
>3.4%23.1%   0.802s   8.40e-05s   

Re: [theano-users] Using multiple gpus on windows using theano,keras

2017-03-16 Thread Michael Klachko
Hi Fred, are multiple GPUs on Windows supported if I use each GPU to train 
a separate network? For example, can I launch two theano programs, where 
one is using device=gpu0, and the other device=gpu1?



On Monday, March 13, 2017 at 3:15:04 PM UTC-7, nouiz wrote:
>
> Hi,
>
> For many reasons, multi GPU on Windows don't work. Nvidia don't have good 
> support for it, so event if we wanted to support it, it would be hard and 
> much less efficient.
>
> The problems is at least that your GPU is very old and don't have much 
> memory. Using two of them will not help you much. The multi GPU that Theano 
> currently support via platoon would help your case. It support only data 
> parallelism.
>
> Fred
>
> Le sam. 11 mars 2017 17:40, Ravi Teja  a 
> écrit :
>
>> Hi all,
>>
>>
>> I am a beginner in deep learning/theano/keras.I'm trying to figure out 
>> how to use multiple gpus on windows 7. I've had success installing 
>> Theano,keras(as described in this post How do I install Keras and Theano 
>> in Anaconda Python on Windows? 
>> )
>>  
>> and using one gpu. I want to use both my gpus
>>
>> Following are the details of configs and versions
>>
>> Python - 2.7(Anaconda-4.3.14,Windows-64bit) ,CUDA - 7.5.17 ,Theano - 
>> 0.9.0rc3 ,keras - 1.2.2 ,pycuda - 2016.1.2+cuda7518 ,gpu - Geforce GTX 
>> 480(2 of them)
>>
>> Theano configuration is as below .theanorc.txt
>>
>>
>> [global]
>> floatX = float32
>> device = gpu
>> [nvcc]
>> flags=-LC:\ProgramData\Anaconda2\libs
>> compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
>> [lib]
>> cnmem=0.8
>>
>>
>> Currently I'm able to use only one GPU and I am getting memory error as 
>> below when I try to fit the model
>>
>> MemoryError: ('Error allocating 411041792 bytes of device memory 
>> (CNMEM_STATUS_OUT_OF_MEMORY).', "you might consider using 
>> 'theano.shared(..., borrow=True)'")
>>
>>
>> Does using 2 gpus solve the problem(if yes, how do I enable the second 
>> one?) or is my model too big ?
>>
>>
>>
>> Thank You
>>
>> -- 
>>
>> --- 
>> 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.
>>
>

-- 

--- 
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.


[theano-users] Some help optimizing a function involving 1D dot products for multidimensional tensors

2017-03-16 Thread Eelke Spaak
Dear Theano community,

I am using PyMC3 to sample from a Bernoulli logistic regression model of 
neural spike time data. I am using a custom likelihood function for this, 
which basically computes a bunch of vector dot products. This function is 
embedded in more complicated PyMC3 machinery (specifically, NUTS sampling). 
The sampling is quite slow, and upon profiling I realized that it is 
actually not so much the sampling machinery as it is my likelihood which is 
taking up most of the computational time. This is the relevant code:

# shapes:
# theta(ntrial, ncell)
# beta (ntrial, ncell, ncell)
# xi   (ntrial, ncell, ncell)
# _unit_influence  (ntrial, ncell, ncell, ntime)
# _time_rate_prod  (ntrial, ncell, 1, ntime)
# Y(ntrial, ncell, ntime)

weighted_sum = (
theta[:,:,np.newaxis] + 
T.sum(beta[:,:,:,np.newaxis] * _unit_influence, axis=1)
)

weighted_sum += (T.sum(xi[:,:,:,np.newaxis] *
_time_rate_prod, axis=1))

retval = T.sum(Y.astype('float32') * weighted_sum - 
T.log1p(T.exp(weighted_sum)))


Note that I'm basically computing a vector sum product twice along one 
dimension, except not using T.dot but by doing an elementwise 
multiplication followed by T.sum. I'm doing this because I couldn't find a 
way to get the dot products I wanted in Theano (in plain Numpy, einsum 
would be the solution; see also my question here on StackOverflow 

).


Now it could very well be that what I'm doing is already the optimal way to 
approach this, and my slow sampling is just a consequence of having a 
rather complex model. But I would hope that there is still some way to 
improve this, and would be very grateful for any tips anyone can offer.


The profiling summary is as follows:


Class --- <% time> <#call> 
<#apply>  46.2% 46.2% 10.971s 2.74e-05s C 400764 42 
theano.sandbox.cuda.basic_ops.GpuElemwise 29.9% 76.0% 7.098s 3.72e-05s C 
190840 20 theano.sandbox.cuda.basic_ops.GpuCAReduce 7.2% 83.2% 1.699s 
1.48e-05s C 114504 12 theano.sandbox.cuda.blas.GpuDot22 3.8% 87.0% 0.911s 
4.78e-05s C 19084 2 theano.sandbox.cuda.basic_ops.GpuJoin 3.8% 90.9% 0.907s 
5.59e-06s C 162214 17 theano.sandbox.cuda.basic_ops.GpuFromHost 2.9% 93.8% 
0.700s 1.05e-05s C 66794 7 theano.sandbox.cuda.basic_ops.HostFromGpu 2.1% 
95.9% 0.501s 1.14e-06s C 438932 46 theano.sandbox.cuda.basic_ops.GpuReshape 
1.5% 97.4% 0.348s 1.46e-06s C 238550 25 theano.tensor.elemwise.Elemwise 
1.4% 98.7% 0.327s 3.43e-05s C 9542 1 theano.sandbox.cuda.blas.GpuGemv 0.4% 
99.2% 0.097s 9.28e-07s C 104962 11 
theano.sandbox.cuda.basic_ops.GpuDimShuffle 0.3% 99.5% 0.081s 1.06e-06s C 
76336 8 theano.sandbox.cuda.basic_ops.GpuSubtensor 0.2% 99.7% 0.042s 
4.35e-06s C 9542 1 theano.tensor.basic.Join 0.1% 99.8% 0.033s 8.62e-07s C 
38168 4 theano.tensor.elemwise.DimShuffle 0.1% 99.9% 0.019s 9.75e-07s C 
19084 2 theano.tensor.subtensor.Subtensor 0.1% 99.9% 0.015s 1.54e-06s C 
9542 1 theano.sandbox.cuda.basic_ops.GpuAllocEmpty 0.1% 100.0% 0.012s 
6.46e-07s C 19084 2 theano.compile.ops.ViewOp ... (remaining 0 Classes 
account for 0.00%(0.00s) of the runtime) Ops --- <% time> <#call> <#apply>  24.7% 24.7% 5.860s 
6.14e-05s C 95420 10 GpuElemwise{mul,no_inplace} 17.6% 42.2% 4.173s 
1.09e-04s C 38168 4 GpuCAReduce{add}{1,1,1} 7.2% 49.4% 1.699s 1.48e-05s C 
114504 12 GpuDot22 4.1% 53.5% 0.974s 2.55e-05s C 38168 4 
GpuCAReduce{add}{0,1,0} 4.1% 57.6% 0.972s 2.55e-05s C 38168 4 
GpuCAReduce{add}{0,1} 3.8% 61.4% 0.911s 4.78e-05s C 19084 2 GpuJoin 3.8% 
65.2% 0.907s 5.59e-06s C 162214 17 GpuFromHost 2.9% 68.2% 0.700s 1.05e-05s 
C 66794 7 HostFromGpu 2.6% 70.7% 0.611s 6.40e-05s C 9542 1 
GpuElemwise{Composite{(i0 + (-scalar_sigmoid(((i1 + i2) + i3}}[(0, 2)] 
2.1% 72.9% 0.503s 5.28e-05s C 9542 1 GpuElemwise{Composite{((i0 * i1) - 
scalar_softplus(i1))},no_inplace} 2.0% 74.8% 0.468s 4.91e-05s C 9542 1 
GpuElemwise{Composite{(i0 + (-scalar_sigmoid(i1)))}}[(0, 1)] 1.9% 76.7% 
0.444s 1.16e-05s C 38168 4 GpuCAReduce{add}{0,1,1} 1.7% 78.4% 0.404s 
4.24e-05s C 9542 1 GpuElemwise{Composite{((i0 + i1) + i2)}}[(0, 1)] 1.4% 
79.8% 0.327s 3.43e-05s C 9542 1 GpuGemv{inplace} 1.4% 81.1% 0.322s 
1.69e-05s C 19084 2 GpuCAReduce{add}{0,0,1} 1.3% 82.4% 0.313s 1.09e-05s C 
28626 3 GpuElemwise{Composite{((i0 * i1) + i2)}}[(0, 2)] 1.0% 83.5% 0.246s 
1.29e-05s C 19084 2 GpuElemwise{scalar_sigmoid,no_inplace} 0.9% 84.4% 
0.221s 1.16e-06s C 190840 20 GpuReshape{3} 0.9% 85.3% 0.219s 1.15e-06s C 
190840 20 GpuReshape{2} 0.9% 86.2% 0.214s 1.12e-05s C 19084 2 
GpuElemwise{Composite{(i0 + (i1 * sqr(i2)))},no_inplace} ... (remaining 49 
Ops account for 13.76%(3.27s) of the runtime) Apply -- <% time>  
  <#call>   16.3% 16.3% 3.882s 
4.07e-04s 9542 165 GpuCAReduce{add}{1,1,1}(GpuElemwise{Composite{((i0 * i1) 
- scalar_softplus(i1))},no_inplace}.0) 3.4% 19.7% 0.810s 8.48e-05s 9542 169 

[theano-users] Re: Some help optimizing a function involving 1D dot products for multidimensional tensors

2017-03-16 Thread Eelke Spaak
Apologies for the messed up profiling code, here is attempt 2:

Class
---
<% time> <#call> <#apply> 

  46.2%46.2%  10.971s   2.74e-05s C   400764  42   
theano.sandbox.cuda.basic_ops.GpuElemwise
  29.9%76.0%   7.098s   3.72e-05s C   190840  20   
theano.sandbox.cuda.basic_ops.GpuCAReduce
   7.2%83.2%   1.699s   1.48e-05s C   114504  12   
theano.sandbox.cuda.blas.GpuDot22
   3.8%87.0%   0.911s   4.78e-05s C19084   2   
theano.sandbox.cuda.basic_ops.GpuJoin
   3.8%90.9%   0.907s   5.59e-06s C   162214  17   
theano.sandbox.cuda.basic_ops.GpuFromHost
   2.9%93.8%   0.700s   1.05e-05s C66794   7   
theano.sandbox.cuda.basic_ops.HostFromGpu
   2.1%95.9%   0.501s   1.14e-06s C   438932  46   
theano.sandbox.cuda.basic_ops.GpuReshape
   1.5%97.4%   0.348s   1.46e-06s C   238550  25   
theano.tensor.elemwise.Elemwise
   1.4%98.7%   0.327s   3.43e-05s C 9542   1   
theano.sandbox.cuda.blas.GpuGemv
   0.4%99.2%   0.097s   9.28e-07s C   104962  11   
theano.sandbox.cuda.basic_ops.GpuDimShuffle
   0.3%99.5%   0.081s   1.06e-06s C76336   8   
theano.sandbox.cuda.basic_ops.GpuSubtensor
   0.2%99.7%   0.042s   4.35e-06s C 9542   1   
theano.tensor.basic.Join
   0.1%99.8%   0.033s   8.62e-07s C38168   4   
theano.tensor.elemwise.DimShuffle
   0.1%99.9%   0.019s   9.75e-07s C19084   2   
theano.tensor.subtensor.Subtensor
   0.1%99.9%   0.015s   1.54e-06s C 9542   1   
theano.sandbox.cuda.basic_ops.GpuAllocEmpty
   0.1%   100.0%   0.012s   6.46e-07s C19084   2   
theano.compile.ops.ViewOp
   ... (remaining 0 Classes account for   0.00%(0.00s) of the runtime)

Ops
---
<% time> <#call> <#apply> 
  24.7%24.7%   5.860s   6.14e-05s C 95420   10   
GpuElemwise{mul,no_inplace}
  17.6%42.2%   4.173s   1.09e-04s C 381684   
GpuCAReduce{add}{1,1,1}
   7.2%49.4%   1.699s   1.48e-05s C 114504   12   
GpuDot22
   4.1%53.5%   0.974s   2.55e-05s C 381684   
GpuCAReduce{add}{0,1,0}
   4.1%57.6%   0.972s   2.55e-05s C 381684   
GpuCAReduce{add}{0,1}
   3.8%61.4%   0.911s   4.78e-05s C 190842   
GpuJoin
   3.8%65.2%   0.907s   5.59e-06s C 162214   17   
GpuFromHost
   2.9%68.2%   0.700s   1.05e-05s C 667947   
HostFromGpu
   2.6%70.7%   0.611s   6.40e-05s C 95421   
GpuElemwise{Composite{(i0 + (-scalar_sigmoid(((i1 + i2) + i3}}[(0, 2)]
   2.1%72.9%   0.503s   5.28e-05s C 95421   
GpuElemwise{Composite{((i0 * i1) - scalar_softplus(i1))},no_inplace}
   2.0%74.8%   0.468s   4.91e-05s C 95421   
GpuElemwise{Composite{(i0 + (-scalar_sigmoid(i1)))}}[(0, 1)]
   1.9%76.7%   0.444s   1.16e-05s C 381684   
GpuCAReduce{add}{0,1,1}
   1.7%78.4%   0.404s   4.24e-05s C 95421   
GpuElemwise{Composite{((i0 + i1) + i2)}}[(0, 1)]
   1.4%79.8%   0.327s   3.43e-05s C 95421   
GpuGemv{inplace}
   1.4%81.1%   0.322s   1.69e-05s C 190842   
GpuCAReduce{add}{0,0,1}
   1.3%82.4%   0.313s   1.09e-05s C 286263   
GpuElemwise{Composite{((i0 * i1) + i2)}}[(0, 2)]
   1.0%83.5%   0.246s   1.29e-05s C 190842   
GpuElemwise{scalar_sigmoid,no_inplace}
   0.9%84.4%   0.221s   1.16e-06s C 190840   20   
GpuReshape{3}
   0.9%85.3%   0.219s   1.15e-06s C 190840   20   
GpuReshape{2}
   0.9%86.2%   0.214s   1.12e-05s C 190842   
GpuElemwise{Composite{(i0 + (i1 * sqr(i2)))},no_inplace}
   ... (remaining 49 Ops account for  13.76%(3.27s) of the runtime)

Apply
--
<% time><#call>  
  16.3%16.3%   3.882s   4.07e-04s   9542   165   
GpuCAReduce{add}{1,1,1}(GpuElemwise{Composite{((i0 * i1) - 
scalar_softplus(i1))},no_inplace}.0)
   3.4%19.7%   0.810s   8.48e-05s   9542   169   
GpuElemwise{mul,no_inplace}(GpuDimShuffle{0,x,1,2}.0, CudaNdarrayConstant{
   3.4%23.1%   0.802s   8.40e-05s   954271   
GpuElemwise{mul,no_inplace}(GpuDimShuffle{0,x,1,2}.0, CudaNdarrayConstant{
   3.1%26.2%   0.730s   7.65e-05s   954270   
GpuElemwise{mul,no_inplace}(GpuDimShuffle{0,x,1,2}.0, CudaNdarrayConstant{
   3.0%29.2%   0.720s   7.55e-05s   9542   170   
GpuElemwise{mul,no_inplace}(GpuDimShuffle{0,x,1,2}.0, CudaNdarrayConstant{
   2.9%32.1%   0.692s   7.25e-05s   954247   

Re: [theano-users] Re: theao install nvcc fatal : Unknown option 'fPIC'

2017-03-16 Thread 李奕
I try the command line but the error exists;  the trick is confusing; I 
install theano multiple times. This's first time to have this error, May 
the cuda not config properly? But I can run theano before and run 
tensorflow on this server.

在 2017年3月14日星期二 UTC+8下午10:22:26,nouiz写道:
>
> The command is: conda install -c rdonnelly theano
>
> On Mon, Mar 13, 2017 at 5:42 PM Frédéric Bastien  > wrote:
>
>> Try Theano beta conda package
>>
>> Conda install -r raydonelly Theano
>>
>> From memory, I'm offline. If that don't work, look in Theano issues I 
>> give the good commande line.
>>
>> Fred
>>
>> Le ven. 10 mars 2017 22:01, 李奕  a 
>> écrit :
>>
>>> Thanks, I use anaconda, So what to do next to slove this problem ?
>>>
>>> 在 2017年3月3日星期五 UTC+8下午9:46:18,nouiz写道:

 How did you get Python? If you compiled it yourself, you missed a 
 compilation option. I have a stack overflow answer to that. Search for 
 fPIC 
 and Theano.

 Fred

 Le mar. 28 févr. 2017 23:23, 李奕  a écrit :

>>> Thanks, very much. Actually In my anaconda version, theano + 
> gpu(cuda8.0) + python3.5 is OK, I want to install in virtual environments.
> In virtual envirment, I run "pip install --upgrade --no-deps 
> git+git://github.com/Theano/Theano.git" to install the newest version;
> But when I run import theano, the errors(unknown option 'fPIC') 
> exists. 
> My environment is conda(virtualenv)'s virtual environment python2, So 
> I wonder whether the virtual environments has effect on theano? Thanks.
>
> 在 2017年2月28日星期二 UTC+8下午9:47:41,Ankit Shah写道:
>
>> This is an error related to conversion of floating point number 
>> approximation. Use latest version of theano and keras [if using] there 
>> is a 
>> fix provided 
>>
>> On Tuesday, February 28, 2017 at 11:55:06 AM UTC+5:30, 李奕 wrote:
>>>
>>> Hello, 
>>>
>>> when I run import theano, the error is:
>>> ['nvcc', '-shared', '-O3', '-use_fast_math', '--compiler-bindir', 
>>> '/usr/local/cuda/bin/nvcc', '-m64', '-Xcompiler', 
>>> '-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden',
>>>  
>>> '-Xlinker', 
>>> '-rpath,/home/mlx/.theano/compiledir_Linux-4.2--generic-x86_64-with-debian-jessie-sid-x86_64-2.7.13-64/cuda_ndarray',
>>>  
>>> '-I/home/mlx/anaconda3/envs/py2/lib/python2.7/site-packages/theano/sandbox/cuda',
>>>  
>>> '-I/home/mlx/anaconda3/envs/py2/lib/python2.7/site-packages/numpy/core/include',
>>>  
>>> '-I/home/mlx/anaconda3/envs/py2/include/python2.7', 
>>> '-I/home/mlx/anaconda3/envs/py2/lib/python2.7/site-packages/theano/gof',
>>>  
>>> '-L/home/mlx/anaconda3/envs/py2/lib', '-o', 
>>> '/home/mlx/.theano/compiledir_Linux-4.2--generic-x86_64-with-debian-jessie-sid-x86_64-2.7.13-64/cuda_ndarray/cuda_ndarray.so',
>>>  
>>> 'mod.cu', '-lcublas', '-lpython2.7', '-lcudart']
>>> ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: 
>>> ('nvcc return status', 1, 'for cmd', 'nvcc -shared -O3 -use_fast_math 
>>> --compiler-bindir /usr/local/cuda/bin/nvcc -m64 -Xcompiler 
>>> -DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden
>>>  
>>> -Xlinker 
>>> -rpath,/home/mlx/.theano/compiledir_Linux-4.2--generic-x86_64-with-debian-jessie-sid-x86_64-2.7.13-64/cuda_ndarray
>>>  
>>> -I/home/mlx/anaconda3/envs/py2/lib/python2.7/site-packages/theano/sandbox/cuda
>>>  
>>> -I/home/mlx/anaconda3/envs/py2/lib/python2.7/site-packages/numpy/core/include
>>>  
>>> -I/home/mlx/anaconda3/envs/py2/include/python2.7 
>>> -I/home/mlx/anaconda3/envs/py2/lib/python2.7/site-packages/theano/gof 
>>> -L/home/mlx/anaconda3/envs/py2/lib -o 
>>> /home/mlx/.theano/compiledir_Linux-4.2--generic-x86_64-with-debian-jessie-sid-x86_64-2.7.13-64/cuda_ndarray/cuda_ndarray.so
>>>  
>>> mod.cu -lcublas -lpython2.7 -lcudart')
>>> WARNING (theano.sandbox.cuda): The cuda backend is deprecated and 
>>> will be removed in the next release (v0.10).  Please switch to the 
>>> gpuarray 
>>> backend. You can get more information about how to switch at this URL:
>>>  
>>> https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
>>>
>>> WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is 
>>> not available  (error: cuda unavailable)
>>>
>>>
>>> So what's the going on here? Thanks very much
>>>
>> -- 
>
> --- 
> 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.