[SciPy-Dev] 1.8.0rc1

Jack Howarth howarth at bromo.med.uc.edu
Tue Oct 1 14:43:40 EDT 2013


On Tue, Oct 01, 2013 at 05:10:39PM +0100, Robert Kern wrote:
> On Tue, Oct 1, 2013 at 5:02 PM, Jack Howarth <howarth at bromo.med.uc.edu>
> wrote:
> >
> > On Tue, Oct 01, 2013 at 04:52:06PM +0100, Robert Kern wrote:
> > > On Tue, Oct 1, 2013 at 4:41 PM, Pauli Virtanen <pav at iki.fi> wrote:
> > > >
> > > > Hi,
> > > >
> > > > 01.10.2013 16:28, Jack Howarth kirjoitti:
> > > > [clip]
> > > > > /sw/bin/python2.7 setup.py build
> > > > >
> > > > > which fails at...
> > > > >
> > > > > /sw/bin/gfortran -Wall -L/sw/lib
> > > build/temp.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_litemodule.o
> > >
> build/temp.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_lite/python_xerbla.o
> > > -L/sw/lib -L/sw/lib/gcc4.8/lib/gcc/x86_64-apple-darwin10.8.0/4.8.1
> > > -Lbuild/temp.macosx-10.6-x86_64-2.7 -llapack -lptf77blas -lptcblas
> -latlas
> > > -lgfortran -o
> build/lib.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_lite.so
> > > > > Undefined symbols for architecture x86_64:
> > > > >   "_main", referenced from:
> > > > >       start in crt1.10.6.o
> > > > [clip]
> > > >
> > > > Something is screwed up in your build environment: the `-shared` flag
> is
> > > > missing from the link command.
> > > >
> > > > Perhaps you have set one of the the environment variables FFLAGS,
> > > > CFLAGS, LDFLAGS?
> > >
> > > Also the `-undefined dynamic_lookup` flag.
> >
> > The consensus of the fink developers is that you are introducing a bug in
> both
> > scipy and numpy. The build should be able to pass additional flags on
> these
> > variables and the scipy/numpy build should be able to append any
> additional
> > flags required. In particular, both MacPorts and fink will want to be
> able to
> > pass -L/opt/local/lib or -L/sw/lib via LDFLAGS. The changes added to
> scipy and
> > numpy have broken this and now require that these additional flags be
> manually
> > patched into the Makefiles of numpy and scipy rather than just passing
> them
> > on LDFLAGS as has always worked in the past.
> 
> Oh no it hasn't. It has been a consistent thorn in our side for a very long
> time. In the case of Fortran modules built by numpy.distutils, $LDFLAGS has
> replaced rather than appended flags since time immemorial. It is a
> compromise solution to work around the fact that the wide variety of
> Fortran compilers are very finicky about their flags, and distutils is not
> very accommodating about letting users change the flags to suit their local
> environments. If you think you have a better solution to this problem that
> does not degrade the existing flexibility, your PR will be cheerfully
> accepted. No one thinks this is desirable behavior, but it is most
> certainly not *new* behavior.

Robert,
  Okay. Good news, bad news. The good news is that on fink for both darwin12 and darwin13,
using 'NoSetLDFLAGS: true' is sufficient to solve the linkage problems while retaining the
passing of -L/sw/lib for both numpy 1.8.0rc1 and current git of scipy 0.13.0. The resulting
numpy 1.8.0rc1, against python 2.7.5, on both darwin12 and darwin13 shows....

OK (KNOWNFAIL=5, SKIP=19)

The bad news is that while the scipy 0.13.0 git builds fine on darwin12 and darwin13 without
testsuite regressions against numpy 1.7.1, scipy 0.13.0 git shows failures against numpy 1.8.0rc1.
On darwin12, I get...

======================================================================
ERROR: Test that bode() finds a reasonable frequency range.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_ltisys.py", line 473, in test_05
    w, mag, phase = bode(system, n=n)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/ltisys.py", line 1015, in bode
    w, y = freqresp(system, w=w, n=n)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/ltisys.py", line 1085, in freqresp
    w, h = freqs(sys.num.ravel(), sys.den, worN=worN)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/filter_design.py", line 142, in freqs
    w = findfreqs(b, a, N)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/filter_design.py", line 70, in findfreqs
    1.5 * ez.imag)) + 0.5)
  File "/sw/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2130, in amax
    out=out, keepdims=keepdims)
  File "/sw/lib/python2.7/site-packages/numpy/core/_methods.py", line 17, in _amax
    out=out, keepdims=keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

======================================================================
FAIL: test_cases (test_solvers.TestSolveDiscreteARE)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_solvers.py", line 132, in test_cases
    self.check_case(case[0], case[1], case[2], case[3])
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_solvers.py", line 128, in check_case
    a.getH()*x*a-(a.getH()*x*b)*inv(r+b.getH()*x*b)*(b.getH()*x*a)+q-x, 0.0)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: matrix([[ 101.68132940 +8.47322212e-13j, -149.17526406 -1.74130113e+02j],
        [-149.17526406 +1.74130113e+02j,  517.05220513 +3.88311605e-12j]])
 y: array(0.0)

