Computation running a long time

56 views
Skip to first unread message

saad khalid

unread,
Sep 12, 2016, 4:17:49 PM9/12/16
to sage-cloud
I was told that this post would be better here than in the sage-support board, so I'm reposting it here. Any help you can give would be highly appreciated.

Hello everyone:

I ran a computation on SMC that i figured would take some time. I'm generating 8000 groups, I believe, which is a slow process. Generating one group can take a few seconds, so I would expect generating 8000 groups to take 10-ish hours. However, this computation has been running for over 70 hours now, I believe. I keep the page from stopping by running some simple arithmetic on the side, so that the page stays active. It still says it is running but I can't tell if it actually is. The RAM usage on the page used to be going up but now it has stopped at 1198mb. Is there any way for me to know if the computation is still active, or how far it has gotten, without interrupting it?

Here is the code I ran:

reset()
macaulay2
.eval("""
K = toField(QQ[zet]/(zet^8 - zet^6 + zet^4 - zet^2 + 1))
needsPackage "
InvariantRing"
A = []
B = []
C = []
for a1 from 1 to 20 do (for a2 from 1 to 20 do (for a3 from 1 to 20 do A = A|[matrix{{zet^(a1),0,0},{0,
zet^(a2),0},{0,0,zet^(a3)}}] ) )
for i from 0 to (#A-1) do B = B|[generateGroup({A#i},K)]
for j from 0 to (#A-1) do C = C|[toString molienSeries B#j]
"""
)


Harald Schilly

unread,
Sep 13, 2016, 4:43:08 AM9/13/16
to sage-cloud
Please send us a full url link to the project to he...@sagemath.com

Also, what might be of relevance for others reading his: what's your
maximum ram usage quota? going above it probably causes using swap,
which kind of slows down everything a lot. It's in general much better
to split apart what you're doing into smaller chunks and keep it
friendly to the memory.

No clue about how to fix your code, though. Maybe split up those loops
for a1 to a3 into smaller ranges and then run individual computations
for each of the subranges?

-- h
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/317e4372-ffba-45bd-93dd-c333652dd51f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

William Stein

unread,
Sep 13, 2016, 10:10:00 AM9/13/16
to sage-cloud
Saad,

Regarding the idle timeout -- if you edit *any* file at all using the
web interface, then the timeout is reset back to 0. Basically, if you
do absolutely nothing with the web interface for 24 hours (say), then
the whole project stops; if you do anything at least once every 24
hours, the project won't stop (since the idle timeout keeps getting
reset). Thus your terminal would continue running.

William
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CAGG4CB68td9vyFJf5fYiVtAtpy_V6yOTNyyKOjFWNUxFc3MOuA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William Stein

CEO, SageMath, Inc.

saad khalid

unread,
Sep 13, 2016, 4:41:12 PM9/13/16
to sage-cloud
I have 3gb of RAM, the settings don't seem to show that the ram is full. Thanks for telling me about refreshing the project though! That's very helpful. I've broken apart the code and am running it separately. I'll let you know if it finishes or where it ends up hanging up!

saad khalid

unread,
Sep 13, 2016, 5:50:40 PM9/13/16
to sage-cloud
Okay, so I reran the code line by line in the terminal using M2, and it all worked up until this line:


for j from 0 to (#A-1) do C = C|[toString molienSeries B#j]

It ran for some time and then output this and quit out of M2(so I think I lost what it had finished computing before):

-- SIGSEGV
-- stack trace, pid 22221:
level 0 -- return addr: 0x0x45fe4f -- frame: 0x0x7fffde2bc0a0
-- end stack trace

I'm not sure what that means

William Stein

unread,
Sep 14, 2016, 12:11:13 AM9/14/16
to sage-cloud
It very likely means that M2 ran out of memory. (Less likely: you hit
a serious bug in M2.) You have to compute something else or try
again with a computer that has more memory.

-- William

>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/0f833cc2-f29c-4929-865d-726feb453474%40googlegroups.com.

saad khalid

unread,
Sep 14, 2016, 11:29:35 AM9/14/16
to sage-cloud
Cool, thanks! So, do you think adding more memory to the sage project would fix the issue?

William Stein

unread,
Sep 14, 2016, 12:22:34 PM9/14/16
to sage-...@googlegroups.com


On Wednesday, September 14, 2016, saad khalid <saad...@gmail.com> wrote:
Cool, thanks! So, do you think adding more memory to the sage project would fix the issue? 

I have no idea.  

--
You received this message because you are subscribed to the Google Groups "sage-cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/9fc8ca1f-7c2a-45a0-a68b-0fb7a9370831%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages