[SciPy-Dev] scipy error compiling csr_wrap under Python 2.7

Vincent Davis vincent@vincentdavis....
Thu Jul 8 08:05:11 CDT 2010


On Thu, Jul 8, 2010 at 5:33 AM, Ralf Gommers
<ralf.gommers@googlemail.com> wrote:
>
>
> On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com> wrote:
>>
>> Hi,
>> I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with
>> numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2)
>> (GCC) . But scipy does compile with Python 2.6.
>>
> If this is easy to fix on linux (and someone comes up with that fix) it
> makes sense to do so. On OS X the problems are more serious and it looks
> like they require changes to numpy.distutils first, so it's not going to
> work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms
> is not going to happen for the 0.8.0 release.

Not that I know what I am doing but I do have recent numpy and scipy
installed on oxs running py2.7. I did use numscon and installed 64bit,
I get 4 errors and 2 failures. Lots of warnings, "Warning: invalid
value encountered in absolute" not sure what those are about.

>>> scipy.test()
Running unit tests for scipy
NumPy version 2.0.0.dev
NumPy is installed in
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy
SciPy version 0.9.0.dev
SciPy is installed in
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy
Python version 2.7rc2+ (trunk, Jun 27 2010, 21:30:09) [GCC 4.2.1
(Apple Inc. build 5659)]
nose version 0.11.3
<SNIP>
======================================================================
ERROR: test_decomp.test_lapack_misaligned(<function solve at
0x10302f8c0>, (array([[  1.734e-255,   8.189e-217,   4.025e-178,
1.903e-139,   9.344e-101,
          4.422e-062,   2.169e-023,   1.028e+016,   5.035e+054,   2.388e+093],
       [  1.169e+132,   5.549e+170,   2.713e+209,   1.290e+248,   6.299e+286,
         -9.272e-292,  -4.524e-253,  -2.155e-214,  -1.050e-175,  -5.007e-137],
       [ -2.438e-098,  -1.163e-059,  -5.659e-021,  -2.703e+018,  -1.314e+057,
         -6.281e+095,  -3.049e+134,  -1.459e+173,  -7.078e+211,  -3.391e+250],
       [ -1.643e+289,   3.524e-294,   1.734e-255,   8.189e-217,   4.025e-178,
          1.903e-139,   9.344e-101,   4.422e-062,   2.169e-023,   1.028e+016],
       [  5.035e+054,   2.388e+093,   1.169e+132,   5.549e+170,   2.713e+209,
          1.290e+248,   6.299e+286,  -9.272e-292,  -4.524e-253,  -2.155e-214],
       [ -1.050e-175,  -5.007e-137,  -2.438e-098,  -1.163e-059,  -5.659e-021,
         -2.703e+018,  -1.314e+057,  -6.281e+095,  -3.049e+134,  -1.459e+173],
       [ -7.078e+211,  -3.391e+250,  -1.643e+289,   3.524e-294,   1.734e-255,
          8.189e-217,   4.025e-178,   1.903e-139,   9.344e-101,   4.422e-062],
       [  2.169e-023,   1.028e+016,   5.035e+054,   2.388e+093,   1.169e+132,
          5.549e+170,   2.713e+209,   1.290e+248,   6.299e+286,  -9.272e-292],
       [ -4.524e-253,  -2.155e-214,  -1.050e-175,  -5.007e-137,  -2.438e-098,
         -1.163e-059,  -5.659e-021,  -2.703e+018,  -1.314e+057,  -6.281e+095],
       [ -3.049e+134,  -1.459e+173,  -7.078e+211,  -3.391e+250,  -1.643e+289,
          3.524e-294,   1.734e-255,   8.189e-217,   4.025e-178,
1.903e-139]]), array([        NaN,         NaN,         NaN,
NaN,         NaN,  -3.264e+62,
         6.682e+23,   9.710e-15,  -1.988e-53,  -2.520e-94])),
{'overwrite_a': True, 'overwrite_b': True})
test_decomp.test_lapack_misaligned(<function solve at 0x10302f8c0>,
(array([[  1.734e-255,   8.189e-217,   4.025e-178,   1.903e-139,
9.344e-101,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py",
line 186, in runTest
    self.test(*self.arg)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_decomp.py",
line 1074, in check_lapack_misaligned
    func(*a,**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/basic.py",
line 49, in solve
    a1, b1 = map(asarray_chkfinite,(a,b))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/function_base.py",
line 528, in asarray_chkfinite
    "array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs

======================================================================
ERROR: test_complex_nonsymmetric_modes
(test_arpack.TestEigenComplexNonSymmetric)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 267, in test_complex_nonsymmetric_modes
    self.eval_evec(m,typ,k,which)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 248, in eval_evec
    eval,evec=eigen(a,k,which=which)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py",
line 397, in eigen
    params.iterate()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py",
line 222, in iterate
    raise RuntimeError("Error info=%d in arpack" % self.info)
RuntimeError: Error info=-8 in arpack

======================================================================
ERROR: test_nonsymmetric_modes (test_arpack.TestEigenNonSymmetric)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 204, in test_nonsymmetric_modes
    self.eval_evec(m,typ,k,which)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 186, in eval_evec
    eval,evec=eigen(a,k,which=which,**kwds)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py",
line 397, in eigen
    params.iterate()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py",
line 222, in iterate
    raise RuntimeError("Error info=%d in arpack" % self.info)
RuntimeError: Error info=-8 in arpack

======================================================================
ERROR: test_starting_vector (test_arpack.TestEigenNonSymmetric)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 214, in test_starting_vector
    self.eval_evec(self.symmetric[0],typ,k,which='LM',v0=v0)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 186, in eval_evec
    eval,evec=eigen(a,k,which=which,**kwds)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py",
line 397, in eigen
    params.iterate()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py",
line 222, in iterate
    raise RuntimeError("Error info=%d in arpack" % self.info)
RuntimeError: Error info=-8 in arpack

======================================================================
FAIL: test_x_stride (test_fblas.TestCgemv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_fblas.py",
line 348, in test_x_stride
    assert_array_almost_equal(desired_y,y)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
line 774, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
line 618, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 33.3333333333%)
 x: array([  2.58077621 -2.58077621j, -15.25132084+17.25131989j,
        16.81481171-12.81481171j], dtype=complex64)
 y: array([  2.58077621 -2.58077621j, -15.25132084+17.25132179j,
        16.81481171-12.81481171j], dtype=complex64)
>>  raise AssertionError('\nArrays are not almost equal\n\n(mismatch 33.3333333333%)\n x: array([  2.58077621 -2.58077621j, -15.25132084+17.25131989j,\n        16.81481171-12.81481171j], dtype=complex64)\n y: array([  2.58077621 -2.58077621j, -15.25132084+17.25132179j,\n        16.81481171-12.81481171j], dtype=complex64)')


======================================================================
FAIL: test_complex_symmetric_modes (test_arpack.TestEigenComplexSymmetric)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 156, in test_complex_symmetric_modes
    self.eval_evec(self.symmetric[0],typ,k,which)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py",
line 145, in eval_evec
    assert_array_almost_equal(eval,exact_eval,decimal=_ndigits[typ])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
line 774, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
line 618, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 100.0%)
 x: array([ 1.07188725 +6.23436023e-08j,  4.91291142
-3.25412906e-08j], dtype=complex64)
 y: array([ 5.+0.j,  6.+0.j], dtype=complex64)
>>  raise AssertionError('\nArrays are not almost equal\n\n(mismatch 100.0%)\n x: array([ 1.07188725 +6.23436023e-08j,  4.91291142 -3.25412906e-08j], dtype=complex64)\n y: array([ 5.+0.j,  6.+0.j], dtype=complex64)')


----------------------------------------------------------------------
Ran 4612 tests in 153.836s

FAILED (KNOWNFAIL=11, SKIP=35, errors=4, failures=2)
<nose.result.TextTestResult run=4612 errors=4 failures=2>

Vincent

>
> This is http://projects.scipy.org/scipy/ticket/1180 by the way.
>
> Ralf
>
>
>> building 'scipy.sparse.sparsetools._csr' extension
>> compiling C++ sources
>> C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv
>> -O3 -Wall -fPIC
>>
>> compile options:
>> '-I/usr/local/lib/python2.7/site-packages/numpy/core/include
>> -I/usr/local/include/python2.7 -c'
>> g++: scipy/sparse/sparsetools/csr_wrap.cxx
>> scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int
>> require_size(PyArrayObject*, npy_intp*, int)’:
>> scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before
>> ‘PRIdPTR’
>> scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing
>> ‘%’ in format
>> scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments
>> for format
>> scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before
>> ‘PRIdPTR’
>> scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing
>> ‘%’ in format
>> scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments
>> for format
>> scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int
>> require_size(PyArrayObject*, npy_intp*, int)’:
>> scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before
>> ‘PRIdPTR’
>> scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing
>> ‘%’ in format
>> scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments
>> for format
>> scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before
>> ‘PRIdPTR’
>> scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing
>> ‘%’ in format
>> scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments
>> for format
>> error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g
>> -fwrapv -O3 -Wall -fPIC
>> -I/usr/local/lib/python2.7/site-packages/numpy/core/include
>> -I/usr/local/include/python2.7 -c scipy/sparse/sparsetools/csr_wrap.cxx
>> -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/csr_wrap.o"
>> failed with exit status 1
>>
>> The error is possibly related the variable 'NPY_INTP_FMT' (defined in
>> numpy/core/include/numpy/ndarraytypes.h). A grep shows these files:
>> scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> size[i]);
>> scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> array_size(ary,i));
>> scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> size[i]);
>> scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> array_size(ary,i));
>> scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",",
>> size[i]);
>> scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",",
>> array_size(ary,i));
>> scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> size[i]);
>> scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> array_size(ary,i));
>> scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> size[i]);
>> scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> array_size(ary,i));
>> scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> size[i]);
>> scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>> array_size(ary,i));
>>
>> Note that the scipy/sparse/sparsetools/numpy.i contains tabs in some
>> places instead of spaces.
>>
>> The ndarraytypes.h is present in
>> /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/
>>
>> Bruce
>>
>>
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>


More information about the SciPy-Dev mailing list