Ask Your Question
1

Building ATLAS

asked 2010-09-08 04:19:39 -0500

Mike Witt gravatar image

updated 2015-01-14 06:12:59 -0500

FrédéricC gravatar image

I have a little Acer Aspire One "netbook" with 1 Gig of RAM. I used to build sage from source on this machine, but I can't do so anymore. The problem appears to be ATLAS. There is so much output that happens during the ATLAS part of the build that I'm not sure what to post, but I'm open to suggestions on what part of the build output would be pertinent. Here are a couple of examples of the many errors I get:

/usr/local/sage-4.5.2/spkg/build/atlas-3.8.3.p12/ATLAS-build/bin/xsubstr -o ATL_tMpFiLe -i /usr/local/sage-4.5.2/spkg/build/atlas-3.8.3.p12/ATLAS-build/../src//tune/blas/gemm/CASES/scases.flg \
           -s '^gcc' 'gcc -fPIC -m32' -s ' gcc' ' gcc -fPIC -m32'
./xuserflag -i ATL_tMpFiLe -o scases.flg
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
FlagCheck.c:1: error: bad value (ultrasparc) for -mtune= switch
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
FlagCheck.c:1: error: bad value (ultrasparc) for -mtune= switch
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
FlagCheck.c:1: error: bad value (ultrasparc) for -mtune= switch
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
FlagCheck.c:1: error: bad value (ultrasparc) for -mtune= switch
cc1: error: unrecognized command line option "-mips4"

-----------------------------------------------------------------------

ATLAS failed to build for the 1-th time, possibly because of a
loaded system, so we will automatically try again up to 4 more times.
Waiting 5 minutes...
ATLAS failed to build for the 2-th time, possibly because of a
loaded system, so we will automatically try again up to 3 more times.
Waiting 12 minutes...
ATLAS failed to build for the 3-th time, possibly because of a
loaded system, so we will automatically try again up to 2 more times.
Waiting 8 minutes...
ATLAS failed to build for the 4-th time, possibly because of a
loaded system, so we will automatically try again up to 1 more times.
Waiting 8 minutes...
Too many failures to build ATLAS.  Giving up!

The last time I built on this particular machine was back at Sage 4.3.1. Since then I've also upgraded the OS from Fedora 10 to Fedora 13. I can no longer build 4.3.1 because of the libgcrypt issue with Fedora 13. So I don't know whether my atlas problem is the change to FC-13, the ATLAS build changing, or some other problem.

Here are the things I've tried so far, without success:

  1. Fixing the speed of both CPUs so they won't be throttled back. This didn't help. I'm not running anything else on the machine while I do the build. For comparison, I did the same build on another fairly old 2 processor machine (FC-12). I didn't set the cpu speeds, and I did various other things on that machine at the same time. That build worked with no problem.
  2. Doing the same build on another laptop with 1 Gig memory. This ...
(more)
edit retag flag offensive close merge delete

Comments

It's probably possible to install the official Fedora system-wide ATLAS and set the environment variable SAGE_ATLAS_LIB appropriately to avoid having to build ATLAS at all... I don't have time to work out or test the details.

William Stein gravatar imageWilliam Stein ( 2010-09-08 04:29:25 -0500 )edit

3 answers

Sort by » oldest newest most voted
1

answered 2010-09-09 05:45:42 -0500

There have been problems building Sage with shared libraries for ATLAS on some systems, so this may not work, but here is my suggestion:

  • copy the files libatlas.so.3, liblapack.so.3, libcblas.so.3, and libf77blas.so.3 to SAGE_ROOT/local/lib/, renaming them to libatlas.so, etc. (Remove the ".3".)

  • from any Sage installation on any machine, copy the header files cblas.h, clapack.h, and the directory "atlas" from the old SAGE_ROOT/local/include to the new one. If you don't have an installation handy, you should be able to copy the files from my home directory on t2.math.washington.edu.

  • touch the file SAGE_ROOT/spkg/installed/atlas-3.8.3.p14, to convince Sage that the ATLAS spkg has actually been installed.

  • proceed with the rest of the Sage build.

I do this all the time on t2.math.washington.edu, since building ATLAS there takes 11 hours (!), and since SAGE_ATLAS_LIB has been somewhat broken for Solaris systems. As I said at the start, this may end up failing because of issues with shared ATLAS libraries, but it seems like the most likely candidate to me.

edit flag offensive delete link more

Comments

I gave it a try. It didn't work. I still get a message at the end saying "Failed to build ATLAS." -- But now this only happens once, rather than multiple times, before it quits.

Mike Witt gravatar imageMike Witt ( 2010-09-09 06:18:56 -0500 )edit

I take back that last comment. It is continuing to build ATLAS multiple times. I doesn't appear to have believed that ATLAS was already installed. I *did* do the touch spkg/installed/atlas-3.8.3.p14, and that file *is* there.

Mike Witt gravatar imageMike Witt ( 2010-09-09 06:36:12 -0500 )edit

It shouldn't even try to build ATLAS if there is a file in spkg/installed matching the name of the spkg in spkg/standard. Was it atlas giving that message or some other spkg?

John Palmieri gravatar imageJohn Palmieri ( 2010-09-09 06:38:52 -0500 )edit

Maybe I gave you the wrong name for the file? Double check the atlas version with the file you created in spkg/installed.

John Palmieri gravatar imageJohn Palmieri ( 2010-09-09 06:41:05 -0500 )edit

Oops, right. After fixing the version the build *does* appear to be working. It's been going for about 5 hours now, but doesn't look in danger of finishing soon. I'll report back later.

Mike Witt gravatar imageMike Witt ( 2010-09-09 11:19:35 -0500 )edit
0

answered 2010-09-08 13:24:52 -0500

I don't believe a lack of header files will present a problem. Certainly Mathematica does not ship with a bunch of header files - just 4 static libraries (ending in .a).

You could try downloading a binary for your system, then copying the atlas files from that.

Whilst it is true that ATLAS takes a long time to build and prints lots of things, I don't believe it is particularly memory hungry.

I think someone managed to build Sage in 512 MB. I've built it in under 2 GB. But if you have other things running on the machine at the same time, you might be pushing your luck just to far.

edit flag offensive delete link more

Comments

I'm pretty sure it's not memory at this point. But I'm going to try a build on my girlfriends laptop, which is Fedora 12 and 512 MB. This might yield further information (not today). I hear what you're saying above and might try that. I'd really like to get a "sage only" build to work.

Mike Witt gravatar imageMike Witt ( 2010-09-08 13:32:12 -0500 )edit
0

answered 2010-09-08 04:29:20 -0500

I don't know what the problem in the build is, but here is a possible workaround.

Can you install the atlas package from the Fedora repository and use the SAGE_ATLAS_LIB environment variable to prevent Sage from building ATLAS? I.e., you should do

export SAGE_ATLAS_LIB=/usr

before running

make
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2010-09-08 04:19:39 -0500

Seen: 1,824 times

Last updated: Sep 09 '10