mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Five or Bust - The Dual Sierpinski Problem

Reply
 
Thread Tools
Old 2009-09-28, 19:43   #1
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
DEUTSCHLAND !

3·89 Posts
Default Using PRIMO on a multicore system

German
English
Line by line , a rough translation
Anleitung zur parallelen Nutzung von PRIMO auf einem Multicore-System
A guide for using PRIMO on a multicore system by Norman Luhn

Anmerkung:
PRIMO kann schon ab 8000 Stellen überfordert sein !
You can have trouble with PRIMO from 8000 digits!


Ab 10.000 Stellen hat PRIMO nur noch sehr wenig Spielraum, ein Zertifikat überhaupt anlaufen zu lassen.
More than 10.000 digits, PRIMO have ( extremly ) nothing much scope to create a certificate.

Bei der neusten Version 3.0.7 ,kann man die Arbeitstiefe selber bestimmen.
In the newest version 3.0.7, you can increase the efficienty, how PRIMO have to do work.

Füge in der primo.ini hinzu:
Add in primo.ini :


[Setup+]
MSC=20..26 : 20:fast PRIMO use primes up to 2^20 , 26 :slow PRIMO use primes up to 2^26


Verfahren: Procedure:
Es gibt 5 Tabellen RUN1,2,3,4,5 und ein RUN6.
There are 5 RUNs and a RUN 6


Öffnet man die tmp-Datei, gibt es 3 wichtige Parameter.
When you open the tmp-file , there are 3 important parameters.

1.pe=1,2,3 : 1 – Phase 1 , 2- Phase 2 , 3- *.tmp will rewrite in *.out

2.ar=1,2,3,4,5,6 : here you can decide a RUN [1..6] of actual TEST [1..****]
3.ap= ??? : here you can decide a index-start of a RUN
Es ergeben sich Indexzahlen für RUN 1,2,3,4,5,6 wiefolgt:
The maximum of index numbers for a RUN are:

RUN 1: ap= 1..97500 about
RUN 2: ap= 1..153000 about
RUN 3: ap= 1..212000 about
RUN 4: ap= 1..272000 about
RUN 5: ap= 1..139500 about
RUN 6: ap= 1..2^25-1 -> stand for „delta = - ******“

Je nach Coreanzahl kann man PRIMO mehrmals starten, ohne Zeitverlust.
If you have a multicore-CPU ,you can start more than one TASK , without you lost time.


2 Möglichkeiten gibt es:
There are 2 possibilities :

Entweder man ändert ar bei einem weiteren Task oder
ar bleibt gleich und man staffelt ap geeignet um schneller ein RUN zu beenden.
First: you change ar= for every RUN , example: core 1 -> ar=1,ap=1 , core 2 -> ar=2 ,ap=1 and so on.

Second: you set for every task the same ar=[1..6] and stagger ap: example core 1-> ar=3, ap=1 , core 2 -> ar=3 , ap= 10000, and so on.
Wie geht man vor ?
What have to do ?

-
Erstelle je nach Coreanzahl gleichartige PRIMO Verzeichnisse Beispiel: C:\P1 , C:\P2,..
-Create for each core a similar directory, like C:\P1, C:\P2, C:\P3….

-kopiere alle Programmdateien in jedes Verzeichnis
-copy all PRIMO files in these directories


-Erstelle eine *.in Datei und initialisiere diese
-create a *.in-file with your number you will test and initialize it.

-Bei Phase 1 RUN 1 , abbrechen und die *.tmp in jedes Verzeichnis kopieren
-break up the process on TEST 1 RUN1 at Phase 1 and copy the *.tmp in each directory.


-jetzt kann schon editiert werden, ar=1 und ar=2 und ar=3,... und mehrere Aufgaben
rechnen an verschiedenen Stellen
- now you can edit all the tmp-files in each directory : example ar=1 , ar=2 and ar=3, ....


-Jeder ! Schritt muss zu Begin dokumentiert werden, ich mache es mit „Excel“, damit im Falle eines erfolglosen TESTs ein manueller Backtrack leichter fällt.
-Each stepp you have to do record ( like Ecxel ) , iff the actual way a failure. A
manual backtrack is easier with this methode.

-
ist ein TEST abgeschlossen , wird abgebrochen und alle ap’s werden für ein späteres (falls Fehlschlag) Zurücksetzen dokumentiert
-start PRIMO the next TEST[+1] , abort all tasks and record of all tasks the ap and ar
in your Exceltable.

-
die neue tmp-Datei wird geeignet gespeichert , in einem anderen Verzeichnis...Beispiel als *.Test2_32981 „(bits)“ und die anderen tmp’s in den übrigen Verzeichnissen mit der neuen überschrieben.
-save the NEW-tmp-file in another directory (example: Copy C:\P2\*.tmp to C:\BACK\*.TEST3_32981), overwrite all tmp-files with the newest tmp-file.

