mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2010-11-01, 15:46   #23
yoyo
 
yoyo's Avatar
 
Oct 2006
Berlin, Germany

619 Posts
Default

In yoyo@home I wrote a wrapper arround gmp-ecm. It runs ecm with -chkpnt. This option periodicaly saves the state in phase 1 of the run. Phase 1 is roughly 80% of the total runtime. So during this phase checkpoints are generated.
These checkpoints are used to in restart cases. So if you shoutdown Boinc or your computer or if something crashes and Boinc restarts, the wrapper checks if a checkpoint file exists. If yes, it runs ecm with -resume to resume from the checkpoint.
yoyo
yoyo is offline   Reply With Quote
Old 2010-11-01, 20:25   #24
jyb
 
jyb's Avatar
 
Aug 2005
Seattle, WA

25·5·11 Posts
Default

Quote:
Originally Posted by debrouxl View Post
Currently, sending the ecmclient program either SIGTERM, SIGINT or SIGQUIT, stops the current curve immediately, before it completes.
What about adding another signal, such as SIGUSR1, for a delayed shutdown (including communication with the server) after the current curve completes ?
Actually, your description of the current behavior isn't accurate. In fact, the current behavior appears to be exactly what you're asking for. When the ecmclient program gets one of those signals, it sets a flag, and the next time a curve completes it shuts down in an orderly fashion.

You may be getting confused by what's happening if you're running ecmclient as a foreground job in some shell and you do a Ctrl-C. In such circumstances, the shell sends a SIGINT to the entire foreground process group, so GMP-ECM is getting one as well, causing it to die immediately (and ecmclient to then clean up immediately). But if you send a SIGINT (or SIGTERM or SIGQUIT) to just the ecmclient process (e.g. from some other shell), then you should see the behavior you want.
jyb is offline   Reply With Quote
Old 2010-11-01, 20:32   #25
jyb
 
jyb's Avatar
 
Aug 2005
Seattle, WA

25·5·11 Posts
Default

Quote:
Originally Posted by rogue View Post
I will be adding support for the GMP-ECM -k option.
??

You already have support for the GMP-ECM -k option (see "gmpecmkvalue" in the .cfg file). But it would be really nice to directly support -maxmem. I've done that for my own use, and it's really nice (Paul L's ECMNet server has lately been handing out P+1 assignments with a B1 of 260e6, and GMP-ECM would otherwise want about 2.5 GB of memory for these). Let me know if you want me to send you my diffs.
jyb is offline   Reply With Quote
Old 2010-11-01, 21:17   #26
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

5,881 Posts
Default

@Rogue What is stopping you doing something similar to prpnet?
henryzz is online now   Reply With Quote
Old 2010-11-01, 21:40   #27
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24·397 Posts
Default

Quote:
Originally Posted by jyb View Post
??

You already have support for the GMP-ECM -k option (see "gmpecmkvalue" in the .cfg file). But it would be really nice to directly support -maxmem. I've done that for my own use, and it's really nice (Paul L's ECMNet server has lately been handing out P+1 assignments with a B1 of 260e6, and GMP-ECM would otherwise want about 2.5 GB of memory for these). Let me know if you want me to send you my diffs.
I'm sorry. I had that reversed. I added support for -maxmem, not -k, which was already there.
rogue is offline   Reply With Quote
Old 2010-11-01, 21:42   #28
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24·397 Posts
Default

Quote:
Originally Posted by henryzz View Post
@Rogue What is stopping you doing something similar to prpnet?
Specifically what?

There are some fundamental differences between how PRPNet and ECMNet work. I intend to have them share a lot more code with the next release, but I don't think that a database is necessary for ECMNet. Maybe someone disagrees, but I don't see ECMNet servers having as many dedicated clients.
rogue is offline   Reply With Quote
Old 2010-11-01, 21:53   #29
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

5,881 Posts
Default

Quote:
Originally Posted by rogue View Post
Specifically what?

There are some fundamental differences between how PRPNet and ECMNet work. I intend to have them share a lot more code with the next release, but I don't think that a database is necessary for ECMNet. Maybe someone disagrees, but I don't see ECMNet servers having as many dedicated clients.
I meant with stopping and starting.
As far as I remember that was a pretty early change in prpnet. I fail to understand how starting llr or pfgw is different to starting ecm.
henryzz is online now   Reply With Quote
Old 2010-11-01, 22:22   #30
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24×397 Posts
Default

Quote:
Originally Posted by henryzz View Post
I meant with stopping and starting.
As far as I remember that was a pretty early change in prpnet. I fail to understand how starting llr or pfgw is different to starting ecm.
GMP-ECM didn't always write a checkpoint. If it does now or has the capability to, then I can support it.
rogue is offline   Reply With Quote
Old 2010-11-02, 13:44   #31
debrouxl
 
debrouxl's Avatar
 
Sep 2009

977 Posts
Default

Quote:
Originally Posted by jyb
You may be getting confused by what's happening if you're running ecmclient as a foreground job in some shell and you do a Ctrl-C. In such circumstances, the shell sends a SIGINT to the entire foreground process group, so GMP-ECM is getting one as well, causing it to die immediately (and ecmclient to then clean up immediately). But if you send a SIGINT (or SIGTERM or SIGQUIT) to just the ecmclient process (e.g. from some other shell), then you should see the behavior you want.
You're correct, thanks
debrouxl is offline   Reply With Quote
Old 2010-11-02, 17:07   #32
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

1076310 Posts
Default

Quote:
Originally Posted by rogue View Post
Specifically what?

There are some fundamental differences between how PRPNet and ECMNet work. I intend to have them share a lot more code with the next release, but I don't think that a database is necessary for ECMNet. Maybe someone disagrees, but I don't see ECMNet servers having as many dedicated clients.
One of my ideas a while back was to use a proper database behind an ECMNET server. Not so much to support more clients, though that would be a welcome by-product but more to make admin tasks easier.

I'd also make the server multi-threaded or multi-processing. At the moment a single rogue client (ambiguity intentional!) can hang the server, thereby mounting a denial of service to other clients.

Paul
xilman is offline   Reply With Quote
Old 2010-11-02, 17:55   #33
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24×397 Posts
Default

Quote:
Originally Posted by xilman View Post
One of my ideas a while back was to use a proper database behind an ECMNET server. Not so much to support more clients, though that would be a welcome by-product but more to make admin tasks easier.

I'd also make the server multi-threaded or multi-processing. At the moment a single rogue client (ambiguity intentional!) can hang the server, thereby mounting a denial of service to other clients.

Paul
With PRPNet, I added a database and multi-threading at the same time. Doing so with ECMNet should be fairly easy. I was hesitant to make such changes because I didn't see the value. Since you see value in it and are you are one of the bigger users (that I know of), I'll add that for the next release.
rogue is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Featured request bsquared YAFU 260 2019-12-10 10:30
Requests? Xyzzy Forum Feedback 104 2017-04-02 22:20
Collaboration Requests robert44444uk Prime Gap Searches 2 2017-01-17 07:57
a few simple requests for v5 ixfd64 PrimeNet 44 2010-01-11 20:21
New Year requests masser Sierpinski/Riesel Base 5 22 2007-09-24 21:05

All times are UTC. The time now is 08:20.


Tue Jul 27 08:20:58 UTC 2021 up 4 days, 2:49, 0 users, load averages: 2.04, 1.83, 1.78

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.