Discussion:
[theano-users] Always Segmentation fault(core dumped) when use theano(NOT when import)
noodles
2017-06-30 10:00:07 UTC
Permalink
Hello,

I encounter a strange problem when using theano. These days I bought
a new computer and install theano on it, and I can even import it in
python with no error, but everytime I create a function, it corrupted with "Segmentation
fault(core dumped)". Below is the detail:
I have installed theano on another two old machine, and they works well.
This new machine is : CPU: intel 7700; GPU 2xGTX1080Ti, OS: ubuntu16.04.
CUDA 8.0, cudnn 5.1 .I use miniconda2 to install theano( conda install
theano), python 2.7, theano 0.9.0
*Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016,
23:09:15) *
*[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2*
*Type "help", "copyright", "credits" or "license" for more information.*
*Anaconda is brought to you by Continuum Analytics.*
*Please check out: http://continuum.io/thanks <http://continuum.io/thanks>
and https://anaconda.org <https://anaconda.org>*
*>>> import theano*
*Using cuDNN version 5110 on context None*
*Mapped name None to device cuda1: GeForce GTX 1080 Ti (0000:02:00.0)*
*>>> *
then I input the code from the exercise of
http://deeplearning.net/software/theano/tutorial/using_gpu.html#gpuarray
================================================================================

*import numpy*
*import theano*
*import theano.tensor as T*
*rng = numpy.random*
*N = 400*
*feats = 784*
*D = (rng.randn(N, feats).astype(theano.config.floatX),*
*rng.randint(size=N,low=0, high=2).astype(theano.config.floatX))*
*training_steps = 10000*
*# Declare Theano symbolic variables*
*x = T.matrix("x")*
*y = T.vector("y")*
*w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w")*
*b = theano.shared(numpy.asarray(0., dtype=theano.config.floatX), name="b")*
*x.tag.test_value = D[0]*
*y.tag.test_value = D[1]*
*# Construct Theano expression graph*
*p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probability of having a one*
*prediction = p_1 > 0.5 # The prediction that is done: 0 or 1*
*xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy*
*cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize*
*gw,gb = T.grad(cost, [w,b])*
*# Compile expressions to functions*
*train = theano.function(*
* inputs=[x,y],*
* outputs=[prediction, xent],*
* updates=[(w, w-0.01*gw), (b, b-0.01*gb)],*
* name = "train")*

==============================================================================
It corrupted at this line.
I have run numpy.test() and scipy.test() and they work well, but when I run theano.test(),
it corrupted too. The full log is too long, so I just post
the end of it:

*/home/nice/miniconda2/lib/python2.7/site-packages/
RuntimeWarning: All-NaN axis encountered*
* return np.isinf(np.nanmax(arr)) or np.isinf(np.nanmin(arr))*
*.E......................................../home/nice/
UserWarning: CVM does not support memory profile, using Stack VM.*
* 'CVM does not support memory profile, using Stack VM.')*
*...........SS.............0.930614401665*
*0.930614401665*
*0.930614401665*
*0.930614401665*
*...........................................................
............................................................
...................................E/home/nice/miniconda2/
UserWarning: LoopGC does not support partial evaluation, using Stack VM.*
* 'LoopGC does not support partial evaluation, '*
*.....EEEESegmentation fault (core dumped)*
I hope someone can help me.
--
---
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-06-30 12:36:31 UTC
Permalink
Install the dev version of Theano. It contains segmentation fault fixes.