-
auch die .s?? Datei sollte bei jedem Verzeichnis, falls alle an anderen RUNs arbeiten, separat gespeichert werden. Diese enthalten Informationen, über die geeinete Index-Auswahl bei einem RUN in einem TEST. Beispiel: kopiere *.s3 nach \*.s3_22981_r2
- also you should saved all the .s??? files , in this files are useful informations for the

selection of the indexnumbers of a TEST .
If you lost, PRIMO need more time to finished a RUN ,Example: “Copy C:\P2\*.s80 to C:\RUNS\*.80_TEST5_2_28912 “-> PRIMO on PHASE 1 TEST 5 at RUN2 , 28912/29050 bit
Für ein gleichzeitiges Berechnen der Phase 2 während er Phase 1 :
Calculate Phase 2 during Phase 1:
Erstelle auch hier ein neues Verzeichnis, Beispiel C:\Phase2_1\
Create another directory , like C:\Phase2_1
und kopiere alle PRIMO - Dateien hinein. Kopiere die aktuelle
tmp-Datei rein und editiere diese. Setze pe=2 !
and copy all PRIMO program files in this. Copy the newest tmp-file
in this and edit the tmp-file. Set pe=2 !
Je nach Stand der fertigen TESTs in Phase 2 ,lösche bei jedem
neuen tmp-file das Minus „-„ vor jedem „Type=“.
Dependent of the ready TESTs in Phase 2, kill the minus of every “Type=-“.

So springt PRIMO an die neue Stelle, wo noch kein fertiger TEST in Phase 2 vorliegt.
PRIMO jump to the position , you have not finished a TEST in Phase 2.
I mean: kill “-“ from [1] Type=-4 to [99] Type=-4 , PRIMO start Phase 2 at TEST 100

Die fertigen TESTs in Phase 2 werden wieder separat in ein neues
„vorzeitiges Zertifikat“ angehängt. Lösche bei jedem fertigen
TEST bei Phase 2 die Zeilen sf=, pm= ( ist ein Fehler bei PRIMO )
Copy the ready TESTs in Phase 2 in a separate „preliminary certificate“

Delete lines sf=, pm= in each TESTs of Phase 2

Zum Schluss , muss über das Zertifikat die Signierung (Verification)
komplett durchlaufen.


To the end , make a sigification.
That's all.

If you have questions , ask me !

Note, the expected running time is d^3,75. Twice faster per core.

Last fiddled with by Cybertronic on 2009-09-28 at 20:10
Cybertronic is offline   Reply With Quote
Old 2009-09-28, 19:55   #2
philmoore
 
philmoore's Avatar
 
"Phil"
Sep 2002
Tracktown, U.S.A.

22×32×31 Posts
Default

Thanks, Norman, your translation is clearer than the piece I worked on. If anyone has comments, questions, or clarifications, please post them in this thread!
philmoore is offline   Reply With Quote
Old 2009-10-06, 20:30   #3
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
DEUTSCHLAND !

3·89 Posts
Default running time table

Additions:

Here is a table of running time of a certification by PRIMO with my methode , based on the Phenom II X4 3.4 GHz ( I have only 2.2 GHz )

When you use my methode , you get:

5000 digits : 5 days
6000 digits : 9 days
7000 digits : 17 days
8000 digits : 35 days
9000 digits : 52 days
10000 digits : 74 days
11000 digits : 102 days
12000 digits : 150 days
13000 digits : 200 days
14000 digits : 270 days

Last fiddled with by Cybertronic on 2009-10-06 at 20:46
Cybertronic is offline   Reply With Quote
Old 2009-10-06, 21:11   #4
smh
 
smh's Avatar
 
"Sander"
Oct 2002
52.345322,5.52471

29×41 Posts
Default

To make it more readable:
Quote:
Originally Posted by Cybertronic View Post

A guide for using PRIMO on a multicore system by Norman Luhn
You can have trouble with PRIMO from 8000 digits!

More than 10.000 digits, PRIMO have ( extremly ) nothing much scope to create a certificate.
In the newest version 3.0.7, you can increase the efficienty, how PRIMO have to do work.

Add in primo.ini :

[Setup+]
MSC=20..26 : 20:fast PRIMO use primes up to 2^20 , 26 :slow PRIMO use primes up to 2^26

Procedure:
There are 5 RUNs and a RUN 6

When you open the tmp-file , there are 3 important parameters.

1.pe=1,2,3 : 1 – Phase 1 , 2- Phase 2 , 3- *.tmp will rewrite in *.out
2.ar=1,2,3,4,5,6 : here you can decide a RUN [1..6] of actual TEST [1..****]
3.ap= ??? : here you can decide a index-start of a RUN
The maximum of index numbers for a RUN are:
RUN 1: ap= 1..97500 about
RUN 2: ap= 1..153000 about
RUN 3: ap= 1..212000 about
RUN 4: ap= 1..272000 about
RUN 5: ap= 1..139500 about
RUN 6: ap= 1..2^25-1 -> stand for „delta = - ******“

If you have a multicore-CPU ,you can start more than one TASK , without you lost time.


There are 2 possibilities :

