mersenneforum.org > Data GMP-Ecm as Pm1 requires very little RAM
 Register FAQ Search Today's Posts Mark Forums Read

 2021-02-06, 13:36 #1 jocelynl1204   Feb 2018 23 Posts GMP-Ecm as Pm1 requires very little RAM A while back I started working on a way to use The faster Prime95 or mprime P-1 first stage and proceed to the 2nd stage using GMP-Ecm running as P-1. Which is at least 20 times faster. What is most interesting is that you can split the work using B2min-B2max. It doesn't require to save a B2 files. If you know the work as been done to a certain point. You can start from there. GP2 was able to make it work as the B1 was saved backward, as shown in this link Here is an exemple of one run. B1 is done on Prime95 using a faster PC using Windows10. The second stage is done on a Linux 32bits with 1G Ram. And I run two instances. B1 is at 10 billion and took over 2 hours. B2 is done in steps of 300 billion and takes about 5 minutes. The factor was found during the first step. GMP-ECM 7.0.4 [configured with GMP 6.1.2] [P-1] Tuned for x86/params.h Running on jocelyn-Dell-DV051 Resuming P-1 residue saved by jocelyn@jocelyn-Dell-DV051 with GMP-ECM 7.0.4 on Fri Feb 5 22:54:18 2021 Input number is ((2^1571-1))/1250961804686347854556649368571289367 (437 digits) Using special division for factor of 2^1571-1 Using lmax = 524288 with NTT which takes about 294MB of memory Using B1=10000000000-10000000000, B2=19999998798540-20364610926900, polynomial x^1 P = 2251799814330893, l = 241920, s_1 = 1, k = s_2 = 47833428732674048, m_1 = 15488384 Can't compute success probabilities for B1 <> B2min Step 1 took 0ms Computing F from factored S_1 took 56019ms Computing h took 11125ms Computing DCT-I of h took 7321ms Multi-point evaluation 1 of 1: Computing g_i took 44471ms Computing g*h took 17020ms Computing gcd of coefficients and N took 11921ms Step 2 took 147985ms Peak memory usage: 306MB Joss
 2021-02-07, 00:24 #2 jocelynl1204   Feb 2018 23 Posts With more Ram and a better machine compared to a better machine it is no match. Windows10 64bits 16Gb Ram cpu I5-3470 steps of 1,000,000,000,000,000 This is done under 17 minutes and would have taken 277 hours on the other pc. GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [P-1] Resuming P-1 residue saved by jocelyn@jocelyn-Dell-DV051 with GMP-ECM 7.0.4 on Fri Feb 5 22:54:18 2021 Input number is ((2^1571-1))/1250961804686347854556649368571289367 (437 digits) Using special division for factor of 2^1571-1 Using lmax = 16777216 with NTT which takes about 9792MB of memory Using B1=10000000000-10000000000, B2=999999913515224-2206728710203396, polynomial x^1 P = 64579515, l = 16777216, s_1 = 7434240, k = s_2 = 3, m_1 = 7742389 Can't compute success probabilities for B1 <> B2min Step 1 took 0ms Computing F from factored S_1 took 199391ms Computing h took 24828ms Computing DCT-I of h took 52891ms Multi-point evaluation 1 of 3: Computing g_i took 97109ms Computing g*h took 106985ms Computing gcd of coefficients and N took 37187ms Multi-point evaluation 2 of 3: Computing g_i took 97891ms Computing g*h took 107078ms Computing gcd of coefficients and N took 37312ms Multi-point evaluation 3 of 3: Computing g_i took 97454ms Computing g*h took 106343ms Computing gcd of coefficients and N took 36453ms Step 2 took 1002672ms Peak memory usage: 9684MB Now we just have to wait and see if it leads to a factor. It always depends on B1 being high enough.
 2021-02-11, 02:59 #3 jocelynl1204   Feb 2018 23 Posts Completed P-1 testing M1571 P-1 of M1571 has found no new factors other than the ones previously known. B1=1e+11 done on mprime B2=1e+17 done on GMP-Ecm using p-1 is there a way to report this on Gimps or mersenne.ca ?
 2021-02-11, 04:19 #4 LaurV Romulan Interpreter     Jun 2011 Thailand 33×347 Posts Send it to GIMPS, or PM the results to George, once registered with PrimeNet, then mersenne.ca will sync the result from there. OTOH, for how much ECM that exponent had, the P-1 is a bit futile, unless you really raise those bonds few more orders of magnitude.
 2021-02-28, 14:30 #5 jocelynl1204   Feb 2018 810 Posts To add on to my research. When resuming from Prime95, you cannot do -resume -save. Otherwise you won't find any subsequent factors. What you can do is search in steps. [b1] 100000 [b2] 1000000-2000000 Onece you find a factor and wish to continue with that same B1. You can manually add it to the input file. And as you did the first time you need to change the checksum of the input file that looks like that. METHOD=P-1; B1=xxxxx; N=(2^yyyy-1); X=0x...(the inputed X0 from Prime95).........; CHECKSUM=.............; PROGRAM+GMP-ECM .....
2021-02-28, 16:12   #6
storm5510
Random Account

Aug 2009

19·101 Posts

