[SciPy-user] building numpy/scipy on Solaris

David M. Cooke cookedm@physics.mcmaster...
Tue Mar 20 12:56:38 CDT 2007


On Tue, Mar 20, 2007 at 12:08:14PM +0100, raphael langella wrote:
> I'm trying to build numpy and scipy on Solaris 8.
> The BLAS FAQ on netlib.org suggests using optimized BLAS librairies
> provided by computer vendor, like the SUN Performance Library. This
> library is supposed to provide enhanced and optimized version of BLAS
> and LAPACK. I happen to have Forte 7 installed, so I first tried to
> build against this library (libsunperf.a).
> I tried several versions and different compilation options, but I always
> get undefined symbols. Is this supported? As anyone ever succeeded in
> using this library to compile scipy and numpy?

Haven't heard about anybody else trying it. What are the undefined
symbols? One thing I can think of that I've run into before on a Alpha
was that the Compaq Math Library only had LAPACK version 2, not version
3 (which had been already been out for several years when our group got
the Alpha...).

> I also did some unsuccessful tests with Atlas. But, I think I'm now very
> close to have it working with the standard BLAS/LAPACK (from
> netlib.org). I have to use GNU ld (unresolved symbols when using Sun's
> ld). Numpy builds and tests without any error. I've got a few errors and
> failures with scipy (see attachment for the complete test report). Are
> these errors critical? I don't understand where they come from and how
> to correct them.
> Thanks for your help.
> 
> Raphaël Langella

> calc-gen3-ci:/home/user1/ctcils/poladmin/rla/root $ python -c "import scipy; scipy.test(level=1)"
>   Found 1 tests for scipy.cluster.vq
>   Found 128 tests for scipy.linalg.fblas
>   Found 397 tests for scipy.ndimage
>   Found 10 tests for scipy.integrate.quadpack
>   Found 98 tests for scipy.stats.stats
>   Found 53 tests for scipy.linalg.decomp
>   Found 3 tests for scipy.integrate.quadrature
>   Found 96 tests for scipy.sparse.sparse
>   Found 20 tests for scipy.fftpack.pseudo_diffs
>   Found 6 tests for scipy.optimize.optimize
>   Found 6 tests for scipy.interpolate.fitpack
>   Found 6 tests for scipy.interpolate
>   Found 70 tests for scipy.stats.distributions
>   Found 10 tests for scipy.stats.morestats
>   Found 4 tests for scipy.linalg.lapack
>   Found 18 tests for scipy.fftpack.basic
> Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack' from '.../linsolve/umfpack/__init__.pyc'>
> /home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/linsolve/umfpack/tests/test_umfpack.py:17: AttributeError: 'module' object has no attribute 'umfpack' (in ?)

UMFPACK not built?

> Warning: FAILURE importing tests for <module 'scipy.optimize.zeros' from '...kages/scipy/optimize/zeros.pyc'>
> /home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/optimize/lbfgsb.py:30: ImportError: ld.so.1: python: fatal: relocation error: file /home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/optimize/_lbfgsb.so: symbol etime_: referenced symbol not found (in ?)

This one looks like the Sun Fortran compiler doesn't have etime. Not
serious unless you use optimize.fmin_l_bfgs_b.

> Warning: FAILURE importing tests for <module 'scipy.io.mio' from '...site-packages/scipy/io/mio.pyc'>
> /home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/io/tests/test_mio.py:14: ImportError: cannot import name loadmat (in ?)

Odd. loadmat comes from scipy.io.mio, and it's a pure python routine.

Did you remove the build/ directory before trying again? Distutils can
get confused if it's interrupted (it doesn't do dependency tracking that
well).

> Warning: The maximum number of subdivisions (50) has been achieved.
>   If increasing the limit yields no improvement it is advised to analyze
>   the integrand in order to determine the difficulties.  If the position of a
>   local difficulty can be determined (singularity, discontinuity) one will
>   probably gain from splitting up the interval and calling the integrator
>   on the subranges.  Perhaps a special-purpose integrator should be used.
[clip]

I don't know why this is happening; it doesn't occur on other platforms.

> ****************************************************************
> WARNING: clapack module is empty
> -----------
> See scipy/INSTALL.txt for troubleshooting.
> Notes:
> * If atlas library is not found by numpy/distutils/system_info.py,
>   then scipy uses flapack instead of clapack.
> ****************************************************************

This is OK.

> ======================================================================
> ERROR: check_normalize (scipy.sparse.tests.test_sparse.test_coo)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/sparse/tests/test_sparse.py", line 658, in check_normalize
>     assert(zip(nrow,ncol,ndata) == sorted(zip(row,col,data))) #should sort by rows, then cols
> NameError: global name 'sorted' is not defined

Fixed in svn; a 2.4ism snuck in.

> ======================================================================
> FAIL: check_double_integral (scipy.integrate.tests.test_quadpack.test_quad)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/integrate/tests/test_quadpack.py", line 95, in check_double_integral
>     5/6.0 * (b**3.0-a**3.0))
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/integrate/tests/test_quadpack.py", line 9, in assert_quad
>     assert abs(value-tabledValue) < err, (value, tabledValue, err)
> AssertionError: (4036.4928418995069, 5.8333333333333339, 1835.6069980919819)
> 
> ======================================================================
> FAIL: check_triple_integral (scipy.integrate.tests.test_quadpack.test_quad)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/integrate/tests/test_quadpack.py", line 106, in check_triple_integral
>     8/3.0 * (b**4.0 - a**4.0))
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/integrate/tests/test_quadpack.py", line 9, in assert_quad
>     assert abs(value-tabledValue) < err, (value, tabledValue, err)
> AssertionError: (8.6265941452283596e-09, 40.0, 3.0164375235041808e-09)

These look like the same problem as the warnings before about
subdivisions. Something funny.

> ======================================================================
> FAIL: check_syevr (scipy.lib.tests.test_lapack.test_flapack_float)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/lib/lapack/tests/esv_tests.py", line 41, in check_syevr
>     assert_array_almost_equal(w,exact_w)
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/numpy/testing/utils.py", line 230, in assert_array_almost_equal
>     header='Arrays are not almost equal')
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/numpy/testing/utils.py", line 215, in assert_array_compare
>     assert cond, msg
> AssertionError:
> Arrays are not almost equal
> 
> (mismatch 33.3333333333%)
>  x: array([-0.66992444,  0.48769474,  9.18222618], dtype=float32)
>  y: array([-0.66992434,  0.48769389,  9.18223045])
> ======================================================================
> FAIL: check_syevr_irange (scipy.lib.tests.test_lapack.test_flapack_float)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/scipy/lib/lapack/tests/esv_tests.py", line 66, in check_syevr_irange
>     assert_array_almost_equal(w,exact_w[rslice])
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/numpy/testing/utils.py", line 230, in assert_array_almost_equal
>     header='Arrays are not almost equal')
>   File "/home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/numpy/testing/utils.py", line 215, in assert_array_compare
>     assert cond, msg
> AssertionError:
> Arrays are not almost equal
> 
> (mismatch 33.3333333333%)
>  x: array([-0.66992444,  0.48769474,  9.18222618], dtype=float32)
>  y: array([-0.66992434,  0.48769389,  9.18223045])

Huh, I'd say the Sun library isn't accurate enough. Sacrificing accuracy
for speed, no doubt.

> ----------------------------------------------------------------------
> Ran 1543 tests in 12.138s
> 
> FAILED (failures=4, errors=2)
> calc-gen3-ci:/home/user1/ctcils/poladmin/rla/root $

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm@physics.mcmaster.ca


More information about the SciPy-user mailing list