
I've asked this question before without any responses. What are the supported versions of suitesparse for use with scipy? The current scipy 0.9.0 release doesn't appear to be fully compatible with suitesparse 3.6.1 and causes testsuite failures in scipy. Any information on what is the latest version of suitesparse known to be fully compatible with the current scipy release would be most appreciated. Jack ps I am rather surprised that this information isn't part of the scipy documentation or tested for within setup.py of scipy itself.

Sun, 28 Aug 2011 19:26:04 -0400, Jack Howarth wrote:
I've asked this question before without any responses. What are the supported versions of suitesparse for use with scipy? The current scipy 0.9.0 release doesn't appear to be fully compatible with suitesparse 3.6.1 and causes testsuite failures in scipy.
Can you paste the test failures you see? Scipy does not use suitesparse except for the optional UMFPACK wrapper, which many people do not use. Suitesparse is still at 3.4.0 in Debian/Ubuntu, and I suppose newer ones have not been tested. -- Pauli Virtanen

On Mon, Aug 29, 2011 at 08:36:42AM +0000, Pauli Virtanen wrote:
Sun, 28 Aug 2011 19:26:04 -0400, Jack Howarth wrote:
I've asked this question before without any responses. What are the supported versions of suitesparse for use with scipy? The current scipy 0.9.0 release doesn't appear to be fully compatible with suitesparse 3.6.1 and causes testsuite failures in scipy.
Can you paste the test failures you see?
Scipy does not use suitesparse except for the optional UMFPACK wrapper, which many people do not use. Suitesparse is still at 3.4.0 in Debian/Ubuntu, and I suppose newer ones have not been tested.
Pauli, My mistake. This isn't a testsuite failure but rather a build failure on x86_64-apple-darwin11... building 'scipy.sparse.linalg.dsolve.umfpack.__umfpack' extension compiling C sources C compiler: gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/sw/include creating build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve creating build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack compile options: '-DNO_ATLAS_INFO=3 -I/sw/lib/python2.6/site-packages/numpy/core/include -I/sw/include/python2.6 -c' extra options: '-msse3 -I/System/Library/Frameworks/vecLib.framework/Headers' gcc: build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c:2351:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] res = SWIG_AddCast(res); ~~~ ^ ~~~ build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c:2354:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] res = SWIG_AddCast(res); ~~~ ^ ~~~ build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c:6941:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign] clientdata = clientdata; ~~~~~~~~~~ ^ ~~~~~~~~~~ 3 warnings generated. gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6 -I/sw/include build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.o -L/opt/local/lib -Lbuild/temp.macosx-10.7-x86_64-2.6 -lumfpack -lamd -o build/lib.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/__umfpack.so -Wl,-framework -Wl,Accelerate Undefined symbols for architecture x86_64: "_cholmod_start", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_transpose", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_analyze", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_sparse", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_factor", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_print_common", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_finish", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_l_start", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_transpose", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_analyze", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_sparse", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_factor", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_print_common", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_finish", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Undefined symbols for architecture x86_64: "_cholmod_start", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_transpose", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_analyze", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_sparse", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_factor", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_print_common", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_finish", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_l_start", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_transpose", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_analyze", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_sparse", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_factor", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_print_common", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_finish", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: Command "gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6 -I/sw/include build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.o -L/opt/local/lib -Lbuild/temp.macosx-10.7-x86_64-2.6 -lumfpack -lamd -o build/lib.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/__umfpack.so -Wl,-framework -Wl,Accelerate" failed with exit status 1 The initial output from setup.py in scipy 0.9 is... #!/bin/sh -ev unset LDFLAGS /sw/bin/python2.6 setup.py build --fcompiler=gnu95 Warning: No configuration returned, assuming unavailable.blas_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'] non-existing path in 'scipy/io': 'docs' lapack_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3'] umfpack_info: libraries umfpack not found in /usr/local/lib libraries umfpack not found in /usr/lib amd_info: libraries amd not found in /usr/local/lib libraries amd not found in /usr/lib FOUND: libraries = ['amd'] library_dirs = ['/opt/local/lib'] FOUND: libraries = ['umfpack', 'amd'] library_dirs = ['/opt/local/lib'] running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building py_modules sources creating build creating build/src.macosx-10.7-x86_64-2.6 creating build/src.macosx-10.7-x86_64-2.6/scipy building library "dfftpack" sources building library "fftpack" sources building library "linpack_lite" sources building library "mach" sources building library "quadpack" sources building library "odepack" sources building library "dop" sources building library "fitpack" sources building library "odrpack" sources building library "minpack" sources building library "rootfind" sources building library "superlu_src" sources building library "arpack" sources building library "qhull" sources building library "sc_c_misc" sources building library "sc_cephes" sources building library "sc_mach" sources building library "sc_toms" sources building library "sc_amos" sources building library "sc_cdf" sources building library "sc_specfun" sources building library "statlib" sources building extension "scipy.cluster._vq" sources building extension "scipy.cluster._hierarchy_wrap" sources building extension "scipy.fftpack._fftpack" sources creating build/src.macosx-10.7-x86_64-2.6/scipy/fftpack creating build/src.macosx-10.7-x86_64-2.6/scipy/fftpack/src conv_template:> build/src.macosx-10.7-x86_64-2.6/scipy/fftpack/src/dct.c f2py options: [] f2py: scipy/fftpack/fftpack.pyf Reading fortran codes... Reading file 'scipy/fftpack/fftpack.pyf' (format:free) Line #86 in scipy/fftpack/fftpack.pyf:" /* Single precision version */" crackline:2: No pattern for line
-- Pauli Virtanen
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev

On Mon, Aug 29, 2011 at 09:02:35AM -0400, Jack Howarth wrote:
On Mon, Aug 29, 2011 at 08:36:42AM +0000, Pauli Virtanen wrote:
Sun, 28 Aug 2011 19:26:04 -0400, Jack Howarth wrote:
I've asked this question before without any responses. What are the supported versions of suitesparse for use with scipy? The current scipy 0.9.0 release doesn't appear to be fully compatible with suitesparse 3.6.1 and causes testsuite failures in scipy.
Can you paste the test failures you see?
Scipy does not use suitesparse except for the optional UMFPACK wrapper, which many people do not use. Suitesparse is still at 3.4.0 in Debian/Ubuntu, and I suppose newer ones have not been tested.
Pauli, My mistake. This isn't a testsuite failure but rather a build failure on x86_64-apple-darwin11...
building 'scipy.sparse.linalg.dsolve.umfpack.__umfpack' extension compiling C sources C compiler: gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/sw/include
creating build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve creating build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack compile options: '-DNO_ATLAS_INFO=3 -I/sw/lib/python2.6/site-packages/numpy/core/include -I/sw/include/python2.6 -c' extra options: '-msse3 -I/System/Library/Frameworks/vecLib.framework/Headers' gcc: build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c:2351:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] res = SWIG_AddCast(res); ~~~ ^ ~~~ build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c:2354:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] res = SWIG_AddCast(res); ~~~ ^ ~~~ build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c:6941:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign] clientdata = clientdata; ~~~~~~~~~~ ^ ~~~~~~~~~~ 3 warnings generated. gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6 -I/sw/include build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.o -L/opt/local/lib -Lbuild/temp.macosx-10.7-x86_64-2.6 -lumfpack -lamd -o build/lib.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/__umfpack.so -Wl,-framework -Wl,Accelerate Undefined symbols for architecture x86_64: "_cholmod_start", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_transpose", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_analyze", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_sparse", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_factor", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_print_common", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_finish", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_l_start", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_transpose", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_analyze", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_sparse", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_factor", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_print_common", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_finish", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Undefined symbols for architecture x86_64: "_cholmod_start", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_transpose", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_analyze", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_sparse", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_free_factor", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_print_common", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_finish", referenced from: _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o) "_cholmod_l_start", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_transpose", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_analyze", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_sparse", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_free_factor", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_print_common", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) "_cholmod_l_finish", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: Command "gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6 -I/sw/include build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.o -L/opt/local/lib -Lbuild/temp.macosx-10.7-x86_64-2.6 -lumfpack -lamd -o build/lib.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/__umfpack.so -Wl,-framework -Wl,Accelerate" failed with exit status 1
These missing symbols seem to exist in libcholmod.a which isn't being added to the linkage. Any idea of the correct way to fix this for the newer suitesparse?
The initial output from setup.py in scipy 0.9 is...
#!/bin/sh -ev unset LDFLAGS /sw/bin/python2.6 setup.py build --fcompiler=gnu95 Warning: No configuration returned, assuming unavailable.blas_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
non-existing path in 'scipy/io': 'docs' lapack_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3']
umfpack_info: libraries umfpack not found in /usr/local/lib libraries umfpack not found in /usr/lib amd_info: libraries amd not found in /usr/local/lib libraries amd not found in /usr/lib FOUND: libraries = ['amd'] library_dirs = ['/opt/local/lib']
FOUND: libraries = ['umfpack', 'amd'] library_dirs = ['/opt/local/lib']
running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building py_modules sources creating build creating build/src.macosx-10.7-x86_64-2.6 creating build/src.macosx-10.7-x86_64-2.6/scipy building library "dfftpack" sources building library "fftpack" sources building library "linpack_lite" sources building library "mach" sources building library "quadpack" sources building library "odepack" sources building library "dop" sources building library "fitpack" sources building library "odrpack" sources building library "minpack" sources building library "rootfind" sources building library "superlu_src" sources building library "arpack" sources building library "qhull" sources building library "sc_c_misc" sources building library "sc_cephes" sources building library "sc_mach" sources building library "sc_toms" sources building library "sc_amos" sources building library "sc_cdf" sources building library "sc_specfun" sources building library "statlib" sources building extension "scipy.cluster._vq" sources building extension "scipy.cluster._hierarchy_wrap" sources building extension "scipy.fftpack._fftpack" sources creating build/src.macosx-10.7-x86_64-2.6/scipy/fftpack creating build/src.macosx-10.7-x86_64-2.6/scipy/fftpack/src conv_template:> build/src.macosx-10.7-x86_64-2.6/scipy/fftpack/src/dct.c f2py options: [] f2py: scipy/fftpack/fftpack.pyf Reading fortran codes... Reading file 'scipy/fftpack/fftpack.pyf' (format:free) Line #86 in scipy/fftpack/fftpack.pyf:" /* Single precision version */" crackline:2: No pattern for line
-- Pauli Virtanen
_______________________________________________ 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

Mon, 29 Aug 2011 09:02:35 -0400, Jack Howarth wrote: [clip]
"_cholmod_l_finish", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: Command "gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6 -I/sw/include build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.o -L/opt/local/lib -Lbuild/temp.macosx-10.7-x86_64-2.6 -lumfpack -lamd -o build/lib.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/__umfpack.so -Wl,-framework -Wl,Accelerate" failed with exit status 1
Apparently, umfpack started to depend on cholmod. Try adding this to site.cfg before building scipy: [umfpack] umfpack_libs = umfpack, cholmod, amd

On Mon, Aug 29, 2011 at 03:00:00PM +0000, Pauli Virtanen wrote:
Mon, 29 Aug 2011 09:02:35 -0400, Jack Howarth wrote: [clip]
"_cholmod_l_finish", referenced from: _umf_l_cholmod in libumfpack.a(umf_l_cholmod.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: Command "gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6 -I/sw/include build/temp.macosx-10.7-x86_64-2.6/build/src.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.o -L/opt/local/lib -Lbuild/temp.macosx-10.7-x86_64-2.6 -lumfpack -lamd -o build/lib.macosx-10.7-x86_64-2.6/scipy/sparse/linalg/dsolve/umfpack/__umfpack.so -Wl,-framework -Wl,Accelerate" failed with exit status 1
Apparently, umfpack started to depend on cholmod. Try adding this to site.cfg before building scipy:
[umfpack] umfpack_libs = umfpack, cholmod, amd
Pauli, Actually, a site.cfg with... [umfpack] umfpack_libs = umfpack, colamd, cholmod, amd is required to resolve all of the cholmod related symbols when building scipy 0.9.0 against suitesparse 3.6.1. Jack
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev

On Mon, Aug 29, 2011 at 08:36:42AM +0000, Pauli Virtanen wrote:
Sun, 28 Aug 2011 19:26:04 -0400, Jack Howarth wrote:
I've asked this question before without any responses. What are the supported versions of suitesparse for use with scipy? The current scipy 0.9.0 release doesn't appear to be fully compatible with suitesparse 3.6.1 and causes testsuite failures in scipy.
Can you paste the test failures you see?
Scipy does not use suitesparse except for the optional UMFPACK wrapper, which many people do not use. Suitesparse is still at 3.4.0 in Debian/Ubuntu, and I suppose newer ones have not been tested.
-- Pauli Virtanen
Pauli, On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results... [MacPro:~] howarth% /sw/bin/python2.7 Python 2.7.2 (default, Jul 21 2011, 22:39:54) [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.test() Running unit tests for scipy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy SciPy version 0.9.0 SciPy is installed in /sw/lib/python2.7/site-packages/scipy Python version 2.7.2 (default, Jul 21 2011, 22:39:54) [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] nose version 1.1.2 .............................................................................................................................................................................................................K......................................................................................................................K..K.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..FF......................................................................................................................................SSSSSS......SSSSSS......SSSS.....................................................F....FF.....S................................................................................................................................................................................................................K...........................................................................................................................................................................................SSSSS.........S.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../sw/lib/python2.7/site-packages/scipy/sparse/linalg/dsolve/linsolve.py:259: DeprecationWarning: scipy.sparse.linalg.dsolve.umfpack will be removed, install scikits.umfpack instead ' install scikits.umfpack instead', DeprecationWarning ) ../sw/lib/python2.7/site-packages/scipy/sparse/linalg/dsolve/linsolve.py:75: DeprecationWarning: scipy.sparse.linalg.dsolve.umfpack will be removed, install scikits.umfpack instead ' install scikits.umfpack instead', DeprecationWarning ) ................K.K..KK.KK...........................................................................................................................................K...............................................................K...........................................................................................................................................................KK...............................................................................................................................................................................................................................................................................................................................................................................................................................K.K........................................................................................................................................................................................................................................................................................................................................................................................K........K.........SSSSSSS................................................................................................................................................................................................................................................................................................................................................................................................../sw/lib/python2.7/site-packages/scipy/stats/distributions.py:3546: RuntimeWarning: overflow encountered in exp return exp(c*x-exp(x)-gamln(c)) ................................./sw/lib/python2.7/site-packages/scipy/stats/distributions.py:3955: RuntimeWarning: invalid value encountered in sqrt vals = 2*(bt+1.0)*sqrt(b-2.0)/((b-3.0)*sqrt(b)) .........................................................................................................................................................................................................................................................................................................S..............................................................................................................................................................................................F............................................................................................................................................................................................................................................................................................................................................................................................................. ====================================================================== FAIL: test_asum (test_blas.TestFBLAS1Simple)
Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 58, in test_asum assert_almost_equal(f([3,-4,5]),12) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: 12 ====================================================================== FAIL: test_dot (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 67, in test_dot assert_almost_equal(f([3,-4,5],[2,5,1]),-9) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: -9 ====================================================================== FAIL: test_nrm2 (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 78, in test_nrm2 assert_almost_equal(f([3,-4,5]),math.sqrt(50)) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: 7.0710678118654755 ====================================================================== FAIL: test_asum (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_blas.py", line 57, in test_asum assert_almost_equal(f([3,-4,5]),12) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: 12 ====================================================================== FAIL: test_dot (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_blas.py", line 66, in test_dot assert_almost_equal(f([3,-4,5],[2,5,1]),-9) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: -9 ====================================================================== FAIL: test_nrm2 (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/linalg/tests/test_blas.py", line 83, in test_nrm2 assert_almost_equal(f([3,-4,5]),math.sqrt(50)) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: 7.0710678118654755 ====================================================================== FAIL: test_expon (test_morestats.TestAnderson) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/stats/tests/test_morestats.py", line 72, in test_expon assert_array_less(crit[:-1], A) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 869, in assert_array_less header='Arrays are not less-ordered') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 613, in assert_array_compare chk_same_position(x_id, y_id, hasval='inf') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not less-ordered x and y inf location mismatch: x: array([ 0.911, 1.065, 1.325, 1.587]) y: array(inf) ---------------------------------------------------------------------- Ran 4722 tests in 63.364s FAILED (KNOWNFAIL=18, SKIP=31, failures=7) <nose.result.TextTestResult run=4722 errors=0 failures=7>
FYI, I see the same seven failures if I use Apple's gcc-4.2 compilers instead of the clang compilers. Jack
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev

Tue, 30 Aug 2011 08:55:15 -0400, Jack Howarth wrote: [clip]
On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results... [clip] ====================================================================== FAIL: test_dot (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 67, in test_dot assert_almost_equal(f([3,-4,5],[2,5,1]),-9) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: -9
Does Numpy's test suite pass? Either the BLAS you linked Scipy against is broken, or there are some compatibility problems due to compilers or mixing compiler versions. You could check which libraries your `fblas.so` and `cblas.so` in the Scipy installation are linked against. I've never used OSX, though, so I do not know how to do this there. You can see the same information in the beginning of the build logs, though. Maybe someone who is more familiar than me with OSX knows more. -- Pauli Virtanen

On Tue, Aug 30, 2011 at 01:32:09PM +0000, Pauli Virtanen wrote:
Tue, 30 Aug 2011 08:55:15 -0400, Jack Howarth wrote: [clip]
On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results... [clip] ====================================================================== FAIL: test_dot (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 67, in test_dot assert_almost_equal(f([3,-4,5],[2,5,1]),-9) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: -9
Does Numpy's test suite pass?
On x86_64-apple-darwin10, numpy passes its testsuite... [frodo:~] howarth% python2.7 Python 2.7.2 (default, Aug 4 2011, 09:22:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Running unit tests for numpy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy Python version 2.7.2 (default, Aug 4 2011, 09:22:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] nose version 1.1.2 ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../sw/lib/python2.7/site-packages/numpy/core/numeric.py:1920: RuntimeWarning: invalid value encountered in absolute return all(less_equal(absolute(x-y), atol + rtol * absolute(y))) ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.................................................................................................K......................K...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Ran 3529 tests in 34.328s OK (KNOWNFAIL=3, SKIP=1) <nose.result.TextTestResult run=3529 errors=0 failures=0>
whereas on x86_64-apple-darwin11 (building with clang), numpy fails... [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Running unit tests for numpy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy Python version 2.7.2 (default, Jul 21 2011, 22:39:54) [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] nose version 1.1.2 ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........................................................................................................................................................................................................................................................................................................................................................................................................................K.................................................................................................K......................K...........FFFFFFF...F./sw/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py:364: RuntimeWarning: invalid value encountered in sqrt z = np.sqrt(np.array(np.complex(-np.inf, np.nan))) ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ====================================================================== FAIL: Test basic arithmetic function errors
Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/numpy/testing/decorators.py", line 215, in knownfailer return f(*args, **kwargs) File "/sw/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 321, in test_floating_exceptions lambda a,b:a/b, ft_tiny, ft_max) File "/sw/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 271, in assert_raises_fpe "Type %s did not raise fpe error '%s'." % (ftype, fpeerr)) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 34, in assert_ raise AssertionError(msg) AssertionError: Type <type 'numpy.complex64'> did not raise fpe error ''. ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 1, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -1, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 0.0, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -0.0, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, inf, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -inf, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, nan, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj)) ====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -inf, 1, 0.0, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal x and y nan location mismatch: x: array([ nan+infj]) y: array(infj) ---------------------------------------------------------------------- Ran 3529 tests in 38.236s FAILED (KNOWNFAIL=3, SKIP=1, failures=9) <nose.result.TextTestResult run=3529 errors=0 failures=9> In both cases (darwin10 and darwin11), the blas used is from /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate. http://developer.apple.com/performance/accelerateframework.html I doubt the system blas is at fault and more likely this is an issue with the clang compilers. I know python required an explicit addition of -fwrapv since its test for that option is confused by clang. Perhaps numpy/scipy requires -fwrapv as well? Jack
Either the BLAS you linked Scipy against is broken, or there are some compatibility problems due to compilers or mixing compiler versions.
You could check which libraries your `fblas.so` and `cblas.so` in the Scipy installation are linked against. I've never used OSX, though, so I do not know how to do this there. You can see the same information in the beginning of the build logs, though.
Maybe someone who is more familiar than me with OSX knows more.
-- Pauli Virtanen
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev

On Tue, Aug 30, 2011 at 6:59 PM, Jack Howarth <howarth@bromo.med.uc.edu>wrote:
On Tue, Aug 30, 2011 at 01:32:09PM +0000, Pauli Virtanen wrote:
Tue, 30 Aug 2011 08:55:15 -0400, Jack Howarth wrote: [clip]
On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results... [clip] ====================================================================== FAIL: test_dot (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 67, in test_dot assert_almost_equal(f([3,-4,5],[2,5,1]),-9) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: -9
Does Numpy's test suite pass?
On x86_64-apple-darwin10, numpy passes its testsuite...
[frodo:~] howarth% python2.7 Python 2.7.2 (default, Aug 4 2011, 09:22:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Running unit tests for numpy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy Python version 2.7.2 (default, Aug 4 2011, 09:22:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] nose version 1.1.2 ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../sw/lib/python2.7/site-packages/numpy/core/numeric.py:1920: RuntimeWarning: invalid value encountered in absolute return all(less_equal(absolute(x-y), atol + rtol * absolute(y)))
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.................................................................................................K......................K................................................................................................................................................................................................................................................................................................................................................................................................
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
..................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
........................................................................................... ---------------------------------------------------------------------- Ran 3529 tests in 34.328s
OK (KNOWNFAIL=3, SKIP=1) <nose.result.TextTestResult run=3529 errors=0 failures=0>
whereas on x86_64-apple-darwin11 (building with clang), numpy fails...
None of those failures is a problem, nor is it relevant to your problem with scipy. If anyone feels like writing a patch to disable those test_special_values on all platforms except linux, that would be appreciated. Ralf
[GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Running unit tests for numpy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy Python version 2.7.2 (default, Jul 21 2011, 22:39:54) [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] nose version 1.1.2
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........................................................................................................................................................................................................................................................................................................................................................................................................................K................................... ..............................................................K......................K...........FFFFFFF...F./sw/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py:364: RuntimeWarning: invalid value encountered in sqrt z = np.sqrt(np.array(np.complex(-np.inf, np.nan)))
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ====================================================================== FAIL: Test basic arithmetic function errors ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/numpy/testing/decorators.py", line 215, in knownfailer return f(*args, **kwargs) File "/sw/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 321, in test_floating_exceptions lambda a,b:a/b, ft_tiny, ft_max) File "/sw/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 271, in assert_raises_fpe "Type %s did not raise fpe error '%s'." % (ftype, fpeerr)) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 34, in assert_ raise AssertionError(msg) AssertionError: Type <type 'numpy.complex64'> did not raise fpe error ''.
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 1, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -1, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 0.0, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -0.0, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, inf, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -inf, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, nan, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -inf, 1, 0.0, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array(infj)
---------------------------------------------------------------------- Ran 3529 tests in 38.236s
FAILED (KNOWNFAIL=3, SKIP=1, failures=9) <nose.result.TextTestResult run=3529 errors=0 failures=9>
In both cases (darwin10 and darwin11), the blas used is from /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate.
http://developer.apple.com/performance/accelerateframework.html
I doubt the system blas is at fault and more likely this is an issue with the clang compilers. I know python required an explicit addition of -fwrapv since its test for that option is confused by clang. Perhaps numpy/scipy requires -fwrapv as well? Jack
Either the BLAS you linked Scipy against is broken, or there are some compatibility problems due to compilers or mixing compiler versions.
You could check which libraries your `fblas.so` and `cblas.so` in the Scipy installation are linked against. I've never used OSX, though, so I do not know how to do this there. You can see the same information in the beginning of the build logs, though.
Maybe someone who is more familiar than me with OSX knows more.
-- Pauli Virtanen
_______________________________________________ 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

On Tue, Aug 30, 2011 at 09:04:18PM +0200, Ralf Gommers wrote:
On Tue, Aug 30, 2011 at 6:59 PM, Jack Howarth <howarth@bromo.med.uc.edu>wrote:
On Tue, Aug 30, 2011 at 01:32:09PM +0000, Pauli Virtanen wrote:
Tue, 30 Aug 2011 08:55:15 -0400, Jack Howarth wrote: [clip]
On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results... [clip] ====================================================================== FAIL: test_dot (test_blas.TestFBLAS1Simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py", line 67, in test_dot assert_almost_equal(f([3,-4,5],[2,5,1]),-9) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal raise AssertionError(msg) AssertionError: Arrays are not almost equal to 7 decimals ACTUAL: 0.0 DESIRED: -9
Does Numpy's test suite pass?
On x86_64-apple-darwin10, numpy passes its testsuite...
[frodo:~] howarth% python2.7 Python 2.7.2 (default, Aug 4 2011, 09:22:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Running unit tests for numpy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy Python version 2.7.2 (default, Aug 4 2011, 09:22:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] nose version 1.1.2 ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../sw/lib/python2.7/site-packages/numpy/core/numeric.py:1920: RuntimeWarning: invalid value encountered in absolute return all(less_equal(absolute(x-y), atol + rtol * absolute(y)))
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.................................................................................................K......................K................................................................................................................................................................................................................................................................................................................................................................................................
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
..................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
........................................................................................... ---------------------------------------------------------------------- Ran 3529 tests in 34.328s
OK (KNOWNFAIL=3, SKIP=1) <nose.result.TextTestResult run=3529 errors=0 failures=0>
whereas on x86_64-apple-darwin11 (building with clang), numpy fails...
None of those failures is a problem, nor is it relevant to your problem with scipy.
If anyone feels like writing a patch to disable those test_special_values on all platforms except linux, that would be appreciated.
Ralf, It seems very odd that these test_special_values tests pass in numpy on darwin10 but fail on darwin11. Doesn't that imply a possible regression in Lion? If so it might be wise to open a radar with Apple on the issue. Remember that Lion is the first darwin release built with llvm-based compilers and this change may well cause subtle regressions. For example, ppl exposed the fact that llvm-gcc silently ignores -frounding-math (while clang at least admits to doing so). Jack
Ralf
[GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Running unit tests for numpy NumPy version 1.6.0 NumPy is installed in /sw/lib/python2.7/site-packages/numpy Python version 2.7.2 (default, Jul 21 2011, 22:39:54) [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] nose version 1.1.2
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........................................................................................................................................................................................................................................................................................................................................................................................................................K................................... ..............................................................K......................K...........FFFFFFF...F./sw/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py:364: RuntimeWarning: invalid value encountered in sqrt z = np.sqrt(np.array(np.complex(-np.inf, np.nan)))
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ====================================================================== FAIL: Test basic arithmetic function errors ---------------------------------------------------------------------- Traceback (most recent call last): File "/sw/lib/python2.7/site-packages/numpy/testing/decorators.py", line 215, in knownfailer return f(*args, **kwargs) File "/sw/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 321, in test_floating_exceptions lambda a,b:a/b, ft_tiny, ft_max) File "/sw/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 271, in assert_raises_fpe "Type %s did not raise fpe error '%s'." % (ftype, fpeerr)) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 34, in assert_ raise AssertionError(msg) AssertionError: Type <type 'numpy.complex64'> did not raise fpe error ''.
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 1, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -1, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 0.0, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -0.0, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, inf, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -inf, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, nan, inf, inf, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array((inf+infj))
====================================================================== FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -inf, 1, 0.0, inf) ---------------------------------------------------------------------- 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/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 578, in check_complex_value assert_equal(f(z1), z2) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 605, in assert_array_compare chk_same_position(x_id, y_id, hasval='nan') File "/sw/lib/python2.7/site-packages/numpy/testing/utils.py", line 588, in chk_same_position raise AssertionError(msg) AssertionError: Arrays are not equal
x and y nan location mismatch: x: array([ nan+infj]) y: array(infj)
---------------------------------------------------------------------- Ran 3529 tests in 38.236s
FAILED (KNOWNFAIL=3, SKIP=1, failures=9) <nose.result.TextTestResult run=3529 errors=0 failures=9>
In both cases (darwin10 and darwin11), the blas used is from /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate.
http://developer.apple.com/performance/accelerateframework.html
I doubt the system blas is at fault and more likely this is an issue with the clang compilers. I know python required an explicit addition of -fwrapv since its test for that option is confused by clang. Perhaps numpy/scipy requires -fwrapv as well? Jack
Either the BLAS you linked Scipy against is broken, or there are some compatibility problems due to compilers or mixing compiler versions.
You could check which libraries your `fblas.so` and `cblas.so` in the Scipy installation are linked against. I've never used OSX, though, so I do not know how to do this there. You can see the same information in the beginning of the build logs, though.
Maybe someone who is more familiar than me with OSX knows more.
-- Pauli Virtanen
_______________________________________________ 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
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev

Hi Jack,
Pauli, On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results...
I'm a scipy novice, probably hanging out on the wrong list, but I know a little bit about most of the errors you're seeing. There are some differences in calling conventions between Apple's veclib and scipy's expectations which mean that various single-precision functions fail, see here: http://www.macresearch.org/lapackblas-fortran-106 This can be fixed by setting 'export FFLAGS=-ff2c' before running/compiling numpy and scipy (*). For me, this fixed all test_blas failures, using a recent git clone. As far as I can tell, it doesn't introduce other problems (i.e. most tests pass). I tried this with all the standard Lion C compilers, and a couple of different versions of gfortran, with similar results (though llvm has it's own problems (**), and you shouldn't use it). So this is not a question of choosing the right compiler. Ben (*) The results of my experiments are here: http://mail.scipy.org/pipermail/scipy-dev/2011-August/016396.html (**) For instance, ifft(fft(signal)) != signal when using scipy.fftpack

On Tue, Aug 30, 2011 at 03:02:48PM +0100, Ben Willmore wrote:
Hi Jack,
Pauli, On x86_64-apple-darwin11, building scypy 0.9.0 against python2.7 using the clang compilers and gfortran from FSF gcc 4.6.1, I get the following testsuite results...
I'm a scipy novice, probably hanging out on the wrong list, but I know a little bit about most of the errors you're seeing.
There are some differences in calling conventions between Apple's veclib and scipy's expectations which mean that various single-precision functions fail, see here:
http://www.macresearch.org/lapackblas-fortran-106
This can be fixed by setting 'export FFLAGS=-ff2c' before running/compiling numpy and scipy (*). For me, this fixed all test_blas failures, using a recent git clone. As far as I can tell, it doesn't introduce other problems (i.e. most tests pass).
I tried this with all the standard Lion C compilers, and a couple of different versions of gfortran, with similar results (though llvm has it's own problems (**), and you shouldn't use it). So this is not a question of choosing the right compiler.
Ben
This doesn't make any sense for numpy. I tried you approach of using... export FFLAGS=-ff2c /sw/bin/python2.7 setup.py build --fcompiler=gfortran and while I see.. customize Gnu95FCompiler Found executable /sw/bin/gfortran customize Gnu95FCompiler customize Gnu95FCompiler using config at no point during the numpy build is anything compiled with gfortran. The resulting numpy still fails the test_special_values tests. Note that these are claimed to be non-critical and should be disabled on darwin... http://mail.scipy.org/pipermail/scipy-dev/2011-August/016472.html Jack
(*) The results of my experiments are here:
http://mail.scipy.org/pipermail/scipy-dev/2011-August/016396.html
(**) For instance, ifft(fft(signal)) != signal when using scipy.fftpack
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev

On 31 Aug 2011, at 14:33, Jack Howarth wrote:
This doesn't make any sense for numpy. I tried you approach of using...
export FFLAGS=-ff2c /sw/bin/python2.7 setup.py build --fcompiler=gfortran
'-ff2c' fixes the test_blas errors you saw in scipy. It doesn't do anything about the test_special_values errors you saw with numpy. I'm sure those should be disabled as recommended by Ralf. Ben
participants (4)
-
Ben Willmore
-
Jack Howarth
-
Pauli Virtanen
-
Ralf Gommers