mersenneforum.org  

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

Reply
 
Thread Tools
Old 2016-09-02, 16:57   #1
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

2·11·167 Posts
Default Aliqueit is Throwing -B2scale Errors When it Calls GMP-ECM

Example:
Code:
Unknown option: -B2scale1e4...              
Unknown option: -B2scale1=55e3...              
Unknown option: -B2scalees at B1=11e3...              
Unknown option: -B2scalee5...              
Unknown option: -B2scale1=25e4...              
Unknown option: -B2scaleves at B1=5e4...
I'm pretty sure the extra ending after -B2scale is just the calling information line being overwritten, e.g.:
Code:
cXX: running xx curves at B1=55e3
etc.
I captured the output call to ecm and it looks fine. Has B2scale been removed from previous gmp-ecm options or, is this possibly an Aliqueit issue?

This really trashes ecm.py!
Code:
Unknown option: -B2scale1e4...              
Unknown option: -B2scale1=55e3...              
-> ___________________________________________________________________
-> | Running ecm.py, a Python driver for distributing GMP-ECM work   |
-> | on a single machine.  It is copyright, 2011-2016, David Cleaver |
-> | and is a conversion of factmsieve.py that is Copyright, 2010,   |
-> | Brian Gladman. Version 0.40 (Python 2.6 or later)  6th Aug 2016 |
-> |_________________________________________________________________|
 
-> Number(s) to factor:thread
Traceback (most recent call last):
  File "/home/duser/Math/Aliqueit/ecm.py", line 2428, in <module>
    parse_ecm_options(sys.argv, set_args = True, first = True)
  File "/home/duser/Math/Aliqueit/ecm.py", line 2283, in parse_ecm_options
    print('-> {0:s} ({1:d} digits)'.format(line, num_digits(line)))
  File "/home/duser/Math/Aliqueit/ecm.py", line 800, in num_digits
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
...unless something else is causing the above... Is this really telling me the Aliqueit call is flawed?

I'm using GMP-ECM 7.0.3, GMP 6.1.1 and the latest ecm.py (v40) from its thread.

I have not tried earlier versions yet, but all was well prior to all the recent updating I've been doing.

This is happening on four separate machines, three Intel, one AMD.

Last fiddled with by EdH on 2016-09-02 at 16:59
EdH is offline   Reply With Quote
Old 2016-09-03, 01:18   #2
WraithX
 
WraithX's Avatar
 
Mar 2006

11·43 Posts
Default

Quote:
Originally Posted by EdH View Post
Example:
Code:
Unknown option: -B2scale1e4...              
Unknown option: -B2scale1=55e3...              
Unknown option: -B2scalees at B1=11e3...              
Unknown option: -B2scalee5...              
Unknown option: -B2scale1=25e4...              
Unknown option: -B2scaleves at B1=5e4...
I'm pretty sure the extra ending after -B2scale is just the calling information line being overwritten, e.g.:
Code:
cXX: running xx curves at B1=55e3
etc.
I captured the output call to ecm and it looks fine. Has B2scale been removed from previous gmp-ecm options or, is this possibly an Aliqueit issue?

This really trashes ecm.py!
...unless something else is causing the above... Is this really telling me the Aliqueit call is flawed?

I'm using GMP-ECM 7.0.3, GMP 6.1.1 and the latest ecm.py (v40) from its thread.

I have not tried earlier versions yet, but all was well prior to all the recent updating I've been doing.

This is happening on four separate machines, three Intel, one AMD.
B2scale was removed from GMP-ECM in svn 2557. That was between 6.4.4 (svn 2439) and 7.0 (svn 2900).

Are the errors affecting aliquiet so that it is returning wrong results or not finding results it should? This is out of my scope of knowledge, just curious.

What command line did you use to call ecm.py? I run it with the latest ecm and have no problems. The last error mentioned from your ecm.py crash was "OSError: [Errno 2] No such file or directory". I'm not sure if that means it couldn't find the input number file, or if it couldn't find your ecm executable. Now that I look at it, there's a chance it might not be finding the ecm executable. Could you try changing line 799 of ecm.py from this:
cmd = [ECM, '10']
to this:
cmd = [ECM_PATH + ECM, '10']

Let me know how that works for you.
WraithX is offline   Reply With Quote
Old 2016-09-03, 03:29   #3
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22·2,341 Posts
Default

Alternative: now that you have yafu working, use the -y switch with aliqueit, and call yafu instead of all the ecm/msieve/ggnfs story. Yafu does everything for you
LaurV is offline   Reply With Quote
Old 2016-09-03, 03:59   #4
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