First: you change ar= for every RUN , example: core 1 -> ar=1,ap=1 , core 2 -> ar=2 ,ap=1 and so on.
Second: you set for every task the same ar=[1..6] and stagger ap: example core 1-> ar=3, ap=1 , core 2 -> ar=3 , ap= 10000, and so on.
What have to do ?

-Create for each core a similar directory, like C:\P1, C:\P2, C:\P3….

-copy all PRIMO files in these directories

-create a *.in-file with your number you will test and initialize it.

-break up the process on TEST 1 RUN1 at Phase 1 and copy the *.tmp in each directory.

- now you can edit all the tmp-files in each directory : example ar=1 , ar=2 and ar=3, ....

-Each stepp you have to do record ( like Ecxel ) , iff the actual way a failure. A
manual backtrack is easier with this methode.

-start PRIMO the next TEST[+1] , abort all tasks and record of all tasks the ap and ar
in your Exceltable.

-save the NEW-tmp-file in another directory (example: Copy C:\P2\*.tmp to C:\BACK\*.TEST3_32981), overwrite all tmp-files with the newest tmp-file.

- also you should saved all the .s??? files , in this files are useful informations for the
selection of the indexnumbers of a TEST .
If you lost, PRIMO need more time to finished a RUN ,Example: “Copy C:\P2\*.s80 to C:\RUNS\*.80_TEST5_2_28912 “-> PRIMO on PHASE 1 TEST 5 at RUN2 , 28912/29050 bit

Calculate Phase 2 during Phase 1:
Create another directory , like C:\Phase2_1
and copy all PRIMO program files in this. Copy the newest tmp-file
in this and edit the tmp-file. Set pe=2 !
Dependent of the ready TESTs in Phase 2, kill the minus of every “Type=-“.

PRIMO jump to the position , you have not finished a TEST in Phase 2.
I mean: kill “-“ from [1] Type=-4 to [99] Type=-4 , PRIMO start Phase 2 at TEST 100

TEST bei Phase 2 die Zeilen sf=, pm= ( ist ein Fehler bei PRIMO )
Copy the ready TESTs in Phase 2 in a separate „preliminary certificate“
Delete lines sf=, pm= in each TESTs of Phase 2


To the end , make a sigification.
That's all.

If you have questions , ask me !

Note, the expected running time is d^3,75. Twice faster per core.
smh is offline   Reply With Quote
Old 2009-10-07, 05:15   #5
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
DEUTSCHLAND !

3×89 Posts
Default

Quote:
Originally Posted by smh View Post
To make it more readable:
For me is it very difficult, to translate a german text into an understandable english-text.

I think, the first lines are clear.

Anyhow, you need your own feeling , to handle more than one task simultaneously on your PC.

Every user should test it on a tiny number. Step by step.

Last fiddled with by Cybertronic on 2009-10-07 at 05:16
Cybertronic is offline   Reply With Quote
Old 2009-10-07, 06:33   #6
smh
 
smh's Avatar
 
"Sander"
Oct 2002
52.345322,5.52471

29×41 Posts
Default

Quote:
Originally Posted by Cybertronic View Post
For me is it very difficult, to translate a german text into an understandable english-text.

I think, the first lines are clear.
I didn't translate/correct anything from your post. I just deleted the German part to make it more readable.
smh is offline   Reply With Quote
Old 2010-10-13, 18:25   #7
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
DEUTSCHLAND !

3·89 Posts
Default referring lines sf= and pm=

1. create a new directory and copy all PRIMO files in the new one.
2. copy the actual tmp file in this one.
3. create a new input file with a tiny number , like 10^300+331
4. start the certification for this number and stop after 1-2 seconds.

so,...

Assumed you are at Phase 1 on TEST 301 ...
copy the last TEST of the tiny number certificate , like

[19]
Type=-4
....

and append it in the master TEMP-file of your huge number.

rewrite [19] into [301] , set to begin at line 7 "TestCount=301"

start PRIMO with this new file and you will see, PRIMO
start PHASE 2 afetr any seconds.

Stop it !

Delete all informations from TEST [301] to end of file. Continue the old procedure for Phase 2.

Why is it so ?

When PRIMO finished Phase 1 and start Phase 2 , PRIMO write automatic
a new file from memory to disc , without the line "pm=" in every TEST.
So you have not the lines "pm=" and "sf=" when PRIMO finished TESTs of PHASE 2 .
Cybertronic is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
P-1 factoring: B1 and B2 vs. multicore scaling TheJudger Software 1 2016-05-02 21:09
Single exponent testing on MultiCore graizada Software 3 2013-02-05 14:36
Factor5 on Multicore Machines Rodrigo Operation Billion Digits 4 2011-01-02 04:50
starting mprime at boot time on a multicore pc tha Software 6 2008-10-15 23:38
Sieving on multicore machines fivemack Factoring 2 2007-08-26 23:47

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

Thu Oct 22 15:32:24 UTC 2020 up 42 days, 12:43, 1 user, load averages: 2.01, 1.83, 1.86

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.