mersenneforum.org  

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

Reply
 
Thread Tools
Old 2021-02-06, 13:36   #1
jocelynl1204
 
Feb 2018

23 Posts
Default 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
jocelynl1204 is offline   Reply With Quote
Old 2021-02-07, 00:24   #2
jocelynl1204
 
Feb 2018

108 Posts
Default 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.
jocelynl1204 is offline   Reply With Quote
Old 2021-02-11, 02:59   #3
jocelynl1204
 
Feb 2018

23 Posts
Default 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 ?
jocelynl1204 is offline   Reply With Quote
Old 2021-02-11, 04:19   #4
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

33×347 Posts
Default

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.
LaurV is offline   Reply With Quote
Old 2021-02-28, 14:30   #5
jocelynl1204
 
Feb 2018

23 Posts
Default

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 .....
jocelynl1204 is offline   Reply With Quote
Old 2021-02-28, 16:12   #6
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009

77F16 Posts
Default

Quote:
Originally Posted by jocelynl1204 View Post
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?
storm5510 is offline   Reply With Quote
Old 2021-02-28, 16:37   #7
chris2be8
 
chris2be8's Avatar
 
Sep 2009

22·3·132 Posts
Default

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
chris2be8 is offline   Reply With Quote
Old 2021-03-01, 11:58   #8
jocelynl1204
 
Feb 2018

23 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
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.
jocelynl1204 is offline   Reply With Quote
Old 2021-03-02, 00:36   #9
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009

35778 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
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.
storm5510 is offline   Reply With Quote
Old 2021-03-02, 07:15   #10
jocelynl1204
 
Feb 2018

810 Posts
Default

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
jocelynl1204 is offline   Reply With Quote
Old 2021-03-02, 09:12   #11
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

23E16 Posts
Default

Mods: Please put that in a code block.
Happy5214 is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
factorial puzzle (requires maths) graeme Puzzles 7 2003-08-19 20:40
Perfect shuffling puzzle (requires programming) NickGlover Puzzles 18 2003-07-26 01:10

All times are UTC. The time now is 00:31.

Sat Apr 17 00:31:07 UTC 2021 up 8 days, 19:11, 0 users, load averages: 2.02, 1.65, 1.53

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.