1110010110102 Posts
Default

Quote:
Originally Posted by WraithX View Post
B2scale was removed from GMP-ECM in svn 2557. That was between 6.4.4 (svn 2439) and 7.0 (svn 2900).

Are the errors affecting aliquiet so that it is returning wrong results or not finding results it should? This is out of my scope of knowledge, just curious.

What command line did you use to call ecm.py? I run it with the latest ecm and have no problems. The last error mentioned from your ecm.py crash was "OSError: [Errno 2] No such file or directory". I'm not sure if that means it couldn't find the input number file, or if it couldn't find your ecm executable. Now that I look at it, there's a chance it might not be finding the ecm executable. Could you try changing line 799 of ecm.py from this:
cmd = [ECM, '10']
to this:And, b
cmd = [ECM_PATH + ECM, '10']

Let me know how that works for you.
Aliqueit keeps running and it verifies the elf file on each of my starts, so it must not be coming up with bad results.


This is an example of a command being sent by Aliqueit to invoke ecm.py:
Code:
echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python /home/duser/Math/Aliqueit/ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
This is the output before adding the path to the cmd variable:
Code:
[duser@localhost ~]$ echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python /home/duser/Math/Aliqueit/ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
-> ___________________________________________________________________
-> | Running ecm.py, a Python driver for distributing GMP-ECM work   |
-> | on a single machine.  It is copyright, 2011-2016, David Cleaver |
-> | and is a conversion of factmsieve.py that is Copyright, 2010,   |
-> | Brian Gladman. Version 0.40 (Python 2.6 or later)  6th Aug 2016 |
-> |_________________________________________________________________|
 
-> Number(s) to factor:
Traceback (most recent call last):
  File "/home/duser/Math/Aliqueit/ecm.py", line 2428, in <module>
    parse_ecm_options(sys.argv, set_args = True, first = True)
  File "/home/duser/Math/Aliqueit/ecm.py", line 2283, in parse_ecm_options
    print('-> {0:s} ({1:d} digits)'.format(line, num_digits(line)))
  File "/home/duser/Math/Aliqueit/ecm.py", line 800, in num_digits
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
This is after the path addition:
Code:
[duser@localhost ~]$[duser@localhost tempecm]$ echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python /home/duser/Math/Aliqueit/ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
-> ___________________________________________________________________
-> | Running ecm.py, a Python driver for distributing GMP-ECM work   |
-> | on a single machine.  It is copyright, 2011-2016, David Cleaver |
-> | and is a conversion of factmsieve.py that is Copyright, 2010,   |
-> | Brian Gladman. Version 0.40 (Python 2.6 or later)  6th Aug 2016 |
-> |_________________________________________________________________|
 
-> Number(s) to factor:
-> 340024036518489011752270843402851083254562592396132843629577370817267414293777031 (81 digits)
->=============================================================================
-> Working on number: 340024036518489011...817267414293777031 (81 digits)
-> Currently working on: job8513.txt
-> Starting 2 instances of GMP-ECM...
-> ./ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t00.txt
-> ./ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t01.txt
Unknown option: -B2scale
 
Unknown option: -B2scale

-> *** Error: unexpected return value: 1
Here is the ecm_py.log contents:
Code:
Sat 2016/09/03 03:22:15 UTC ->#############################################################################
Sat 2016/09/03 03:22:15 UTC -> Running ecm.py, version 0.40 ( 6th Aug 2016) on computer localhost.localdomain
Sat 2016/09/03 03:22:15 UTC -> Command line: /usr/bin/python /home/duser/Math/Aliqueit/ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
Sat 2016/09/03 03:22:15 UTC ->=============================================================================
Sat 2016/09/03 03:22:15 UTC -> Working on number: 340024036518489011...817267414293777031 (81 digits)
Sat 2016/09/03 03:22:15 UTC -> Currently working on: job8513.txt
Sat 2016/09/03 03:22:15 UTC -> Starting 2 instances of GMP-ECM...
Sat 2016/09/03 03:22:15 UTC -> ./ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t00.txt
Sat 2016/09/03 03:22:15 UTC -> ./ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t01.txt
Sat 2016/09/03 03:22:16 UTC 
Sat 2016/09/03 03:22:16 UTC -> *** Error: unexpected return value: 1
Here is job8513.txt contents:
Code:
340024036518489011752270843402851083254562592396132843629577370817267414293777031
#  -one -c 214 -B2scale 1 50000
# 0 0.000 0.000
Both job8513_t00.txt and job8513_t01.txt files are empty.

