Longest and most pointless Sage build ever?

77 views
Skip to first unread message

Carl Witty

unread,
Feb 17, 2009, 10:52:34 PM2/17/09
to sage-...@googlegroups.com
I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
large portions of it actually work.

300 files had failing doctests; this means that all doctests passed in
864 files. A lot of the failing doctests are with pexpect (maxima,
gap, etc.); I don't know why these fail. When I try simple things
with gap and maxima, they do work. Many more tests fail due to
timeouts; the 300-second timeout is far too short for the G1.
(Doctesting any file with doctests takes >50 seconds; doctesting a
file with no doctests takes >4 seconds. The entire doctest run took
270724 seconds, or a little over 3 days.)

Unfortunately, it's far too slow to be useful for anything (just
starting Sage takes about a minute, if there's enough free memory; but
since Android likes to keep the memory full all the time, there never
is enough free memory, and it takes much longer to start). So I don't
plan to do anything further with the project.

Of course, the sensible way to do this is to find some nice fast
computer and set up a cross-compiler. I didn't do this the sensible
way; I actually did the build on the cell phone. And of course, the
build would stop every once in a while due to a bug, which I would
then patch around. So, adding up the 14 chunks of compilation
involved, the entire compile took 20943 minutes of real time (about
14.5 days) and 9438 minutes (about 6.5 days) of CPU time. You'll note
that the CPU time adds up to less than half of the real time; most of
the rest of the time was spent swapping. The G1 has about 100MB of
RAM; I set up a swap file on my micro-SD card, to allow the build to
proceed at all. On several files, the compiler uses more than 300MB.
While compiling those files, the CPU is typically less than 1% active;
I'm pretty sure that there were files that took more than a day to
compile. The phone was essentially unusable for smartphone activities
(web browsing, etc.) while the build was running. In fact, the whole
smartphone UI crashed and restarted on a fairly regular basis during
the build (I'm guessing it has some sort of watchdog timer and reboots
itself if it detects that some operation is taking an unreasonably
long time), but the build just continued anyway (running inside a
screen session).

