Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

cannot pass theano Unit Test by using the numpy code 12/26/2016 on cpu #8420

Closed
KevinYuk opened this issue Dec 26, 2016 · 17 comments
Closed

Comments

@KevinYuk
Copy link

KevinYuk commented Dec 26, 2016

  • Recreate steps:
  1. install official theano from master branch.
  2. Set the .theanorc configuration as below:
[global]
device = cpu
floatX = float32
cxx = g++
mode = FAST_RUN
openmp = True
openmp_elemwise_minsize = 10
allow_gc = False

[gcc]
cxxflags = -fopenmp -O3 -opt-prefetch=2
[blas]
ldflags=-L/home/yukun/.local/lib -lopenblas
  1. install officail numpy from master branch
  2. run nosetests in theano main DIR. (This will take a long time, more than 2 hours. )
  3. You can find The whole theano nosetests result is at the end of the issue description.
  • Important notes(can pass theano UT by using numpy release version):
    CAN PASS theano Unit Test by using numpy release versoin numpy-1.11.2rc1.

  • For save your time, you guys can also do quick verification to check the theano UT ERROR and FAIL by below methods.(Surely, it's only include partial error report):
    Quick verification method:

[yukun@xcatmn theano]$ nosetests -v theano/sparse/tests/test_sp2.py
test_infer_shape (theano.sparse.tests.test_sp2.BinomialTester) ... ERROR
test_op (theano.sparse.tests.test_sp2.BinomialTester) ... ERROR
test_infer_shape (theano.sparse.tests.test_sp2.MultinomialTester) ... ok
test_op (theano.sparse.tests.test_sp2.MultinomialTester) ... ok
test_infer_shape (theano.sparse.tests.test_sp2.PoissonTester) ... ok
test_op (theano.sparse.tests.test_sp2.PoissonTester) ... ok

======================================================================
ERROR: test_infer_shape (theano.sparse.tests.test_sp2.BinomialTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 101, in test_infer_shape
    self.op_class)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 251, in _compile_and_check
    numeric_outputs = outputs_function(*numeric_inputs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/sandbox/sp2.py", line 126, in perform
    binomial = numpy.random.binomial(n, p, size=shape)
  File "mtrand.pyx", line 3764, in mtrand.RandomState.binomial (numpy/random/mtrand/mtrand.c:28820)
TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe'
Apply node that caused the error: Binomial{format='csc', dtype='float64'}(<TensorType(float32, scalar)>, <TensorType(float32, scalar)>, <TensorType(int64, vector)>)
Toposort index: 0
Inputs types: [TensorType(float32, scalar), TensorType(float32, scalar), TensorType(int64, vector)]
Inputs shapes: [(), (), (2,)]
Inputs strides: [(), (), (8,)]
Inputs values: [array(5.0, dtype=float32), array(0.25, dtype=float32), array([3, 5])]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 99, in test_infer_shape
    [Binomial(sp_format, o_type)(*self.inputs)],

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
ERROR: test_op (theano.sparse.tests.test_sp2.BinomialTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 86, in test_op
    tested = f(*self._inputs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/sandbox/sp2.py", line 126, in perform
    binomial = numpy.random.binomial(n, p, size=shape)
  File "mtrand.pyx", line 3764, in mtrand.RandomState.binomial (numpy/random/mtrand/mtrand.c:28820)
TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe'
Apply node that caused the error: Binomial{format='csc', dtype='float64'}(<TensorType(float32, scalar)>, <TensorType(float32, scalar)>, <TensorType(int64, vector)>)
Toposort index: 0
Inputs types: [TensorType(float32, scalar), TensorType(float32, scalar), TensorType(int64, vector)]
Inputs shapes: [(), (), (2,)]
Inputs strides: [(), (), (8,)]
Inputs values: [array(5.0, dtype=float32), array(0.25, dtype=float32), array([3, 5])]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 84, in test_op
    Binomial(sp_format, o_type)(*self.inputs))

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

----------------------------------------------------------------------
Ran 6 tests in 10.112s

FAILED (errors=2)
[yukun@xcatmn theano]$
  • The whole theano nosetests result:
    (Please ingore the two CAReduce errors below. It's caused by offical theano:
    FAIL: test_c (theano.tensor.tests.test_elemwise.test_CAReduce)
    FAIL: test_perform (theano.tensor.tests.test_elemwise.test_CAReduce)
    )
  idx = numpy.random.random_integers(huge, size=2) % shape
/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/typed_list/tests/test_basic.py:37: DeprecationWarning: This function is deprecated. Please call randint(1, 1073741824 + 1) instead
  idx = numpy.random.random_integers(huge, size=2) % shape
...................................................S/usr/lib64/python2.7/unittest/case.py:369: UserWarning: consider_constant() is deprecated, use zero_grad() or disconnected_grad() instead.
  testMethod()
............................................SS......SSSSS...SSSSS.......S.........SS.....................
======================================================================
ERROR: test_infer_shape (theano.sparse.tests.test_sp2.BinomialTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 101, in test_infer_shape
    self.op_class)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 251, in _compile_and_check
    numeric_outputs = outputs_function(*numeric_inputs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/sandbox/sp2.py", line 126, in perform
    binomial = numpy.random.binomial(n, p, size=shape)
  File "mtrand.pyx", line 3760, in mtrand.RandomState.binomial (numpy/random/mtrand/mtrand.c:28715)
TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe'
Apply node that caused the error: Binomial{format='csc', dtype='float64'}(<TensorType(float32, scalar)>, <TensorType(float32, scalar)>, <TensorType(int64, vector)>)
Toposort index: 0
Inputs types: [TensorType(float32, scalar), TensorType(float32, scalar), TensorType(int64, vector)]
Inputs shapes: [(), (), (2,)]
Inputs strides: [(), (), (8,)]
Inputs values: [array(5.0, dtype=float32), array(0.25, dtype=float32), array([3, 5])]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 99, in test_infer_shape
    [Binomial(sp_format, o_type)(*self.inputs)],

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
ERROR: test_op (theano.sparse.tests.test_sp2.BinomialTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 86, in test_op
    tested = f(*self._inputs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/sandbox/sp2.py", line 126, in perform
    binomial = numpy.random.binomial(n, p, size=shape)
  File "mtrand.pyx", line 3760, in mtrand.RandomState.binomial (numpy/random/mtrand/mtrand.c:28715)
TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe'
Apply node that caused the error: Binomial{format='csc', dtype='float64'}(<TensorType(float32, scalar)>, <TensorType(float32, scalar)>, <TensorType(int64, vector)>)
Toposort index: 0
Inputs types: [TensorType(float32, scalar), TensorType(float32, scalar), TensorType(int64, vector)]
Inputs shapes: [(), (), (2,)]
Inputs strides: [(), (), (8,)]
Inputs values: [array(5.0, dtype=float32), array(0.25, dtype=float32), array([3, 5])]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 84, in test_op
    Binomial(sp_format, o_type)(*self.inputs))

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
ERROR: test_DownsampleFactorMax (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 191, in test_DownsampleFactorMax
    mode=mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_max_pool_2d_2D (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 670, in test_max_pool_2d_2D
    mode=mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_max_pool_2d_3D (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 716, in test_max_pool_2d_3D
    mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_max_pool_2d_6D (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 743, in test_max_pool_2d_6D
    mode=mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_grad (theano.tensor.tests.test_basic.ArctanhInplaceTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_basic.py", line 483, in test_grad
    eps=_grad_eps)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 91, in verify_grad
    T.verify_grad(op, pt, n_tests, rng, *args, **kwargs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gradient.py", line 1697, in verify_grad
    abs_tol, rel_tol)
GradientError: GradientError: numeric gradient and analytic gradient exceed tolerance:
        At position 4 of argument 0,
            abs. error = 3.537018,  abs. tolerance = 0.010000
            rel. error = 0.013429,  rel. tolerance = 0.010000
Exception args:
The error happened with the following inputs:, [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)],
The value of eps is:, None,
The out_type is:, None, Test arctanh_inplace::normal: Error occurred while computing the gradient on the following inputs: [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)]

======================================================================
ERROR: test_grad (theano.tensor.tests.test_basic.ArctanhTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_basic.py", line 483, in test_grad
    eps=_grad_eps)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 91, in verify_grad
    T.verify_grad(op, pt, n_tests, rng, *args, **kwargs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gradient.py", line 1697, in verify_grad
    abs_tol, rel_tol)
GradientError: GradientError: numeric gradient and analytic gradient exceed tolerance:
        At position 4 of argument 0,
            abs. error = 3.537018,  abs. tolerance = 0.010000
            rel. error = 0.013429,  rel. tolerance = 0.010000
Exception args:
The error happened with the following inputs:, [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)],
The value of eps is:, None,
The out_type is:, None, Test Elemwise{arctanh,no_inplace}::normal: Error occurred while computing the gradient on the following inputs: [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)]

======================================================================
ERROR: test_extract_diag (theano.tensor.tests.test_nlinalg.test_diag)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_nlinalg.py", line 312, in test_extract_diag
    r = f()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/nlinalg.py", line 212, in perform
    rval.strides = (x.strides[0] + x.strides[1],)
TypeError: invalid strides
Apply node that caused the error: ExtractDiag{view=False}(<TensorType(float32, matrix)>)
Toposort index: 0
Inputs types: [TensorType(float32, matrix)]
Inputs shapes: [(1, 1)]
Inputs strides: [(9223372036854775807, 9223372036854775807)]
Inputs values: [array([[ 0.25913185]], dtype=float32)]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_nlinalg.py", line 302, in test_extract_diag
    g = extract_diag(x)

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
FAIL: theano.gof.tests.test_vm.test_allow_gc_cvm
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/tests/test_vm.py", line 229, in test_allow_gc_cvm
    assert f.fn.storage_map[n][0] is None
AssertionError

======================================================================
FAIL: test_broadcastable_patterns (theano.tensor.tests.test_basic.t_dot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_basic.py", line 4911, in test_broadcastable_patterns
    f(xval, yval, tval)  # debugmode checks result
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
AssertionError: xx is a double-strided matrix, and should have been copied into a memory-contiguous one.
Apply node that caused the error: CGemv{inplace}(AllocEmpty{dtype='float32'}.0, TensorConstant{1.0}, <TensorType(float32, (True, True))>, <TensorType(float32, vector)>, TensorConstant{0.0})
Toposort index: 1
Inputs types: [TensorType(float32, (True,)), TensorType(float32, scalar), TensorType(float32, (True, True)), TensorType(float32, vector), TensorType(float32, scalar)]
Inputs shapes: [(1,), (), (1, 1), (1,), ()]
Inputs strides: [(9223372036854775807,), (), (9223372036854775807, 9223372036854775807), (9223372036854775807,), ()]
Inputs values: [array([ 1.10000002], dtype=float32), array(1.0, dtype=float32), array([[ 1.29999995]], dtype=float32), array([ 1.20000005], dtype=float32), array(0.0, dtype=float32)]
Outputs clients: [[Elemwise{Composite{((i0 * i1) + (i2 * i3))}}[(0, 1)](TensorConstant{(1,) of 3.0}, CGemv{inplace}.0, TensorConstant{(1,) of 2.0}, <TensorType(float32, (True,))>)]]

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
FAIL: test_gemv (theano.tensor.tests.test_blas_c.TestBlasStridesC)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_blas.py", line 2100, in test_gemv
    self.cmp_gemv(3, (3, 1), 1)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_blas.py", line 2091, in cmp_gemv
    assert numpy.allclose(a.get_value(), a_n), (a.get_value(), a_n)
AssertionError: (array([ 0.91474393,  0.62098558]), array([ 0.9220191 ,  0.63241739]))

======================================================================
FAIL: test_c (theano.tensor.tests.test_elemwise.test_CAReduce)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 541, in test_c
    self.with_linker(gof.CLinker(), scalar.and_, dtype=dtype)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 472, in with_linker
    (f_xv, zv, xsh, tosum))
AssertionError: (array(1, dtype=int8), array(-1, dtype=int8), (5, 0), [0, 1])

======================================================================
FAIL: test_perform (theano.tensor.tests.test_elemwise.test_CAReduce)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 506, in test_perform
    self.with_linker(gof.PerformLinker(), scalar.and_, dtype=dtype)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 472, in with_linker
    (f_xv, zv, xsh, tosum))
AssertionError: (array(1, dtype=int8), array(-1, dtype=int8), (5, 0), [0, 1])

======================================================================
FAIL: test_local_log_erfc (theano.tensor.tests.test_opt.T_local_erfc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_opt.py", line 4780, in test_local_log_erfc
    assert all(numpy.isfinite(f(val)))
AssertionError

----------------------------------------------------------------------
Ran 3039 tests in 8032.064s

FAILED (SKIP=116, errors=9, failures=6)
@charris
Copy link
Member

charris commented Dec 26, 2016

Looks like Theano hasn't kept up with DeprecationWarnings and FutureWarnings, in particular using floats as indexes and implicit casting of float32 to int32. You should open an issue with the Theano folks. Are you using the latest Theano version?

@juliantaylor
Copy link
Contributor

I don't really like that we are suddenly turning this into an error, it breaks a lot of stuff.
What happened to the break it in the betas/rc, warn in release method? Or did we already do that in 1.11 for this?

@KevinYuk
Copy link
Author

@carletes Thanks very much for your quick feedback.

  1. I am using the latest theano and latest numpy;
  2. You suggest report this issue to theano team, and the issue is: "Theano hasn't kept up with DeprecationWarnings and FutureWarnings, in particular using floats as indexes and implicit casting of float32 to int32". Right?
  3. Besides this issue of the theano, is there anything else issue caused by theano? Because there are about 9 ERRORS and 6 FAIL.

@charris
Copy link
Member

charris commented Dec 26, 2016

@juliantaylor I only changed things that were warned about in NumPy 1.9 or earlier, i.e., at least two years ago.

@KevinYuk Yes, there appear to be other errors, arctanh has changed, it is now black listed for more glibc versions, and there may be errors that are genuinely on the numpy side. I haven't looked too closely yet. BTW, best to avoid lines starting with # in non-code, markdown interprets them as headings.

@charris
Copy link
Member

charris commented Dec 26, 2016

@KevinYuk I'd be much obliged if you could run tests against the maintenance/1.12.x branch. The errors in v1.11.2rc1 are sparse tests, which is scipy rather than numpy.

@charris
Copy link
Member

charris commented Dec 26, 2016

@KevinYuk Relaxed stride checking also seems to be a problem. BTW, these changes in master will be in the 1.13 release, so probably 4-6 months off.

@KevinYuk
Copy link
Author

@charris Let's try maintenance/1.12.x branch. One second.

@KevinYuk
Copy link
Author

KevinYuk commented Dec 26, 2016

@charris Please check it by using maintenance/1.12.x branch, still report error and fail. It seems that 1.11x works fine. So maybe something wrong happened from 1.11.x to 1.12.x changing.

log:

======================================================================
ERROR: test_infer_shape (theano.sparse.tests.test_sp2.BinomialTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 101, in test_infer_shape
    self.op_class)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 251, in _compile_and_check
    numeric_outputs = outputs_function(*numeric_inputs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/sandbox/sp2.py", line 126, in perform
    binomial = numpy.random.binomial(n, p, size=shape)
  File "mtrand.pyx", line 3764, in mtrand.RandomState.binomial (numpy/random/mtrand/mtrand.c:28820)
TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe'
Apply node that caused the error: Binomial{format='csc', dtype='float64'}(<TensorType(float32, scalar)>, <TensorType(float32, scalar)>, <TensorType(int64, vector)>)
Toposort index: 0
Inputs types: [TensorType(float32, scalar), TensorType(float32, scalar), TensorType(int64, vector)]
Inputs shapes: [(), (), (2,)]
Inputs strides: [(), (), (8,)]
Inputs values: [array(5.0, dtype=float32), array(0.25, dtype=float32), array([3, 5])]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 99, in test_infer_shape
    [Binomial(sp_format, o_type)(*self.inputs)],

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
ERROR: test_op (theano.sparse.tests.test_sp2.BinomialTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 86, in test_op
    tested = f(*self._inputs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 875, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/link.py", line 317, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/compile/function_module.py", line 862, in __call__
    self.fn() if output_subset is None else\
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/op.py", line 905, in rval
    r = p(n, [x[0] for x in i], o)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/sandbox/sp2.py", line 126, in perform
    binomial = numpy.random.binomial(n, p, size=shape)
  File "mtrand.pyx", line 3764, in mtrand.RandomState.binomial (numpy/random/mtrand/mtrand.c:28820)
TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe'
Apply node that caused the error: Binomial{format='csc', dtype='float64'}(<TensorType(float32, scalar)>, <TensorType(float32, scalar)>, <TensorType(int64, vector)>)
Toposort index: 0
Inputs types: [TensorType(float32, scalar), TensorType(float32, scalar), TensorType(int64, vector)]
Inputs shapes: [(), (), (2,)]
Inputs strides: [(), (), (8,)]
Inputs values: [array(5.0, dtype=float32), array(0.25, dtype=float32), array([3, 5])]
Outputs clients: [['output']]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 45, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/sparse/tests/test_sp2.py", line 84, in test_op
    Binomial(sp_format, o_type)(*self.inputs))

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

======================================================================
ERROR: test_DownsampleFactorMax (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 191, in test_DownsampleFactorMax
    mode=mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_max_pool_2d_2D (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 670, in test_max_pool_2d_2D
    mode=mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_max_pool_2d_3D (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 716, in test_max_pool_2d_3D
    mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_max_pool_2d_6D (theano.tensor.signal.tests.test_pool.TestDownsampleFactorMax)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 743, in test_max_pool_2d_6D
    mode=mode)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/signal/tests/test_pool.py", line 40, in numpy_max_pool_2d
    output_val = numpy.zeros(out_shp)
TypeError: 'float' object cannot be interpreted as an index

======================================================================
ERROR: test_grad (theano.tensor.tests.test_basic.ArctanhInplaceTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_basic.py", line 483, in test_grad
    eps=_grad_eps)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 91, in verify_grad
    T.verify_grad(op, pt, n_tests, rng, *args, **kwargs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gradient.py", line 1697, in verify_grad
    abs_tol, rel_tol)
GradientError: GradientError: numeric gradient and analytic gradient exceed tolerance:
        At position 4 of argument 0,
            abs. error = 3.537018,  abs. tolerance = 0.010000
            rel. error = 0.013429,  rel. tolerance = 0.010000
Exception args:
The error happened with the following inputs:, [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)],
The value of eps is:, None,
The out_type is:, None, Test arctanh_inplace::normal: Error occurred while computing the gradient on the following inputs: [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)]

======================================================================
ERROR: test_grad (theano.tensor.tests.test_basic.ArctanhTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_basic.py", line 483, in test_grad
    eps=_grad_eps)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tests/unittest_tools.py", line 91, in verify_grad
    T.verify_grad(op, pt, n_tests, rng, *args, **kwargs)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gradient.py", line 1697, in verify_grad
    abs_tol, rel_tol)
GradientError: GradientError: numeric gradient and analytic gradient exceed tolerance:
        At position 4 of argument 0,
            abs. error = 3.537018,  abs. tolerance = 0.010000
            rel. error = 0.013429,  rel. tolerance = 0.010000
Exception args:
The error happened with the following inputs:, [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)],
The value of eps is:, None,
The out_type is:, None, Test Elemwise{arctanh,no_inplace}::normal: Error occurred while computing the gradient on the following inputs: [array([[ 0.28898013,  0.98691875, -0.37341487],
       [-0.83661169, -0.99454761, -0.57619613]], dtype=float32)]

======================================================================
FAIL: theano.gof.tests.test_vm.test_allow_gc_cvm
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/gof/tests/test_vm.py", line 229, in test_allow_gc_cvm
    assert f.fn.storage_map[n][0] is None
AssertionError

======================================================================
FAIL: test_c (theano.tensor.tests.test_elemwise.test_CAReduce)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 541, in test_c
    self.with_linker(gof.CLinker(), scalar.and_, dtype=dtype)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 472, in with_linker
    (f_xv, zv, xsh, tosum))
AssertionError: (array(1, dtype=int8), array(-1, dtype=int8), (5, 0), [0, 1])
======================================================================
FAIL: test_perform (theano.tensor.tests.test_elemwise.test_CAReduce)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 506, in test_perform
    self.with_linker(gof.PerformLinker(), scalar.and_, dtype=dtype)
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_elemwise.py", line 472, in with_linker
    (f_xv, zv, xsh, tosum))
AssertionError: (array(1, dtype=int8), array(-1, dtype=int8), (5, 0), [0, 1])

======================================================================
FAIL: test_local_log_erfc (theano.tensor.tests.test_opt.T_local_erfc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yukun/theano_pak/_2_stage_opti_theano/dl4mt-opti/theano/theano/tensor/tests/test_opt.py", line 4780, in test_local_log_erfc
    assert all(numpy.isfinite(f(val)))
AssertionError

----------------------------------------------------------------------
Ran 3039 tests in 7024.920s

FAILED (SKIP=116, errors=8, failures=4)

@charris
Copy link
Member

charris commented Dec 31, 2016

Thanks for running the tests! It looks like 1.12 will be a problem for theano. The indexing with a float should be easy to fix, and I suspect the arctanh test just requires a change in precision, not sure about the other failures. Do you know what version of glibc you have?

@KevinYuk
Copy link
Author

KevinYuk commented Jan 3, 2017

@charris Please check below:
Name : glibc
Version : 2.17
Release : 106.el7_2.6
Architecture: x86_64
Install Date: Thu 03 Nov 2016 12:39:28 AM CST
Group : System Environment/Libraries
Size : 13992577
License : LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Signature : RSA/SHA256, Fri 13 May 2016 07:39:34 AM CST, Key ID 24c6a8a7f4a80eb5
Source RPM : glibc-2.17-106.el7_2.6.src.rpm
Build Date : Thu 12 May 2016 09:25:14 PM CST
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem http://bugs.centos.org
Vendor : CentOS
URL : http://www.gnu.org/software/glibc/
Summary : The GNU libc libraries
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.

@charris
Copy link
Member

charris commented Jan 3, 2017

Yep, glibc > 2.17 is now needed to avoid the numpy fallback functions. It was previously accepted as the earliest good version, but some precision problems still turned up. See numpy/core/src/private/config.h.

#if !__GLIBC_PREREQ(2, 18)

#undef HAVE_CASIN
#undef HAVE_CASINF
#undef HAVE_CASINL
#undef HAVE_CASINH
#undef HAVE_CASINHF
#undef HAVE_CASINHL
#undef HAVE_CATAN
#undef HAVE_CATANF
#undef HAVE_CATANL
#undef HAVE_CATANH
#undef HAVE_CATANHF
#undef HAVE_CATANHL
#undef HAVE_CACOS
#undef HAVE_CACOSF
#undef HAVE_CACOSL
#undef HAVE_CACOSH
#undef HAVE_CACOSHF
#undef HAVE_CACOSHL

#endif /* __GLIBC_PREREQ(2, 18) */

@KevinYuk
Copy link
Author

KevinYuk commented Jan 4, 2017

@charris Thanks for your comments. Do you mean I should use glibc < 2.17 to avoid the related UT errors? Or is this a glibc 2.17 bug?

@charris
Copy link
Member

charris commented Jan 4, 2017

Hmm, I'm wrong. The functions blacklisted are the complex versions, which don't seem to be tested. So I'm not sure what is going on. However

  • TypeError: 'float' object cannot be interpreted as an index errors are from using floats to index arrays, it can probably be fixed in the test by making the dimensions in out_shp integer.
  • TypeError: Cannot cast array data from dtype('float32') to dtype('int64') according to the rule 'safe' can be fixed by making the cast explicit, casting="unsafe".
  • TypeError: invalid strides looks to be because of relaxed stride checking.

That leaves the arctanh errors and I don't know what is going on there.

@nouiz
Copy link
Contributor

nouiz commented Jan 10, 2017 via email

@slefrancois
Copy link

We're working on fixing the Theano issue, but can't reproduce "TypeError: 'float' object cannot be interpreted as an index" and the arctanh errors. Could it be old glibc issues?

@mattip
Copy link
Member

mattip commented Jul 19, 2018

It seems development of Theno has stopped. Can we close this?

@mattip
Copy link
Member

mattip commented Aug 18, 2019

Closing. Please reopen if needed.

@mattip mattip closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants