[Scipy-tickets] [SciPy] #1737: OS X Mountain Lion test failures

SciPy Trac scipy-tickets@scipy....
Mon Oct 8 04:25:52 CDT 2012


#1737: OS X Mountain Lion test failures
--------------------------+-------------------------------------------------
 Reporter:  aleach        |       Owner:  cdavid      
     Type:  defect        |      Status:  needs_review
 Priority:  normal        |   Milestone:  Unscheduled 
Component:  Build issues  |     Version:  0.10.0      
 Keywords:  OSX, ATLAS    |  
--------------------------+-------------------------------------------------

Comment(by aleach):

 Yay, got it working :)
 Well, down to 11 errors and 1 failure, so going to leave this installation
 as is. The single failure is the same failure as before, with
 test_basic.TestNorm.test_overflow. The eleven errors are all ''IndexError:
 too many indices'' and ''ValueError: negative dimensions are not allowed''
 messages, same as above.

 Instructions to reproduce:
 0) Built a Python from source code. The configure command I used:-
 {{{
 ./configure --mandir=/usr/local/share/man --infodir=/usr/local/share/info
 --enable-unicode=ucs4 --without-dependency-tracking --enable-ipv6 --with-
 threads --enable-framework=/Library/Frameworks --with-framework-name
 =Python-dev --enable-toolbox-glue --with-gcc=/usr/bin/clang
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CFLAGS=-O3 -pipe -fno-common -fno-
 strict-aliasing -DMACOSX -Wall -Wstrict-prototypes CXXFLAGS=-O3 -pipe
 -fno-common -fno-strict-aliasing LDFLAGS=-Wl,-F. --with-universal-
 archs=intel --enable-
 universalsdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
 }}}
 1) Build and install netlib lapack 3.4.2, using flags mentioned in
 previous post.
 2) Configure ATLAS:-
 {{{
 ../configure --with-netlib-lapack-
 tarfile=/Users/albl500/Downloads/sources/lapack-3.4.2.tgz -O i686-apple-
 darwin12 -b 64 -Fa ac "-fPIC -O2 -fwrapv -fexceptions -arch x86_64
 -undefined dynamic_lookup" -C if gfortran -F if '-undefined dynamic_lookup
 -fPIC -O2 -arch x86_64 -m64 -msse3 -fexceptions -ff2c -fno-second-
 underscore' -Ss flapack "-L/usr/local/lib/ -llapack"
 }}}
 3) I messed a bit with my Make.inc file, LDFLAGS and xxCFLAGS at least.
 Now is the time to tinker with it. I'll attach my Make.inc.
 4) Run 'make' (takes a half hour or longer), then change dir into lib/.
 5) Run 'make dylib'. (Optionally run 'make ptdylib' to build a threaded
 atlas dynamic library).
 6) Here I just copied 'libsatlas.dylib' to /usr/local/lib/, after checking
 the ''install_name'' was set correctly. i.e. I ran:-
 {{{
 install_name_tool -id /usr/local/lib/libsatlas.dylib -change
 /usr/local/atlas/lib/libsatlas.lib /usr/local/lib/libsatlas.dylib
 ./libsatlas.dylib
 }}}
 7) Go into scipy dir and edit site.cfg. I've changed mine a little since
 before. Now, it is:-
 {{{
 [DEFAULT]
 include_dirs = /usr/local/include:/usr/local/atlas/include:
 library_dirs = /usr/local/lib:/usr/local/atlas/lib

 [blas_opt]
 libraries    = satlas, blas

 [lapack_opt]
 libraries    = satlas, lapack

 [atlas]
 atlas_libs   = satlas, blas
 lapack_libs  = lapack
 library_dirs = /usr/local/lib:/usr/local/atlas/lib

 [ptatlas]
 libraries    = satlas

 [lapack_atlas]
 libraries    = lapack
 }}}
 (blatantly went over the top here with options, but it is what I did...)

 8) Build [and install] scipy.
 {{{
 ATLAS="-L/usr/local/lib -lsatlas" FFLAGS=-ff2c /usr/local/bin/python
 setup.py config --fcompiler=gnu95 build --fcompiler=gnu95  [install
 --user]
 }}}

 9) Test.
 {{{
 Ran 5535 tests in 64.940s

 FAILED (KNOWNFAIL=13, SKIP=42, errors=11, failures=1)
 }}}

 ---------
 Done!


 I'm using the dylibs because I was getting grief with ATLAS's static
 archives, so just wanted to build scipy with an ATLAS dylib, and Lapack &
 BLAS dylibs straight from Netlib's Lapack. I would have preferred an ATLAS
 build of lapack, but I couldn't get past some problems in objects that had
 came from static archives.

 A couple ATLAS lapack tests, which always used the lapack archive, hang
 and segfault {{{make lapack_test_{al,pt}_pt -j9}}}.
 Gonna try the threaded dylib again, but otherwise, I think it's all good.
 There is that one overflow failure, which fails in test_basic, with:-
 {{{
 a = np.array( [1e20], dtype=np.float32 )
 assert_almost_equal( norm(a), a )
 }}}
 norm(a) returns +inf, which I think is a call to snrm2 in libsatlas.dylib,
 even though it's also defined in libblas.dylib (libblas is after libsatlas
 in the {{{otool -L ...scipy/linalg/fblas.so}}}).

 Just rebuilt scipy again, replacing satlas with tatlas in scipy's
 site.cfg. Get the same results:-
 {{{
 Ran 5535 tests in 67.215s

 FAILED (KNOWNFAIL=13, SKIP=42, errors=11, failures=1)
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1737#comment:14>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list