If that don't work, tell us, but I think it should work.
Post by noodles
Hello,
I encounter a strange problem when using theano. These days I bought
a new computer and install theano on it, and I can even import it in
python with no error, but everytime I create a function, it corrupted with "Segmentation
I have installed theano on another two old machine, and they works well.
This new machine is : CPU: intel 7700; GPU 2xGTX1080Ti, OS: ubuntu16.04.
CUDA 8.0, cudnn 5.1 .I use miniconda2 to install theano( conda install
theano), python 2.7, theano 0.9.0
*Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016,
23:09:15) *
*[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2*
*Type "help", "copyright", "credits" or "license" for more information.*
*Anaconda is brought to you by Continuum Analytics.*
*Please check out: http://continuum.io/thanks <http://continuum.io/thanks
and https://anaconda.org <https://anaconda.org>*
*>>> import theano*
*Using cuDNN version 5110 on context None*
*Mapped name None to device cuda1: GeForce GTX 1080 Ti (0000:02:00.0)*
*>>> *
then I input the code from the exercise of
http://deeplearning.net/software/theano/tutorial/using_gpu.html#gpuarray
================================================================================
*import numpy*
*import theano*
*import theano.tensor as T*
*rng = numpy.random*
*N = 400*
*feats = 784*
*D = (rng.randn(N, feats).astype(theano.config.floatX),*
*rng.randint(size=N,low=0, high=2).astype(theano.config.floatX))*
*training_steps = 10000*
*# Declare Theano symbolic variables*
*x = T.matrix("x")*
*y = T.vector("y")*
*w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w")*
*b = theano.shared(numpy.asarray(0., dtype=theano.config.floatX), name="b")*
*x.tag.test_value = D[0]*
*y.tag.test_value = D[1]*
*# Construct Theano expression graph*
*p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probability of having a one*
*prediction = p_1 > 0.5 # The prediction that is done: 0 or 1*
*xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy*
*cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize*
*gw,gb = T.grad(cost, [w,b])*
*# Compile expressions to functions*
*train = theano.function(*
* inputs=[x,y],*
* outputs=[prediction, xent],*
* updates=[(w, w-0.01*gw), (b, b-0.01*gb)],*
* name = "train")*
==============================================================================
It corrupted at this line.
I have run numpy.test() and scipy.test() and they work well, but when I
run theano.test(), it corrupted too. The full log is too long, so I just
post
*/home/nice/miniconda2/lib/python2.7/site-packages/
RuntimeWarning: All-NaN axis encountered*
* return np.isinf(np.nanmax(arr)) or np.isinf(np.nanmin(arr))*
*.E......................................../home/nice/
UserWarning: CVM does not support memory profile, using Stack VM.*
* 'CVM does not support memory profile, using Stack VM.')*
*...........SS.............0.930614401665*
*0.930614401665*
*0.930614401665*
*0.930614401665*
*...........................................................
............................................................
...................................E/home/nice/miniconda2/
UserWarning: LoopGC does not support partial evaluation, using Stack VM.*
* 'LoopGC does not support partial evaluation, '*
*.....EEEESegmentation fault (core dumped)*
I hope someone can help me.
--
---
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.
noodles
2017-07-02 05:53:35 UTC
Permalink
It works. When I install theano 1.0, it don't report segmentation fault.
But the problem is that I install theano to use lasagne and pylearn2, which
has't support theano1.0 (it report"ImportError: No module named
six.moves”, do you know how to resolve this?

Thank you very much.

