mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2018-05-24, 10:28   #1
shortcipher
 
Mar 2018

1710 Posts
Default Exit status 15

While running GMP-ECM with B1=11000000 and c=1302, it stopped with Exit status 15 and found no factors. The only place I have found the exit status values documented is the Linux Man page for gmp-ecm at https://www.systutorials.com/docs/linux/man/1-gmp-ecm/. It doesn't show exit status 15.
Anyone know what this value means? I was running in quiet mode so no other indications.
shortcipher is offline   Reply With Quote
Old 2018-05-24, 10:34   #2
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

6,323 Posts
Default

Quote:
Originally Posted by shortcipher View Post
While running GMP-ECM with B1=11000000 and c=1302, it stopped with Exit status 15 and found no factors. The only place I have found the exit status values documented is the Linux Man page for gmp-ecm at https://www.systutorials.com/docs/linux/man/1-gmp-ecm/. It doesn't show exit status 15.
Anyone know what this value means? I was running in quiet mode so no other indications.
My suspicion is that exit status 15 means 'exit status -15', which means 'the process was terminated' - usually this means the computer ran out of memory and decided to kill ecm. You're right that +15 is not a valid configuration of set bits for a gmp-ecm status.

Last fiddled with by fivemack on 2018-05-24 at 10:35
fivemack is offline   Reply With Quote
Old 2018-05-28, 07:03   #3
shortcipher
 
Mar 2018

1710 Posts
Default

@fivemack was right in saying that the process was terminated. I was running GMP-ECM on Windows 7 as a Python subprocess. Akos Kiss at https://bugs.python.org/issue31863 reports that processes CAN return exit code 15 when terminated on Windows. In my case, the GMP-ECM subprocess was terminated by another process running on the same PC which was over-zealous in trying to clean up orphaned subprocesses.
shortcipher is offline   Reply With Quote
Old 2020-10-14, 23:21   #4
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

32·11·17 Posts
Default

Sorry if this is a bit off-topic:

In looping mode using -one, would GMP-ECM produce a non-zero exit code if a factor was found?
storm5510 is offline   Reply With Quote
Old 2020-10-15, 08:49   #5
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

22·7·13 Posts
Default

Yes! If it finds the number itself:
Code:
~$ echo 2047 | ecm -one 1000
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
Input number is 2047 (4 digits)
Using B1=1000, B2=51606, polynomial x^1, sigma=1:2307810929
Step 1 took 1ms
********** Factor found in step 1: 2047
Found input number N
~$ echo $?
8
If it finds a factor and the cofactor is prime (maybe PRP):
Code:
~$ echo 2047 | ecm -one 1
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
Input number is 2047 (4 digits)
Using B1=1, B2=12, polynomial x^1, sigma=1:309160743
Step 1 took 0ms
Step 2 took 0ms
********** Factor found in step 2: 23
Found prime factor of 2 digits: 23
Prime cofactor 89 has 2 digits
~$ echo $?
14
If it finds a factor and the cofactor is composite:
Code:
~$ echo '2*(2^2047-1)' | ecm -one 1
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
Input number is 2*(2^2047-1) (617 digits)
********** Factor found in step 1: 2
Found prime factor of 1 digits: 2
Composite cofactor (2*(2^2047-1))/2 has 617 digits
~$ echo $?
6

I'd have to look into the code if there are other possibilities.
kruoli is online now   Reply With Quote
Old 2020-10-15, 13:00   #6
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

32238 Posts
Default

Quote:
Originally Posted by kruoli View Post
Yes! If it finds the number itself:
Code:
~$ echo 2047 | ecm -one 1000
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
Input number is 2047 (4 digits)
Using B1=1000, B2=51606, polynomial x^1, sigma=1:2307810929
Step 1 took 1ms
********** Factor found in step 1: 2047
Found input number N
~$ echo $?
8
If it finds a factor and the cofactor is prime (maybe PRP):
Code:
~$ echo 2047 | ecm -one 1
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
Input number is 2047 (4 digits)
Using B1=1, B2=12, polynomial x^1, sigma=1:309160743
Step 1 took 0ms
Step 2 took 0ms
********** Factor found in step 2: 23
Found prime factor of 2 digits: 23
Prime cofactor 89 has 2 digits
~$ echo $?
14
If it finds a factor and the cofactor is composite:
Code:
~$ echo '2*(2^2047-1)' | ecm -one 1
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
Input number is 2*(2^2047-1) (617 digits)
********** Factor found in step 1: 2
Found prime factor of 1 digits: 2
Composite cofactor (2*(2^2047-1))/2 has 617 digits
~$ echo $?
6
I'd have to look into the code if there are other possibilities.
Interesting. Thank you for the reply.

I was looking for a way to incorporate this into a Windows batch file. Below is an example:

Quote:
echo "2^1861-1" | ecm -c 100 -v -one 3 1e6
if %errorlevel% neq 0 goto errhandler
In this case, neq is "not equal to." Knowing the specific return value is not really necessary. The three examples above demonstrate that -one also works in a non-looping mode. I was wondering about this.
storm5510 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
GMP-ECM 6.2.3 exit with 0xc0000005 yoyo GMP-ECM 14 2009-04-29 18:28
GMP-ECM 6.2.1 exit with 0xc00000fd yoyo GMP-ECM 13 2009-03-31 21:29
Crash on exit rbarreira Software 0 2003-11-30 03:28
Will a forced exit loose work ? dsouza123 NFSNET Discussion 1 2003-08-15 02:56
Status norbert Lounge 5 2002-11-15 14:41

All times are UTC. The time now is 11:41.

Wed Nov 25 11:41:54 UTC 2020 up 76 days, 8:52, 4 users, load averages: 1.46, 1.48, 1.57

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.