mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Prime Gap Searches (https://www.mersenneforum.org/forumdisplay.php?f=131)
-   -   4e18-5e18 (https://www.mersenneforum.org/showthread.php?t=22187)

danaj 2017-06-05 02:56

Robert and I have both discussed this with Dr. Nicely, but I haven't heard back. On the other hand, not long after it was brought up, the first result from Leif since Dec 2015 is posted, so perhaps he's going through past results. I don't know if anyone has tried contacting Leif directly.

Antonio 2017-06-05 11:04

Code update
 
3 Attachment(s)
I am pleased to present (with the kind permission of Dana Jacobsen) a new release of the gap code.
Version 0.05.d code includes:
1. The bug fix, provided by Robert Gerbicz
2. A major speed boost using new code for Fermat and Euler-Plumb PRP tests using Montgomery math, provided by Dana Jacobsen

The new code uses the Euler-Plumb PRP test by default, as it has been shown to be slightly faster than the Fermat test during regression testing, and with correct tuning can provide > 25% speed up when compared with version 0.03.04.
(Euler-Plumb pseudoprimes are a subset of Fermat pseudoprimes, of the 118,968,378 Fermat pseudoprimes below 2^64 only 48,236,911 are Euler-Plumb pseudoprimes).

The value of delta will need to be tuned to a lower value to get best performance (it was while I was doing this that I found the bug in the original code), for my i5-3570k I needed to change from:
gap3_4 -n1 %1 -n2 %2 -gap 1250 -delta 200 -sb 24 -bs 16 -mem 12 -t 4
to:
gap5_d -n1 %1 -n2 %2 -gap 1250 -delta 155 -sb 24 -bs 16 -mem 12 -t 4

My throughput increased from around 20.9e9 n/s to around 26.3e9 n/s.

The attachments consist of :
1. gap5_d_code.zip - the source code
2. gap5_d_exe.zip - the Windows executables for Sandybridge, Ivybridge and Haswell (or later) processors.
3. cygwin1.zip - the dll required by the Windows executables, for anyone who has not already downloaded it.

ET_ 2017-06-05 14:42

[QUOTE=Antonio;460557]I am pleased to present (with the kind permission of Dana Jacobsen) a new release of the gap code.
Version 0.05.d code includes:
1. The bug fix, provided by Robert Gerbicz
2. A major speed boost using new code for Fermat and Euler-Plumb PRP tests using Montgomery math, provided by Dana Jacobsen

The new code uses the Euler-Plumb PRP test by default, as it has been shown to be slightly faster than the Fermat test during regression testing, and with correct tuning can provide > 25% speed up when compared with version 0.03.04.
(Euler-Plumb pseudoprimes are a subset of Fermat pseudoprimes, of the 118,968,378 Fermat pseudoprimes below 2^64 only 48,236,911 are Euler-Plumb pseudoprimes).

The value of delta will need to be tuned to a lower value to get best performance (it was while I was doing this that I found the bug in the original code), for my i5-3570k I needed to change from:
gap3_4 -n1 %1 -n2 %2 -gap 1250 -delta 200 -sb 24 -bs 16 -mem 12 -t 4
to:
gap5_d -n1 %1 -n2 %2 -gap 1250 -delta 155 -sb 24 -bs 16 -mem 12 -t 4

My throughput increased from around 20.9e9 n/s to around 26.3e9 n/s.

The attachments consist of :
1. gap5_d_code.zip - the source code
2. gap5_d_exe.zip - the Windows executables for Sandybridge, Ivybridge and Haswell (or later) processors.
3. cygwin1.zip - the dll required by the Windows executables, for anyone who has not already downloaded it.[/QUOTE]

I am running 1-2 threads with 2.1 GB.
Am I safe with this worktodo environment?

[code]
n1=4012000000000000000
n2=4013000000000000000
n=4012806111674367000
gap=1248
delta=188
sb=24
bs=13
[/code]

Antonio 2017-06-05 16:48

[QUOTE=ET_;460560]I am running 1-2 threads with 2.1 GB.
Am I safe with this worktodo environment?

[code]
n1=4012000000000000000
n2=4013000000000000000
n=4012806111674367000
gap=1248
delta=188
sb=24
bs=13
[/code][/QUOTE]That should be perfectly safe, it's just that for optimum throughput you need to reduce your delta, I would start with delta=140 and work from there.
e.g. stop the run and then use: gap5_d -gap 1248 -delta 140 -sb 24 -bs 13 -t 2 -mem 2.1
note:- there is no need to specify n1 and n2 when restarting from a worktodo file.

Antonio 2017-06-05 17:30

4230-4238e15 complete, no new records
Reserving 4240-4250e15

[CODE]4230-4231e15 104 kgaps, largest 1192 @ 4230717626818391281
4231-4232e15 109 kgaps, largest 1200 @ 4231004501160759401
4232-4233e15 86 kgaps, largest 1218 @ 4232569211993116991
4233-4234e15 112 kgaps, largest 1260 @ 4233986888851096361
4234-4235e15 103 kgaps, largest 1152 @ 4234273495969655681
4235-4236e15 107 kgaps, largest 1176 @ 4235854666415254901
4236-4237e15 111 kgaps, largest 1256 @ 4236530985657770621
4237-4238e15 130 kgaps, largest 1330 @ 4237481575697381743[/CODE]

danaj 2017-06-05 17:39

Almost all the benefit is from using tuned Montgomery math (that Wojciech Izykowski worked on and I helped a little). That makes the Fermat test a few times faster. Switching to Colin Plumb's optimization of a base-2 Euler test is a little extra on top.

Antonio 2017-06-05 17:55

[QUOTE=Antonio;460562]That should be perfectly safe, it's just that for optimum throughput you need to reduce your delta, I would start with delta=140 and work from there.
e.g. stop the run and then use: gap5_d -gap 1248 -delta 140 -sb 24 -bs 13 -t 2 -mem 2.1
note:- there is no need to specify n1 and n2 when restarting from a worktodo file.[/QUOTE]
Too late to edit but:
When restarting from a worktodo file, apart from -t (threads) and -mem (memory) you only need to specify the things you want to change, so in this case using gap5_d -delta 140 -t 2 -mem 2.1 would be sufficient.

pinhodecarlos 2017-06-05 18:57

New binary speed increment from around 12e9 n/s to around 15.50e9 n/s. Thank you all.

Under windows I use the following batch file.

[CODE]start /low /min gap5_d_ivybridge.exe -n1 4085e15 -n2 4100e15 -gap 1250 -delta 155 -sb 24 -bs 16 -mem 12 -t 3[/CODE]

ET_ 2017-06-05 19:07

Great optimization for speed in my case, thank you!

pinhodecarlos 2017-06-05 21:01

1 Attachment(s)
4085-4090 complete.
4090-4100 in progress.

ATH 2017-06-05 21:28

[QUOTE=Antonio;460557]The new code uses the Euler-Plumb PRP test by default, as it has been shown to be slightly faster than the Fermat test during regression testing, and with correct tuning can provide > 25% speed up when compared with version 0.03.04.
(Euler-Plumb pseudoprimes are a subset of Fermat pseudoprimes, of the 118,968,378 Fermat pseudoprimes below 2^64 only 48,236,911 are Euler-Plumb pseudoprimes).[/QUOTE]

There are only 31,894,014 strong 2-prps under 2^64. Is that too slow to give any speed benefits?

Where can I find any information on the Euler-Plumb/Plump test?


All times are UTC. The time now is 15:30.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.