圚 2017幎6月30日星期五 UTC+8䞋午8:36:49nouiz写道
Post by Frédéric Bastien
Install the dev version of Theano. It contains segmentation fault fixes.
If that don't work, tell us, but I think it should work.
Post by noodles
Hello,
I encounter a strange problem when using theano. These days I bought
a new computer and install theano on it, and I can even import it in
python with no error, but everytime I create a function, it corrupted
I have installed theano on another two old machine, and they
ubuntu16.04. CUDA 8.0, cudnn 5.1 .I use miniconda2 to install theano(
conda install theano), python 2.7, theano 0.9.0
*Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016,
23:09:15) *
*[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2*
*Type "help", "copyright", "credits" or "license" for more information.*
*Anaconda is brought to you by Continuum Analytics.*
*Please check out: http://continuum.io/thanks <
http://continuum.io/thanks>
and https://anaconda.org <https://anaconda.org>*
*>>> import theano*
*Using cuDNN version 5110 on context None*
*Mapped name None to device cuda1: GeForce GTX 1080 Ti (0000:02:00.0)*
*>>> *
then I input the code from the exercise of
http://deeplearning.net/software/theano/tutorial/using_gpu.html#gpuarray
================================================================================
*import numpy*
*import theano*
*import theano.tensor as T*
*rng = numpy.random*
*N = 400*
*feats = 784*
*D = (rng.randn(N, feats).astype(theano.config.floatX),*
*rng.randint(size=N,low=0, high=2).astype(theano.config.floatX))*
*training_steps = 10000*
*# Declare Theano symbolic variables*
*x = T.matrix("x")*
*y = T.vector("y")*
*w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w")*
*b = theano.shared(numpy.asarray(0., dtype=theano.config.floatX), name="b")*
*x.tag.test_value = D[0]*
*y.tag.test_value = D[1]*
*# Construct Theano expression graph*
*p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probability of having a one*
*prediction = p_1 > 0.5 # The prediction that is done: 0 or 1*
*xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy*
*cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize*
*gw,gb = T.grad(cost, [w,b])*
*# Compile expressions to functions*
*train = theano.function(*
* inputs=[x,y],*
* outputs=[prediction, xent],*
* updates=[(w, w-0.01*gw), (b, b-0.01*gb)],*
* name = "train")*
==============================================================================
It corrupted at this line.
I have run numpy.test() and scipy.test() and they work well, but when I
run theano.test(), it corrupted too. The full log is too long, so I just
post
*/home/nice/miniconda2/lib/python2.7/site-packages/
RuntimeWarning: All-NaN axis encountered*
* return np.isinf(np.nanmax(arr)) or np.isinf(np.nanmin(arr))*
*.E......................................../home/nice/
UserWarning: CVM does not support memory profile, using Stack VM.*
* 'CVM does not support memory profile, using Stack VM.')*
*...........SS.............0.930614401665*
*0.930614401665*
*0.930614401665*
*0.930614401665*
*...........................................................
............................................................
...................................E/home/nice/miniconda2/
UserWarning: LoopGC does not support partial evaluation, using Stack VM.*
* 'LoopGC does not support partial evaluation, '*
*.....EEEESegmentation fault (core dumped)*
I hope someone can help me.
--
---
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.
Pascal Lamblin
2017-07-03 22:02:21 UTC
Permalink
For pylearn2, you can change the imports to use `six` directly, rather than
`theano.six`.
Post by noodles
It works. When I install theano 1.0, it don't report segmentation fault.
But the problem is that I install theano to use lasagne and pylearn2, which
has't support theano1.0 (it report"ImportError: No module named
six.moves”, do you know how to resolve this?
Thank you very much.
圚 2017幎6月30日星期五 UTC+8䞋午8:36:49nouiz写道
Post by Frédéric Bastien
Install the dev version of Theano. It contains segmentation fault fixes.
If that don't work, tell us, but I think it should work.
Post by noodles
Hello,
I encounter a strange problem when using theano. These days I bought
a new computer and install theano on it, and I can even import it in
python with no error, but everytime I create a function, it corrupted
I have installed theano on another two old machine, and they
works well. This new machine is : CPU: intel 7700; GPU 2xGTX1080Ti,
OS: ubuntu16.04. CUDA 8.0, cudnn 5.1 .I use miniconda2 to install
theano( conda install theano), python 2.7, theano 0.9.0
*Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016,
23:09:15) *
*[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2*
*Type "help", "copyright", "credits" or "license" for more information.*
*Anaconda is brought to you by Continuum Analytics.*
*Please check out: http://continuum.io/thanks <
http://continuum.io/thanks>
and https://anaconda.org <https://anaconda.org>*
*>>> import theano*
*Using cuDNN version 5110 on context None*
*Mapped name None to device cuda1: GeForce GTX 1080 Ti (0000:02:00.0)*
*>>> *
then I input the code from the exercise of
http://deeplearning.net/software/theano/tutorial/using_gpu.html#gpuarray
================================================================================
*import numpy*
*import theano*
*import theano.tensor as T*
*rng = numpy.random*
*N = 400*
*feats = 784*
*D = (rng.randn(N, feats).astype(theano.config.floatX),*
*rng.randint(size=N,low=0, high=2).astype(theano.config.floatX))*
*training_steps = 10000*
*# Declare Theano symbolic variables*
*x = T.matrix("x")*
*y = T.vector("y")*
*w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w")*
*b = theano.shared(numpy.asarray(0., dtype=theano.config.floatX), name="b")*
*x.tag.test_value = D[0]*
*y.tag.test_value = D[1]*
*# Construct Theano expression graph*
*p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probability of having a one*
*prediction = p_1 > 0.5 # The prediction that is done: 0 or 1*
*xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy*
*cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize*
*gw,gb = T.grad(cost, [w,b])*
*# Compile expressions to functions*
*train = theano.function(*
* inputs=[x,y],*
* outputs=[prediction, xent],*
* updates=[(w, w-0.01*gw), (b, b-0.01*gb)],*
* name = "train")*
==============================================================================
It corrupted at this line.
I have run numpy.test() and scipy.test() and they work well, but when I
run theano.test(), it corrupted too. The full log is too long, so I
just post
*/home/nice/miniconda2/lib/python2.7/site-packages/
RuntimeWarning: All-NaN axis encountered*
* return np.isinf(np.nanmax(arr)) or np.isinf(np.nanmin(arr))*
*.E......................................../home/nice/
UserWarning: CVM does not support memory profile, using Stack VM.*
* 'CVM does not support memory profile, using Stack VM.')*
*...........SS.............0.930614401665*
*0.930614401665*
*0.930614401665*
*0.930614401665*
*...........................................................
............................................................
...................................E/home/nice/miniconda2/
UserWarning: LoopGC does not support partial evaluation, using Stack VM.*
* 'LoopGC does not support partial evaluation, '*
*.....EEEESegmentation fault (core dumped)*
I hope someone can help me.
--
---
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 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.
noodles
2017-07-04 12:42:42 UTC
Permalink
Ok, I'll try it, thanks