======================================================================
FAIL: Test method='gbt' with alpha=0.25 for tf and zpk cases.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_cont2discrete.py", line 218, in test_gbt_with_sio_tf_and_zpk
    assert_allclose(dnum, c2dnum)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 1181, in assert_allclose
    verbose=verbose, header=header)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0

(mismatch 100.0%)
 x: array([[ 0.7,  0. ]])
 y: array([[ 0. +0.00000000e+00j,  0. -2.32036388e+77j]])

======================================================================
FAIL: test_dimpulse (test_dltisys.TestDLTI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_dltisys.py", line 172, in test_dimpulse
    assert_array_almost_equal(yout[0].flatten(), yout_tfimpulse)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 33.3333333333%)
 x: array([ 0.,  1.,  0.])
 y: array([ 0.,  1., -1.])

======================================================================
FAIL: test_dstep (test_dltisys.TestDLTI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_dltisys.py", line 132, in test_dstep
    assert_array_almost_equal(yout[0].flatten(), yout_tfstep)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 33.3333333333%)
 x: array([ 0.,  1.,  1.])
 y: array([ 0.,  1.,  0.])

----------------------------------------------------------------------
Ran 9659 tests in 157.525s

FAILED (KNOWNFAIL=119, SKIP=444, errors=1, failures=4)

and on darwin13, I get...

======================================================================
ERROR: Test that bode() finds a reasonable frequency range.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_ltisys.py", line 473, in test_05
    w, mag, phase = bode(system, n=n)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/ltisys.py", line 1015, in bode
    w, y = freqresp(system, w=w, n=n)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/ltisys.py", line 1085, in freqresp
    w, h = freqs(sys.num.ravel(), sys.den, worN=worN)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/filter_design.py", line 142, in freqs
    w = findfreqs(b, a, N)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/filter_design.py", line 70, in findfreqs
    1.5 * ez.imag)) + 0.5)
  File "/sw/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2130, in amax
    out=out, keepdims=keepdims)
  File "/sw/lib/python2.7/site-packages/numpy/core/_methods.py", line 17, in _amax
    out=out, keepdims=keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

======================================================================
ERROR: test_ltisys.Test_freqresp.test_freq_range
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_ltisys.py", line 570, in test_freq_range
    w, H = freqresp(system, n=n)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/ltisys.py", line 1085, in freqresp
    w, h = freqs(sys.num.ravel(), sys.den, worN=worN)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/filter_design.py", line 142, in freqs
    w = findfreqs(b, a, N)
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/filter_design.py", line 70, in findfreqs
    1.5 * ez.imag)) + 0.5)
  File "/sw/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2130, in amax
    out=out, keepdims=keepdims)
  File "/sw/lib/python2.7/site-packages/numpy/core/_methods.py", line 17, in _amax
    out=out, keepdims=keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

======================================================================
FAIL: test_cases (test_solvers.TestSolveDiscreteARE)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_solvers.py", line 132, in test_cases
    self.check_case(case[0], case[1], case[2], case[3])
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_solvers.py", line 128, in check_case
    a.getH()*x*a-(a.getH()*x*b)*inv(r+b.getH()*x*b)*(b.getH()*x*a)+q-x, 0.0)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: matrix([[ -2.42159197e+221 +1.62702106e+235j,
           2.78628694e+235 -2.38697996e+235j],
        [ -2.78628694e+235 -2.38697996e+235j,
          -1.06747728e+222 +8.27344440e+235j]])
 y: array(0.0)

======================================================================
FAIL: Test method='gbt' with alpha=0.25 for tf and zpk cases.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_cont2discrete.py", line 218, in test_gbt_with_sio_tf_and_zpk
    assert_allclose(dnum, c2dnum)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 1181, in assert_allclose
    verbose=verbose, header=header)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0

(mismatch 100.0%)
 x: array([[ 0.7,  1.4]])
 y: array([[ 0.5 +1.07561885e-232j,  1.0 -2.00390128e+000j]])

======================================================================
FAIL: test_dimpulse (test_dltisys.TestDLTI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_dltisys.py", line 172, in test_dimpulse
    assert_array_almost_equal(yout[0].flatten(), yout_tfimpulse)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 33.3333333333%)
 x: array([ 0.,  1., -2.])
 y: array([ 0.,  1., -1.])

======================================================================
FAIL: test_dstep (test_dltisys.TestDLTI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/src/fink.build/root-scipy-py27-0.13.0b1-0/sw/lib/python2.7/site-packages/scipy/signal/tests/test_dltisys.py", line 132, in test_dstep
    assert_array_almost_equal(yout[0].flatten(), yout_tfstep)
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 33.3333333333%)
 x: array([ 0.,  1., -1.])
 y: array([ 0.,  1.,  0.])

----------------------------------------------------------------------
Ran 9659 tests in 148.120s

FAILED (KNOWNFAIL=119, SKIP=444, errors=2, failures=4)

FYI.


> 
> --
> Robert Kern

> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev




More information about the SciPy-Dev mailing list