I do see something in ecm.py that stood out to my untrained eye. Line 72 has the ECM_PATH entry:
Code:
ECM_PATH = '/usr/local/bin/'
But, line 172 has:
Code:
  ECM = './' + ECM
Wasn't line 172:
Code:
  ECM = ECM_PATH + ECM
previously?

Well, now I'm really confused! If I leave the './' in line 172, a print statement of 'print(ECM)' just previous to the 'cmd =' line shows:
Code:
./ecm
But, if I change the ./ to ECM_PATH, I get:
Code:
-> Could not find the program: /usr/local/bin//usr/local/bin/ecm
-> Did you set the path properly in this script?
-> It is currently set to:
-> ECM_PATH = /usr/local/bin/
I must quit for tonight, but I hope to spend some time on this tomorrow morning.

Thanks for all the help.
EdH is offline   Reply With Quote
Old 2016-09-03, 13:23   #5
WraithX
 
WraithX's Avatar
 
Mar 2006

1110110012 Posts
Default

Quote:
Originally Posted by EdH View Post
Aliqueit keeps running and it verifies the elf file on each of my starts, so it must not be coming up with bad results.


This is an example of a command being sent by Aliqueit to invoke ecm.py:
Code:
echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python /home/duser/Math/Aliqueit/ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
This is after the path addition:
Code:
[duser@localhost ~]$[duser@localhost tempecm]$ echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python /home/duser/Math/Aliqueit/ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
-> ___________________________________________________________________
-> | Running ecm.py, a Python driver for distributing GMP-ECM work   |
-> | on a single machine.  It is copyright, 2011-2016, David Cleaver |
-> | and is a conversion of factmsieve.py that is Copyright, 2010,   |
-> | Brian Gladman. Version 0.40 (Python 2.6 or later)  6th Aug 2016 |
-> |_________________________________________________________________|
 
-> Number(s) to factor:
-> 340024036518489011752270843402851083254562592396132843629577370817267414293777031 (81 digits)
->=============================================================================
-> Working on number: 340024036518489011...817267414293777031 (81 digits)
-> Currently working on: job8513.txt
-> Starting 2 instances of GMP-ECM...
-> ./ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t00.txt
-> ./ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t01.txt
Unknown option: -B2scale
 
Unknown option: -B2scale

-> *** Error: unexpected return value: 1
I must quit for tonight, but I hope to spend some time on this tomorrow morning.

Thanks for all the help.
Ok, it looks like your B2scale option is causing gmp-ecm to throw an error and not do any work. So, you'll want to leave that out of any future program calls.

And, since gmp-ecm throws an error with that (now) unknown option, ecm.py sees that and quits accordingly.

