Something is wrong with my installed sage

82 views
Skip to first unread message

Ai Bo

unread,
Mar 12, 2019, 11:40:19 PM3/12/19
to sage-devel
Just compiled sage from source code on Linux.
When I launched ./sage, I can do simple math like 2+2 which give correct 
But when I type:
sage: import sage.graphs

sage: print("%d" % len(list(graphs.nauty_geng("8"))))

sage: print("%d" % len(list(graphs(8))))

I got 0 for both which are not as expected. Something is wrong. Please help.

Ai Bo

unread,
Mar 13, 2019, 12:04:46 AM3/13/19
to sage-devel
I also tried with the example in the document but I got different result.
sage: for i in range(7):
....:     print(len(list(graphs(i))))
....:     
1
0
0
0
0
0
0


sage: for i in range(7):
....:     print(len(list(graphs(i))))
1
1
2
4
11
34
156

Dima Pasechnik

unread,
Mar 13, 2019, 3:48:15 AM3/13/19
to sage-devel
On Wed, Mar 13, 2019 at 4:04 AM Ai Bo <boai...@gmail.com> wrote:
>
> I also tried with the example in the document but I got different result.
> sage: for i in range(7):
> ....: print(len(list(graphs(i))))

Did you try this in a freshly opened Sage session?

In Python it is possible to break functionality of the system by e.g.
changing a library function,
e.g. if you created a function called graphs, you'd be surprised.

E.g.

sage: map(lambda m: len(list(graphs(m))), range(1,5)) # at it should be
[1, 2, 4, 11]
sage: def graphs(k):
....: if k<2: return [1]
....: return []
....:
sage: map(lambda m: len(list(graphs(m))), range(1,5)) # what you have now?
[1, 0, 0, 0]

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

if something is still wrong you can run tests:

make ptest

and check the output in logs/ptest.log

Ai Bo

unread,
Mar 13, 2019, 11:24:02 AM3/13/19
to sage-...@googlegroups.com
I used a fresh opened Sage session.
I didn't define my own function.
Even when I tried with your first line example, without anything else in a new Sage session, I got :
./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.6, Release Date: 2019-01-15                     │
│ Using Python 2.7.15. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: sage: map(lambda m: len(list(graphs(m))), range(1,5)) 
[0, 0, 0, 0]
sage: 

I tried "make ptest", but due to other errors related to doc, it doesn't work.


[dochtml]   File "/nfs/pdx/disks/lmg_dp_01/zlwang/testing/Rupert/Sage/sage-8.6/local/lib/python2.7/site-packages/sage/algebras/quantum_groups/quantum_group_gap.py", line 33, in <module>
[dochtml]     from sage.libs.gap.libgap import libgap
[dochtml]   File "sage/libs/gap/libgap.pyx", line 788, in init sage.libs.gap.libgap (build/cythonized/sage/libs/gap/libgap.c:9181)
[dochtml]     libgap = Gap()
[dochtml]   File "sage/libs/gap/libgap.pyx", line 628, in sage.libs.gap.libgap.Gap.__init__ (build/cythonized/sage/libs/gap/libgap.c:6052)
[dochtml]     initialize()
[dochtml]   File "sage/libs/gap/util.pyx", line 316, in sage.libs.gap.util.initialize (build/cythonized/sage/libs/gap/util.c:5399)
[dochtml]     sig_on()
[dochtml] SignalError: Segmentation fault
[dochtml] [combinat ] loading pickled environment... not yet created
[dochtml] [combinat ] building [inventory]: targets for 367 source files that are out of date
[dochtml] [combinat ] updating environment: 367 added, 0 changed, 0 removed
[dochtml] Error building the documentation.


Thank you and please help.

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/HheojpxN8Lc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

E. Madison Bray

unread,
Mar 13, 2019, 11:44:46 AM3/13/19
to sage-devel
I think that, considering the problems you've mentioned in other
threads, you probably have a severely broken build. Did you take my
previous advice of running

$ make distclean

