![]() |
![]() |
#1 |
Aug 2020
79*6581e-4;3*2539e-3
3×181 Posts |
![]()
When pressing ctrl-c during ECM under linux it only kills the current ECM instance, i.e. just the one curve, but keeps going otherwise.
I press ctrl-z and then kill -9 the process, but that's somewhat cumbersome. Is there another way? |
![]() |
![]() |
![]() |
#2 |
"Ben"
Feb 2007
7×11×47 Posts |
![]()
I just hold down ctrl-C until yafu actually sees one and quits. It may be annoying, but it's less annoying than me going back and re-thinking and re-implementing the signal-handling strategy for ecm/factor.
|
![]() |
![]() |
![]() |
#3 |
Aug 2020
79*6581e-4;3*2539e-3
10000111112 Posts |
![]()
Ok, thanks.
|
![]() |
![]() |
![]() |
#4 |
"Oliver"
Sep 2017
Porta Westfalica, DE
104010 Posts |
![]()
Maybe you could use the return value of ecm if it is killed by ^C?
Code:
~$ ecm 1e9 GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM] 2^1277-1 Input number is 2^1277-1 (385 digits) Using B1=1000000000, B2=19071176724616, polynomial Dickson(30), sigma=0:8818687562867645865 ^C ~$ echo $? 130 |
![]() |
![]() |
![]() |
#5 | ||
"Ben"
Feb 2007
7×11×47 Posts |
![]() Quote:
![]() Quote:
Waiting for a second is a good idea also. Will have to consider that. |
||
![]() |
![]() |
![]() |
#6 |
"Oliver"
Sep 2017
Porta Westfalica, DE
104010 Posts |
![]()
There might be a workaround for this.
![]() When starting YAFU, execute ecm and send it ^C programmatically and observe the resulting return code. Save it. Another possibility would be to handle all return codes that are not defined by ecm itself (the manpage mentions only 0, 1, 2, 6, 8, 10 an 14) and are not handled otherwise as an abortion, because in this case, either the process was interrupted by the user or something else went horribly wrong. |
![]() |
![]() |
![]() |
#7 | |
"Ben"
Feb 2007
E2316 Posts |
![]() Quote:
I'm not super keen on handling specific return codes (after my first failed attempt) because they are subject to change and I don't want to have to keep tabs on them. Saving the return code on a test run seems like it could be the best way to go. However, yafu already does a lot of stuff on initialization so I have to pay attention to what gets added to it. If a use case involves running yafu in a loop, e.g. in a 'foreach', the init cost can start to add up significantly. Building on that thought would be to add the return code test to the "tune" command. Then it could get saved in the .ini file or something. |
|
![]() |
![]() |
![]() |
#8 |
"Alexander"
Nov 2008
The Alamo City
3·271 Posts |
![]()
This Stack Overflow post on Unix process waits shows a possible elegant solution for Unix-like systems, but it's entirely unportable to Windows, as the latter doesn't have signals.
|
![]() |
![]() |
![]() |
#9 | |
Aug 2020
79*6581e-4;3*2539e-3
3×181 Posts |
![]() Quote:
But if it's too much hassle, forget about it, Ctrl-Z and kill works after all. Last fiddled with by bur on 2021-06-15 at 08:44 |
|
![]() |
![]() |
![]() |
#10 |
"Alexander"
Nov 2008
The Alamo City
3×271 Posts |
![]()
I've attached an old script I used to use to control aliqueit, which in my configuration called yafu inside. It used a Unix FIFO (named pipe) and the echo shell command to do process and command control. I don't know how much use it'll be to you in its current form, but if you're looking for a script that can control yafu or aliqueit (and even stop them in progress and resume from that point), you can reply here or hit me up via PM.
|
![]() |
![]() |
![]() |
#11 |
Aug 2020
79*6581e-4;3*2539e-3
10000111112 Posts |
![]()
Thanks, when I have some time I'll gladly look into it. I wanted to get into scripting for a while. Mostly to do ECM via yafu and switch to CADO for NFS.
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
yafu ignoring yafu.ini | chris2be8 | YAFU | 9 | 2022-02-17 17:52 |
Running YAFU via Aliqueit doesn't find yafu.ini | EdH | YAFU | 8 | 2018-03-14 17:22 |
When will it stop? | ThomRuley | Msieve | 20 | 2010-05-19 02:12 |
Should we stop at k=249? | jocelynl | 15k Search | 2 | 2004-07-10 13:31 |
RMA - stop LLR bug | paulunderwood | 3*2^n-1 Search | 8 | 2004-05-19 07:10 |