mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)

 ET_ 2018-05-14 08:00

P-1 memory

I am testing an Imac with 32 GB of RAM, a 4-cores IvyBridge and Windows 10 installed.

I gave 8GB of RAM to mprime to run P-1 work on M87,656,xxx: mprime takes 8GB of RAM and starts stage 2 with E=6 (I suppose it's a selection of Brent-Sujama extensions). Stage 2 runs in one single pass of 192 relative primes.

Giving more RAM (say 12/24GB) to P-1 would end up in:
a) A quicker stage 2?
b) A slower stage 2 with a better chance to find factors?

I suppose b) is the correct answer, but to be sure I'm asking here.

I also assume the same for ECM (especially for fat Fermat numbers).

 kriesel 2018-05-14 12:11

1 Attachment(s)
[QUOTE=ET_;487540]I am testing an Imac with 32 GB of RAM, a 4-cores IvyBridge and Windows 10 installed.

I gave 8GB of RAM to mprime to run P-1 work on M87,656,xxx: mprime takes 8GB of RAM and starts stage 2 with E=6 (I suppose it's a selection of Brent-Sujama extensions). Stage 2 runs in one single pass of 192 relative primes.

Giving more RAM (say 12/24GB) to P-1 would end up in:
a) A quicker stage 2?
b) A slower stage 2 with a better chance to find factors?

I suppose b) is the correct answer, but to be sure I'm asking here.

I also assume the same for ECM (especially for fat Fermat numbers).[/QUOTE]
My guess is generally a). Lots of memory allows stage 2 to be completed in fewer passes by increasing number of relative primes per pass. I'm used to seeing CUDAPm1 run with a total of 480 or 960 relative primes. There, diminishing returns set in between 4GB and 8GB for similar exponents. Not sure why.

But if you're already running stage 2 in a single pass with 192 relative primes, as stated, it would seem the answer is c) no difference. Not to worry, the additional memory will be useful at higher exponents. Or you could run multiple P-1 instances.

Be wary of changing memory allowance midstream. That could cause d) the total run time is longer because it prompts the computation to start over. From the prime95 whatsnew.txt file: "P-1 will restart any time the memory settings change. This is done so that the optimal P-1 bounds can be computed with the new memory settings."

 LaurV 2018-05-14 12:36

[QUOTE=kriesel;487546]My guess is generally a). Lots of memory allows stage 2 to be completed in fewer passes by increasing number of relative primes per pass.[/QUOTE]
Technically, yes. Practically, no. P95/mprime will spend about the same time on your assignment, unless you play with B2, but more memory will increase the chance to find a factor in stage 2. That is because B2 is selected according with the available memory, and also Brent-Suyama extension will run "deeper" in stage 2 if you have more memory. For the same B2, yes, it is like kriesel says, but you will notice that increasing the memory before starting the assignment will result in P95 selecting a larger B2, for example.

If your stage 2 already started, decreasing the memory will restart from scratch, and increasing the memory has no effect for time, even if you quit and restart. The assignment runs with the settings from the checkpoint file. However, your chances to find a factor with Br-Su increases a bit.

 ET_ 2018-05-14 13:25

Not sure I completely understand you...

First, you say

[QUOTE=LaurV;487547]For the same B2, yes, it is like kriesel says (option a): same timing and B2 options incresing the available memory.
[/QUOTE]

[QUOTE=LaurV;487547] but you will notice that increasing the memory before starting the assignment will result in P95 selecting a larger B2, for example.
[/QUOTE]

That is not clear: would B2 automatically increase if I add more memory to mprime, or I must manually increase B2 to better use the new RAM?

Sorry... :redface:

 ET_ 2018-05-14 13:55

Tested myself.

Stop Prime95
Increase RAM from 8GB to 16GB
Cancel the old status files to have a clean start
Restart Prime95

B2 went from 13,845,000 to 14,022,500

 All times are UTC. The time now is 21:56.