Quote:
 Originally Posted by jocelynl1204 GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [P-1] Resuming P-1 residue saved by jocelyn@jocelyn-Dell-DV051 with GMP-ECM 7.0.4 on Fri Feb 5 22:54:18 2021 Input number is ((2^1571-1))/1250961804686347854556649368571289367 (437 digits) Using special division for factor of 2^1571-1 Using lmax = 16777216 with NTT which takes about 9792MB of memory Using B1=10000000000-10000000000, B2=999999913515224-2206728710203396, polynomial x^1 P = 64579515, l = 16777216, s_1 = 7434240, k = s_2 = 3, m_1 = 7742389 Can't compute success probabilities for B1 <> B2min Step 1 took 0ms Computing F from factored S_1 took 199391ms Computing h took 24828ms Computing DCT-I of h took 52891ms Multi-point evaluation 1 of 3: Computing g_i took 97109ms Computing g*h took 106985ms Computing gcd of coefficients and N took 37187ms Multi-point evaluation 2 of 3: Computing g_i took 97891ms Computing g*h took 107078ms Computing gcd of coefficients and N took 37312ms Multi-point evaluation 3 of 3: Computing g_i took 97454ms Computing g*h took 106343ms Computing gcd of coefficients and N took 36453ms Step 2 took 1002672ms Peak memory usage: 9684MB
The above in red, I have seen this done before. If I understand it correctly, no testing below B1 is done. Values above B1 to B2 would be tested. Would this be an accurate statement?

 2021-02-28, 16:37 #7 chris2be8     Sep 2009 2,027 Posts Checking for factors smooth below B1 has already been done by prime95. ECM is now checking for factors P where P-1 has only one factor larger than B1 and less than B2 (the rest being less than B1). Note the preceding line says it's using about 9792MB to do it. Which I would not call "very little RAM". Chris
2021-03-01, 11:58   #8
jocelynl1204

Feb 2018

23 Posts

Quote:
 Originally Posted by chris2be8 Checking for factors smooth below B1 has already been done by prime95. ECM is now checking for factors P where P-1 has only one factor larger than B1 and less than B2 (the rest being less than B1). Note the preceding line says it's using about 9792MB to do it. Which I would not call "very little RAM". Chris
You can use maxmem to refrain the use of excessive ram. Ecm is going to do it in steps.

2021-03-02, 00:36   #9
storm5510
Random Account

Aug 2009

19·101 Posts

Quote:
 Originally Posted by chris2be8 Checking for factors smooth below B1 has already been done by prime95. ECM is now checking for factors P where P-1 has only one factor larger than B1 and less than B2 (the rest being less than B1). Note the preceding line says it's using about 9792MB to do it. Which I would not call "very little RAM". Chris
I am sorry. Either I am not seeing well, or there is no ECM reference in the output sample. I have used GMP-ECM some but not for P-1.

Quote:
 Originally Posted by jocelynl1204 You can use maxmem to refrain the use of excessive ram. Ecm is going to do it in steps.
I have used this before. I never set it above one-half of my RAM capacity. Windows 10 starts acting a bit odd if I do.

 2021-03-02, 07:15 #10 jocelynl1204   Feb 2018 23 Posts The input file m1571.txt looks like that: Code: METHOD=P-1; B1=200000000000; N=((2^1571-1)/1250961804686347854556649368571289367); X=0x0067F0913DBC6F1FAF640DAF4F4EA4B66858D1B6753E03ED960F83953C186BB0C5C0F519984706CCD432D54F9925B9A0B9F09D7541FFB62267F75E1A50D1F4C9F8724C79BC6823F041018D3E0561D51AE34062D91AFECA001E23436CA14248FA748C0D070D35773EF5A1248524B76B92A3164A43B6FBF617361A7AFB421254321AE855AB7E26EC4BBC34839F5C53C28CCFEE1697734A5F2BADF8C5FAB633352A73EDC1531B8EE229F8DBE053BB38CB8113B12AE16097213261BC749901C168E362A36A881FE; CHECKSUM=3043118422; PROGRAM=GMP-ECM 7.0.4; Y=0x0; X0=0x0; Y0=0x0; WHO=me@mypc; TIME=Fri Feb 5 22:54:18 2021; The command line looks like that: ecm -pm1 -v -maxmem 10000 -resume m1571.txt 200000000000 2000000000000000 -maxmem is in Mb if you know the work has been done to a certain level from that B1 to say B2 1e+20 you can have a command line that looks like that: ecm -pm1 -v -maxmem 10000 -resume m1571.txt 200000000000 100000000000000000000-100001000000000000000 of course ecm only goes to a certain level of B2 but when you reach it I would say we have done enough for that B1. Last fiddled with by axn on 2021-03-02 at 09:48
 2021-03-02, 09:12 #11 Happy5214     "Alexander" Nov 2008 The Alamo City 22×11×13 Posts Mods: Please put that in a code block.

 Similar Threads Thread Thread Starter Forum Replies Last Post graeme Puzzles 7 2003-08-19 20:40 NickGlover Puzzles 18 2003-07-26 01:10

All times are UTC. The time now is 05:34.

Thu Apr 15 05:34:31 UTC 2021 up 7 days, 15 mins, 0 users, load averages: 1.28, 1.75, 1.92