圚 2017幎6月30日星期五 UTC+8䞋午6:00:07noodles写道
Post by noodles
Hello,
I encounter a strange problem when using theano. These days I bought
a new computer and install theano on it, and I can even import it in
python with no error, but everytime I create a function, it corrupted with "Segmentation
I have installed theano on another two old machine, and they works well.
This new machine is : CPU: intel 7700; GPU 2xGTX1080Ti, OS: ubuntu16.04.
CUDA 8.0, cudnn 5.1 .I use miniconda2 to install theano( conda install
theano), python 2.7, theano 0.9.0
*Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016,
23:09:15) *
*[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2*
*Type "help", "copyright", "credits" or "license" for more information.*
*Anaconda is brought to you by Continuum Analytics.*
*Please check out: http://continuum.io/thanks <http://continuum.io/thanks
and https://anaconda.org <https://anaconda.org>*
*>>> import theano*
*Using cuDNN version 5110 on context None*
*Mapped name None to device cuda1: GeForce GTX 1080 Ti (0000:02:00.0)*
*>>> *
then I input the code from the exercise of
http://deeplearning.net/software/theano/tutorial/using_gpu.html#gpuarray
================================================================================
*import numpy*
*import theano*
*import theano.tensor as T*
*rng = numpy.random*
*N = 400*
*feats = 784*
*D = (rng.randn(N, feats).astype(theano.config.floatX),*
*rng.randint(size=N,low=0, high=2).astype(theano.config.floatX))*
*training_steps = 10000*
*# Declare Theano symbolic variables*
*x = T.matrix("x")*
*y = T.vector("y")*
*w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w")*
*b = theano.shared(numpy.asarray(0., dtype=theano.config.floatX), name="b")*
*x.tag.test_value = D[0]*
*y.tag.test_value = D[1]*
*# Construct Theano expression graph*
*p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probability of having a one*
*prediction = p_1 > 0.5 # The prediction that is done: 0 or 1*
*xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy*
*cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize*
*gw,gb = T.grad(cost, [w,b])*
*# Compile expressions to functions*
*train = theano.function(*
* inputs=[x,y],*
* outputs=[prediction, xent],*
* updates=[(w, w-0.01*gw), (b, b-0.01*gb)],*
* name = "train")*
==============================================================================
It corrupted at this line.
I have run numpy.test() and scipy.test() and they work well, but when I
run theano.test(), it corrupted too. The full log is too long, so I just
post
*/home/nice/miniconda2/lib/python2.7/site-packages/
RuntimeWarning: All-NaN axis encountered*
* return np.isinf(np.nanmax(arr)) or np.isinf(np.nanmin(arr))*
*.E......................................../home/nice/
UserWarning: CVM does not support memory profile, using Stack VM.*
* 'CVM does not support memory profile, using Stack VM.')*
*...........SS.............0.930614401665*
*0.930614401665*
*0.930614401665*
*0.930614401665*
*...........................................................
............................................................
...................................E/home/nice/miniconda2/
UserWarning: LoopGC does not support partial evaluation, using Stack VM.*
* 'LoopGC does not support partial evaluation, '*
*.....EEEESegmentation fault (core dumped)*
I hope someone can help me.
--
---
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...