I've updated ecm.py so it won't (*shouldn't) crash with a pythonic error, it will gracefully quit (like above), with your particular setup. That will be version 0.41.
WraithX is offline   Reply With Quote
Old 2016-09-03, 14:30   #6
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

1110010110102 Posts
Default

Quote:
Originally Posted by WraithX View Post
Ok, it looks like your B2scale option is causing gmp-ecm to throw an error and not do any work. So, you'll want to leave that out of any future program calls.

And, since gmp-ecm throws an error with that (now) unknown option, ecm.py sees that and quits accordingly.

I've updated ecm.py so it won't (*shouldn't) crash with a pythonic error, it will gracefully quit (like above), with your particular setup. That will be version 0.41.
Thanks! Version 0.41 works fine without the B2scale option, but Aliqueit will have to be modified. It looks like a bit of work in the Aliqueit source. I might give it a try, but Mikael Klasson (or, maybe Dubslow) should probably do the "real' changes.

Edit: Update: Modifying Aliqueit wasn't that difficult after all - only four lines. All seems well now. Thanks again...

I wonder why no one else is seeing this trouble. Is no one else running Aliqueit now that all the sequences are so high?

Anyway, thanks again for your help and for all your efforts in the math programming world.

In case my runs are of interest:
Code:
[duser@localhost tempecm]$ echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python ecm.py -one -c 214 -B2scale 1 -out aliqueit_ecm_temp.log 50000
-> ___________________________________________________________________
-> | Running ecm.py, a Python driver for distributing GMP-ECM work   |
-> | on a single machine.  It is copyright, 2011-2016, David Cleaver |
-> | and is a conversion of factmsieve.py that is Copyright, 2010,   |
-> | Brian Gladman. Version 0.41 (Python 2.6 or later)  3rd Sep 2016 |
-> |_________________________________________________________________|
 
-> Number(s) to factor:
-> 340024036518489011752270843402851083254562592396132843629577370817267414293777031 (81 digits)
->=============================================================================
-> Working on number: 340024036518489011...817267414293777031 (81 digits)
-> Found previous job file job8513.txt, will resume work...
-> *** Already completed 0 curves on this number...
-> *** Will run 214 more curves.
-> Currently working on: job8513.txt
-> Starting 2 instances of GMP-ECM...
-> ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t00.txt
-> ecm -one -B2scale 1 -c 107 50000 < job8513.txt > job8513_t01.txt
Unknown option: -B2scale
 
Unknown option: -B2scale

-> *** Error: unexpected return value: 1

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

[duser@localhost tempecm]$ echo 340024036518489011752270843402851083254562592396132843629577370817267414293777031 | python ecm.py -one -c 214 -out aliqueit_ecm_temp.log 50000
-> ___________________________________________________________________
-> | Running ecm.py, a Python driver for distributing GMP-ECM work   |
-> | on a single machine.  It is copyright, 2011-2016, David Cleaver |
-> | and is a conversion of factmsieve.py that is Copyright, 2010,   |
-> | Brian Gladman. Version 0.41 (Python 2.6 or later)  3rd Sep 2016 |
-> |_________________________________________________________________|
 
-> Number(s) to factor:
-> 340024036518489011752270843402851083254562592396132843629577370817267414293777031 (81 digits)
->=============================================================================
-> Working on number: 340024036518489011...817267414293777031 (81 digits)
-> Found previous job file job8513.txt, will resume work...
-> *** Already completed 0 curves on this number...
-> *** Will run 214 more curves.
-> Currently working on: job8513.txt
-> Starting 2 instances of GMP-ECM...
-> ecm -one -c 107 50000 < job8513.txt > job8513_t00.txt
-> ecm -one -c 107 50000 < job8513.txt > job8513_t01.txt
 
GMP-ECM 7.0.3 [configured with GMP 6.1.1, --enable-asm-redc] [ECM]
Using B1=50000, B2=12746592, polynomial x^2, 2 threads
____________________________________________________________________________
 Curves Complete |   Average seconds/curve   |    Runtime    |      ETA
-----------------|---------------------------|---------------|--------------
     8 of    214 | Stg1 0.064s | Stg2 0.064s |   0d 00:00:01 |   0d 00:00:13

Run 8 out of 214:
Using B1=50000, B2=12746592, polynomial x^2, sigma=1:3736958725
Step 1 took 64ms
Step 2 took 62ms
********** Factor found in step 2: 11987094128405353
Found prime factor of 17 digits: 11987094128405353
Prime cofactor 28365843537738409254670196245933971629498871921613777403678652527 has 65 digits

Last fiddled with by EdH on 2016-09-03 at 15:03 Reason: Update/accuracy
EdH is offline   Reply With Quote
Old 2016-09-06, 22:52   #7
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

722110 Posts
Default

I use aliqueit -y. I know LaurV does too. The other suspects to ask include unconnected and fivemack.
Dubslow is offline   Reply With Quote
Old 2016-09-07, 02:16   #8
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

E5A16 Posts
Default

Quote:
Originally Posted by Dubslow View Post
I use aliqueit -y. I know LaurV does too. The other suspects to ask include unconnected and fivemack.
Aliqueit is running fine, now. But I had to remove the B2scale as mentioned elsewhere, modify factmsieve.py a bit and WraithX posted ecm.py 0.41. I suppose the only thing I would ask now is that you ask Mikael Klasson for permission to recompile aliqueit without the B2scale options, since they were dropped from GMP-ECM some time ago. If my changes are OK, I can send you (or, Mikael Klasson) my modified source, if it would make things easier. It's probably small enough to post here.

Thanks for your help.
EdH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Aliqueit.exe discussion bsquared Aliquot Sequences 591 2020-09-09 16:51
Resuming aliqueit johnadam74 Aliquot Sequences 4 2016-03-28 12:32
Setting up aliqueit science_man_88 Aliquot Sequences 185 2011-11-08 12:18
Throwing the hammer davieddy Puzzles 6 2011-09-06 06:40
Throwing a stick davieddy Puzzles 6 2007-01-19 17:18

All times are UTC. The time now is 10:29.

Sun Apr 11 10:29:50 UTC 2021 up 3 days, 5:10, 1 user, load averages: 2.24, 2.29, 2.18

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.