On 09/ 6/10 01:46 PM, François Bissey wrote:
I've made a couple of changes to the ATLAS package so SAGE_ATLAS_LIB works
on Solaris. When I tested it on Solaris it worked of course.

<snip>

When I tested on Linux, the code did not work. I tried an old version on
sage.math, that did not work either. Each time, I get the message that one
of the libraries is missing: - see below.

Unable to find one of liblapack.so, libcblas.so, libatlas.so, or
libf77blas.so in supplied directory.
Set SAGE_ATLAS_LIB to the lib directory of
liblapack.so,libcblas.so,libatlas.so,libf77blas.so,
to use existing atlas libraries, or unset SAGE_ATLAS_LIB to build one from
source.



When I looked at the code, there's a test for liblapack.so. That library is
never made on Solaris, but it does not appear it's made on Linux either.
Not one single build I have on sage.math has liblapack.so

kir...@sage:~$ find . -name liblapack.so
kir...@sage:~$ find . -name liblapack.a
./sage-4.5.alpha4/local/lib/liblapack.a
./sage-4.5/local/lib/liblapack.a
./sage-4.4.3/local/lib/liblapack.a
./sage-4.4.3/dist/sage-4.4.3-sage.math-x86_64-Linux/local/lib/liblapack.a
./sage-4.4.3/dist/tmp/sage-4.4.3-sage.math-x86_64-Linux/local/lib/liblapack
.a ./atlas-build/lib/liblapack.a
./sage-4.4.2/local/lib/liblapack.a


Since the script system_atlas.py tests for liblapack.so, and will generate
an error message if it does not exists, I can't possibly see how
SAGE_ATLAS_LIB ever works for anyone on Linux.

If you look at the code, do not look at sage-4.5.3 or later, as there were
some Solaris-specific changes made there on #9356. I suspect this has been
broken for some time.

Am I missing something?

Hi Dave,

If you use SAGE_ATLAS_LIB you use a set of libraries installed outside of
sage. Either you built it yourself or it is provided by your system.
Gentoo install liblapack.so - so it should work for me.  I don't know about
other distros.

Francois,

if I build Sage 4.4.1 in one directory from scratch, then I try to build a later version (sage 4.5.0) in another directory, is setting SAGE_ATLAS_LIB to the directory where the previous version was built in Sage not acceptable?

That can be made to work on Solaris, by

 * Not building liblapack.so - it often screws things up.
 * Checking for liblapack.a rather than liblapack.so
* Creating a symbolic link from the previously built liblapack.a to $SAGE_LOCAL/lib.



On the other hand there is a real problem, I think, in the way libcblas.so and
liblapack.so are generated in sage as their production often fails.

OK, that explains it. The reason the SAGE_ATLAS_LIB is not working on Linux is that liblapack.so is failing to build. When that happens, it means one can't use a previous build of ATLAS, since liblapack.so would have failed to build.

Since laplapack.a is always built, does it seem sensible to change the test from using liblapack.so to using liblapack.so? That way it should work on all systems?

That actually makes the code a lot cleaner, as it removes the need to have Solaris-specific tests everywhere.

It seems to me that
 * liblapack.so often fails to build on Linux
 * Will screw things up if one does build it on Solaris.

Therefor the solution seems simple - use the static library instead.

Francois


Dave

--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to