and starting over again, making sure you can complete the full build
without errors?

Also, is there a specific reason you need to build Sage yourself on
this specific machine? Not that I doubt it, nor that I wouldn't like
to try to help, but it seems like a lot of effort and frustration for
dubious benefit.

Could you mention again exactly which Linux distribution this is, and
on what CPU architecture? Perhaps I can start up a VM and try to
build Sage myself to see if there are any specific problems I can
identify.

Dima Pasechnik

unread,
Mar 13, 2019, 11:58:46 AM3/13/19
to sage-devel
By looking at the output it looks as if the build it on an NFS, and this is known to be severely broken. Could you do the build on a local disk?

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

E. Madison Bray

unread,
Mar 13, 2019, 12:03:16 PM3/13/19
to sage-devel
On Wed, Mar 13, 2019 at 4:58 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> By looking at the output it looks as if the build it on an NFS, and this is known to be severely broken. Could you do the build on a local disk?

Oh, nice catch. Yes, many build tools can have problems on NFS,
especially on older kernels. For example if timestamps are not
fine-grained enough you can end up with screwy issues where some
dependencies don't get rebuilt properly and things like that.

Ai Bo

unread,
Mar 13, 2019, 12:18:12 PM3/13/19
to sage-...@googlegroups.com
Yes. This is done on NFS.
I can't build on local disks as this is not on a particular machine. But I do own my own NFS disks.
Also, the reason I want to build on my machine as when I use the online version(server), a long running program will be paused from time to time. I want to run on some machines I have access to instead. 

If I can't build on NFS, this seems to be a dead end too. 

You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/HheojpxN8Lc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Dima Pasechnik

unread,
Mar 13, 2019, 12:43:40 PM3/13/19
to sage-devel
On Wed, Mar 13, 2019 at 4:18 PM Ai Bo <boai...@gmail.com> wrote:
>
> Yes. This is done on NFS.
> I can't build on local disks as this is not on a particular machine. But I do own my own NFS disks.

Normally multi-user systems have a "scratch" partition, a local disk
reserved for this kind of jobs, which is not backed up, but is fast to
access (as opposed to NFS).
Ask your system admins for access to such a partition, it's a
perfectly reasonable request.

E. Madison Bray

unread,
Mar 13, 2019, 12:59:05 PM3/13/19
to sage-devel
On Wed, Mar 13, 2019 at 5:18 PM Ai Bo <boai...@gmail.com> wrote:
>
> Yes. This is done on NFS.
> I can't build on local disks as this is not on a particular machine. But I do own my own NFS disks.
> Also, the reason I want to build on my machine as when I use the online version(server), a long running program will be paused from time to time. I want to run on some machines I have access to instead.

What do you mean by "the online version(server)"? Like, Cocalc?

Is there a reason you can't use one of the pre-compiled binary installers?

Ai Bo

unread,
Mar 13, 2019, 1:56:46 PM3/13/19
to sage-...@googlegroups.com
Yes. I meant Cocalc.

My Linux OS is customized. So I am not sure I can use pre-compiled one.
Here is my OS info:
uname -s
Linux

uname -i
x86_64

uname -o
GNU/Linux

Ai Bo

unread,
Mar 13, 2019, 1:57:58 PM3/13/19
to sage-...@googlegroups.com
Sorry, I can't. All local disks are cleaned out every 30 days. 

Dima Pasechnik

unread,
Mar 13, 2019, 2:04:57 PM3/13/19
to sage-devel
On Wed, Mar 13, 2019 at 5:57 PM Ai Bo <boai...@gmail.com> wrote:
>
> Sorry, I can't. All local disks are cleaned out every 30 days.

but building does not take that long. :-)
Besides, once you have a working build you can, with a bit of effort, move it
around.

Ai Bo

unread,
Mar 13, 2019, 2:21:54 PM3/13/19
to sage-...@googlegroups.com
I see. Will try. Thank you.

Ai Bo