The ATLAS tuning process took about 3.2 days (with almost as much CPU
time as real time; that didn't swap much). Skimming through the logs,
I see reports of numbers like 3 to 6 MFLOPs.

The build was performed inside a Debian armel testing chroot; it's
pretty nice being able to run real Debian on my cell phone.
(Everything works; I can ssh in and out, etc., although when it's on
the cell phone network, inbound connections are problematic because
it's behind a NAT.)

To make the whole project even more pointless, since the phone is
running real Debian (inside the chroot), I can probably just wait a
few weeks or months for Tim Abbott to get all the portability issues
fixed in the sagemath Debian package, and then install Sage on the
phone with apt-get.

Here's the processor:

cwitty@localhost:/tmp$ cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 383.38
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 32768
I assoc : 4
I line length : 32
I sets : 256
D size : 32768
D assoc : 4
D line length : 32
D sets : 256

Hardware : trout
Revision : 0080
Serial : 0000000000000000

Carl

Rob Beezer

unread,
Feb 17, 2009, 11:11:20 PM2/17/09
to sage-devel
Carl,

Great story! I'd been looking for an excuse to get a G1. With Sage
running, maybe I can deduct it as business expense.

Rob

M. Edward (Ed) Borasky

unread,
Feb 17, 2009, 11:11:41 PM2/17/09
to sage-...@googlegroups.com
On Tue, Feb 17, 2009 at 7:52 PM, Carl Witty <carl....@gmail.com> wrote:
>
> I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
> large portions of it actually work.
>
[snip]

Interesting, but how about a Sage *server* that one could access from
an Android or iPhone?
--
M. Edward (Ed) Borasky

I've never met a happy clam. In fact, most of them were pretty steamed.

William Stein

unread,
Feb 17, 2009, 11:13:20 PM2/17/09
to sage-...@googlegroups.com
On Tue, Feb 17, 2009 at 8:11 PM, M. Edward (Ed) Borasky
<zzn...@gmail.com> wrote:
>
> On Tue, Feb 17, 2009 at 7:52 PM, Carl Witty <carl....@gmail.com> wrote:
>>
>> I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
>> large portions of it actually work.
>>
> [snip]
>
> Interesting, but how about a Sage *server* that one could access from
> an Android or iPhone?

I use http://sagenb.org all the time from my iPhone.

William

John H Palmieri

unread,
Feb 17, 2009, 11:13:51 PM2/17/09
to sage-devel
Wow, this is great! This is the best argument I've seen for getting a
G1.

On Feb 17, 7:52 pm, Carl Witty <carl.wi...@gmail.com> wrote:
> I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
> large portions of it actually work.
>
> 300 files had failing doctests; this means that all doctests passed in
> 864 files.  A lot of the failing doctests are with pexpect (maxima,
> gap, etc.); I don't know why these fail.  When I try simple things
> with gap and maxima, they do work.  

[snip]

> To make the whole project even more pointless, since the phone is
> running real Debian (inside the chroot), I can probably just wait a
> few weeks or months

i.e., basically the amount of time to compile it...

> for Tim Abbott to get all the portability issues
> fixed in the sagemath Debian package, and then install Sage on the
> phone with apt-get.

John

Carl Witty

unread,
Feb 17, 2009, 11:21:52 PM2/17/09
to sage-...@googlegroups.com
On Tue, Feb 17, 2009 at 8:11 PM, M. Edward (Ed) Borasky
<zzn...@gmail.com> wrote:
>
> On Tue, Feb 17, 2009 at 7:52 PM, Carl Witty <carl....@gmail.com> wrote:
>>
>> I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
>> large portions of it actually work.
>>
> [snip]
>
> Interesting, but how about a Sage *server* that one could access from
> an Android or iPhone?

sagenb.org mostly works from the Android browser. (There are some
oddnesses; probably it would work better if the notebook had specific
tweaks for it, like it does for the iPhone.)

Carl

M. Edward (Ed) Borasky

unread,
Feb 17, 2009, 11:40:04 PM2/17/09
to sage-...@googlegroups.com
Thanks! My Verizon contract is up, and I'm seriously considering an
Android, even though I don't believe in smartphones. I much prefer a
real laptop, a headset and VOIP. :)

mhampton

unread,
Feb 18, 2009, 1:40:43 AM2/18/09
to sage-devel
Can you post a picture of it running Sage?

Very impressive work!

-Marshall

Harald Schilly

unread,
Feb 18, 2009, 4:30:52 AM2/18/09
to sage-devel
Carl Witty wrote:
> Unfortunately, it's far too slow to be useful for anything ...

cool story, but how about sympy, have you tried it? it's maybe worth a
try!

h

Carl Witty

unread,
Feb 19, 2009, 3:05:18 PM2/19/09
to sage-...@googlegroups.com
On Tue, Feb 17, 2009 at 10:40 PM, mhampton <hamp...@gmail.com> wrote:
>
> Can you post a picture of it running Sage?
>
> Very impressive work!

I got my brother to take some pictures; the results are here:
http://www.flickr.com/photos/timrwit/3292837101/
http://www.flickr.com/photos/timrwit/3293659686/

Carl

Carl Witty

unread,
Feb 19, 2009, 3:09:19 PM2/19/09
to sage-...@googlegroups.com

I never had any intention of doing computations with Sage on my cell
phone; I actually had hopes (before I figured out how pathetically
slow the cell phone is for compiling and running Sage) of doing Sage
development on the cell phone, though. Plus, I'm pretty sure sympy
doesn't support all the features I've spent the last two years adding
to Sage :)

But yes, I expect sympy actually would run reasonably well on the cell
phone, so that's a great idea for somebody who needs portable computer
algebra.

Carl

Carl Witty

unread,
Aug 19, 2010, 9:47:34 PM8/19/10
to sage-...@googlegroups.com
On Tue, Feb 17, 2009 at 8:52 PM, Carl Witty <carl....@gmail.com> wrote:
> I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
> large portions of it actually work.

Two people have asked me for a copy of my build.

Let me emphasize that many doctests failed, and you'd need an ARM
device with lots of memory to make such a thing useful. Also, I have
no idea how portable the result is. (It was built on a T-Mobile G1,
using a copy of Debian testing from early 2009.)

I've uploaded my entire Android home directory; this includes lots of
random log files and build artifacts, aside from the Sage build. (I
figure that if the build has value, it's at least as likely to be in
the hacks I applied to make things build as in the actual final
result.)

When a spkg failed to build, I went in and edited it and then rebuilt
it by hand. And I didn't delete the build trees for those spkgs. So
if you look at sage/spkg/build, you can see that the packages I had
trouble with were atlas, gap, libfplll, singular, and tachyon; and you
can see whatever changes I made to get them to compile in the
respective subdirectories of sage/spkg/build.

You can also see lots of log files (install.log and test.log, and then
when I hacked the failing spkgs and installed them with spkg-install I
logged those to separate log files in my home directory).

I suppose I could try to answer questions if anybody has any, but I
will have forgotten a lot of the details by now.

The whole thing is at
http://sage.math.washington.edu/home/cwitty/android-build-tree.tar.bz2;
that file is almost a gigabyte. Or, you can just browse the build
tree at http://sage.math.washington.edu/home/cwitty/android-build-tree/
.

Unfortunately, when I copied the tree using "scp -rp", the symlinks
were converted to copies. I converted a few of the biggest copies
back to symlinks, but I didn't convert all of them. Other than that,
this should be an exact copy of my build tree.

Carl

Reply all
Reply to author
Forward
0 new messages