unread,
Mar 13, 2019, 11:39:12 PM3/13/19
to sage-...@googlegroups.com
Sorry, it doesn't work if I build on local disk and then copy to /nfs.
I got error:
bash-4.3$ ./sage

ERROR:  The Sage installation tree has moved

from /tmp/.../sage-8.6
  to /nfs/.../Sage/sage-8.6

This is not supported, and Sage will not work. To install Sage from a
binary package:

As I mentioned before, I can't save files on local disk more then 30 days. But it seems I can't copy the whole directory to /nfs either.

Please advise.

Dima Pasechnik

unread,
Mar 14, 2019, 3:09:42 AM3/14/19
to sage-devel
On Thu, Mar 14, 2019 at 3:39 AM Ai Bo <boai...@gmail.com> wrote:
>
> Sorry, it doesn't work if I build on local disk and then copy to /nfs.
> I got error:
> bash-4.3$ ./sage
>
> ERROR: The Sage installation tree has moved
>
> from /tmp/.../sage-8.6
> to /nfs/.../Sage/sage-8.6
>
> This is not supported, and Sage will not work. To install Sage from a
> binary package:

yes, you need to create a binary package in this case. It (not the
unpacked result, but the package itsel) can be
moved. Indeed, Sage binary installers have to come from somewhere, right? See

https://github.com/sagemath/binary-pkg

Sorry, I should have mentioned this earlier. It has to be built from
scratch, AFAIK.

Dima Pasechnik

unread,
Mar 14, 2019, 3:24:58 AM3/14/19
to sage-devel
On Thu, Mar 14, 2019 at 7:09 AM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Thu, Mar 14, 2019 at 3:39 AM Ai Bo <boai...@gmail.com> wrote:
> >
> > Sorry, it doesn't work if I build on local disk and then copy to /nfs.
> > I got error:
> > bash-4.3$ ./sage

But did you try moving it back to the local disk, before starting it?
Indeed, you just need to have a copy of your files on NFS, and copy it
to the local disk for running.

Sorry for confusion, again.

Dima Pasechnik

unread,
Mar 14, 2019, 3:51:40 AM3/14/19
to sage-devel
On Thu, Mar 14, 2019 at 7:24 AM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Thu, Mar 14, 2019 at 7:09 AM Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > On Thu, Mar 14, 2019 at 3:39 AM Ai Bo <boai...@gmail.com> wrote:
> > >
> > > Sorry, it doesn't work if I build on local disk and then copy to /nfs.
> > > I got error:
> > > bash-4.3$ ./sage
>
> But did you try moving it back to the local disk, before starting it?
> Indeed, you just need to have a copy of your files on NFS, and copy it
> to the local disk for running.
(It's important that it's moved to the same place in the directory
tree where it was built).

Ai Bo

unread,
Mar 14, 2019, 1:44:12 PM3/14/19
to sage-...@googlegroups.com
I see. Thank you. 
As I don't know how and when the files will be cleaned on the local disk and I don't know when my program, if launched at local disk, will be killed.

I downloaded the binary package. I am a little bit confused. Does the binary package know where I already build ./sage?

Dima Pasechnik

unread,
Mar 14, 2019, 2:25:03 PM3/14/19
to sage-devel
On Thu, Mar 14, 2019 at 5:44 PM Ai Bo <boai...@gmail.com> wrote:
>
> I see. Thank you.
> As I don't know how and when the files will be cleaned on the local disk and I don't know when my program, if launched at local disk, will be killed.

A typical HPC center policy with scratch disks is that files live a
certain amount of time, i.e. most probably 1 month since creation.
Surely local disks are not cleaned at random moments, otherwise what's
point of having them, they are basically useless.

>
> I downloaded the binary package. I am a little bit confused. Does the binary package know where I already build ./sage?

I think you need to start from the beginning, again.

But I think it's much better idea to use the local disks, surely 30
days is long enough for a lot of work, and then you wipe your local
disk, copy there files from NFS, and may start again.
Reply all
Reply to author
Forward
0 new messages