mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software > Mlucas

Reply
 
Thread Tools
Old 2023-04-14, 22:44   #1
madderhatter
 
Apr 2023

24 Posts
Default newb guide?

I believe I was successfully able to compile the program, but I also installed it, so I'm not sure exactly where everything is going. I'm running in the obj directory I made it in though, I think it's working. I successfully did a test I believe...

However I'm still missing things like a worktodo.ini file, or a mlucas.cfg which I found mention of but not a lot of documentation.

Is there a simple command line that will allow me to search through a range of numbers, any explanation about how that works with the LL test?

Most of the examples I've found have to do with testing a specific prime once it's found and not actually using the LL test to find them?
These are two different things right?

I'm going to start probably picking through the code I guess but it seems like the basic function of the program is a pretty steep learning curve without a simple walkthrough.


Ok, so this is basically what I need to do I guess? is start workers like this? Is there an easier more clear cut way of doing it? I need to create a local.ini file or something for this method?

Really confusing.

Non-hyperthreaded x86 CPUs (both Intel and AMD) with core count an odd multiple of 2: Run a 2-core benchmark:
./Mlucas -s m -cpu 0:1 >& test.log
Then create as many run directories as needed to "fill the processor" up with such 2-thread instances − e.g. on a 10-core system starting at the same directory level as 'src' and 'obj':
mkdir run0 run1 run2 run3 run4
cp ../obj/mlucas.cfg primenet.py local.ini run0
cp ../obj/mlucas.cfg primenet.py local.ini run1
cp ../obj/mlucas.cfg primenet.py local.ini run2
cp ../obj/mlucas.cfg primenet.py local.ini run3
cp ../obj/mlucas.cfg primenet.py local.ini run4
Then in one's home directory, create a jobs.sh file with these contents:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 30 -cpu 0:1 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 30 -cpu 2:3 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 30 -cpu 4:5 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run3 && nohup ../obj/Mlucas -maxalloc 30 -cpu 6:7 &
cd ~/mlucas_v20.1.1/run3 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run4 && nohup ../obj/Mlucas -maxalloc 30 -cpu 8:9 &
cd ~/mlucas_v20.1.1/run4 && nohup ./primenet.py -d -T 150 &
Non-hyperthreaded x86 CPUs (both Intel and AMD) with core count a multiple of 4: Run a 4-core benchmark:
./Mlucas -s m -cpu 0:3 >& test.log
Then create as many run directories as needed to "fill the processor" up with such 4-thread instances − e.g. on a 12-core system starting at the same directory level as 'src' and 'obj':
mkdir run0 run1 run2
cp ../obj/mlucas.cfg primenet.py local.ini run0
cp ../obj/mlucas.cfg primenet.py local.ini run1
cp ../obj/mlucas.cfg primenet.py local.ini run2
Then in one's home directory, create a jobs.sh file with these contents:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 50 -cpu 0:3 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 50 -cpu 4:7 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 50 -cpu 8:11 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &
Hyperthreaded Intel x86 CPUs with core count an odd multiple of 2: Run two sets of benchmarks, one using just 2 physical cores, the other also using their logical counterparts. Here, n is the number of physical cores on your system, you must insert the actual number in its place (e.g. on a 6c/12t system, you would use './Mlucas -s m -cpu 0:1,6:7 >& test1.log' for the second test):
./Mlucas -s m -cpu 0:1 >& test0.log
mv mlucas.cfg mlucas.cfg.2c.2t
./Mlucas -s m -cpu 0:1,n:n+1 >& test1.log
mv mlucas.cfg mlucas.cfg.2c.4t
Compare the ms/iter numbers between the two resulting cfg-files. For the one which is generally faster across the various FFT lengths, do 'ln -s [faster of the mlucas.cfg.2c.*t files] mlucas.cfg' to create a symbolic link between it and 'mlucas.cfg', which is where Mlucas expects to find optimal FFT-tuning parameters at runtime. Then create as many run directories as needed to "fill the processor" up with such instances − e.g. on a 6c/12t system where the 2c.4t cfg-file showed overall better timings, one could 'cd ..' out of obj to the same directory level as 'src' and 'obj', then, assuming these are all under a directory in the user's home named 'mlucas_v20.1.1':
mkdir run0 run1 run2
cp ../obj/mlucas.cfg primenet.py local.ini run0
cp ../obj/mlucas.cfg primenet.py local.ini run1
cp ../obj/mlucas.cfg primenet.py local.ini run2
Then in one's home directory, create a jobs.sh file with these contents:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 50 -cpu 0:1,6:7 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 50 -cpu 2:3,8:9 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 50 -cpu 4:5,10:11 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &
Hyperthreaded Intel x86 CPUs with core count a multiple of 4: Run two sets of benchmarks, one using just 4 physical cores, the other also using their logical counterparts. Here, n is the number of physical cores on your system, you must insert the actual number in its place (e.g. on a 12c/24t system, you would use './Mlucas -s m -cpu 0:3,12:15 >& test1.log' for the second test):
./Mlucas -s m -cpu 0:3 >& test0.log
mv mlucas.cfg mlucas.cfg.4c.4t
./Mlucas -s m -cpu 0:3,n:n+3 >& test1.log
mv mlucas.cfg mlucas.cfg.4c.8t
Compare the ms/iter numbers between the two resulting cfg-files. For the one which is generally faster across the various FFT lengths, do 'ln -s [faster of the mlucas.cfg.4c.*t files] mlucas.cfg' to create a symbolic link between it and 'mlucas.cfg', which is where Mlucas expects to find optimal FFT-tuning parameters at runtime. Then create as many run directories as needed to "fill the processor" up with such instances − e.g. on a 12c/24t system where the 4c.8t cfg-file showed overall better timings, one could 'cd ..' out of obj to the same directory level as 'src' and 'obj', then, assuming these are all under a directory in the user's home named 'mlucas_v20.1.1':
mkdir run0 run1 run2
cp ../obj/mlucas.cfg primenet.py local.ini run0
cp ../obj/mlucas.cfg primenet.py local.ini run1
cp ../obj/mlucas.cfg primenet.py local.ini run2
Then in one's home directory, create a jobs.sh file with these contents:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 50 -cpu 0:3,12:15 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 50 -cpu 4:7,16:19 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 50 -cpu 8:11,20:23 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &
Hyperthreaded AMD x86 CPUs with core count an odd multiple of 2: Note that AMD's core-numbering convention differs from Intel's. Run two sets of benchmarks:
./Mlucas -s m -cpu 0:3:2 >& test0.log
mv mlucas.cfg mlucas.cfg.2c.2t
./Mlucas -s m -cpu 0:3 >& test1.log
mv mlucas.cfg mlucas.cfg.2c.4t
and as described above, create a symlink to the one showing better timings and create multiple rundirs with copies of mlucas.cfg, primenet.py and local.ini . For a 6c/12t AMD system, the "run 3 instances, each using 2c/2t" bash runscript would look like this:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 50 -cpu 0:3:2 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 50 -cpu 4:7:2 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 50 -cpu 8:11:2 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &
If on the other hand 2c/4t is faster on one's system, the "run 3 instances, each using 2c/4t" bash runscript would look like this:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 50 -cpu 0:3 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 50 -cpu 4:7 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 50 -cpu 8:11 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &
Hyperthreaded AMD x86 CPUs with core count a multiple of 4: Note that AMD's core-numbering convention differs from Intel's. Run two sets of benchmarks:
./Mlucas -s m -cpu 0:7:2 >& test0.log
mv mlucas.cfg mlucas.cfg.4c.4t
./Mlucas -s m -cpu 0:7 >& test1.log
mv mlucas.cfg mlucas.cfg.4c.8t
and as described above, create a symlink to the one showing better timings and create multiple rundirs with copies of mlucas.cfg, primenet.py and local.ini . For a 12c/24t AMD system, the above "run 3 instances, each using 4c/8t" bash runscript would look like this:
#!/bin/bash
if [ "$EUID" -eq 0 ]; then echo "init script needs to be executed as regular user (no sudo)" && exit; fi
cd ~/mlucas_v20.1.1/run0 && nohup ../obj/Mlucas -maxalloc 50 -cpu 0:7 &
cd ~/mlucas_v20.1.1/run0 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run1 && nohup ../obj/Mlucas -maxalloc 50 -cpu 8:15 &
cd ~/mlucas_v20.1.1/run1 && nohup ./primenet.py -d -T 150 &
cd ~/mlucas_v20.1.1/run2 && nohup ../obj/Mlucas -maxalloc 50 -cpu 16:23 &
cd ~/mlucas_v20.1.1/run2 && nohup ./primenet.py -d -T 150 &

Last fiddled with by madderhatter on 2023-04-14 at 23:32
madderhatter is offline   Reply With Quote
Old 2023-04-15, 13:50   #2
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

32×11×79 Posts
Default

Quote:
Originally Posted by madderhatter View Post
I'm still missing things like a worktodo.ini file,
Create worktodo.ini with a text editor. Insert manually reserved assignments. Start small, such as wavefront LLDC or PRP DC (matching whatever type the first test was for the same exponent).
Quote:
a mlucas.cfg which I found mention of but not a lot of documentation.
The selftest benchmarking will create and append to mlucas.cfg. I suggest renaming between runs to describe the conditions under which each is produced, then copy back to mlucas.cfg the one that's best for the work you plan to run at the time.
Quote:
Is there a simple command line that will allow me to search through a range of numbers, any explanation about how that works with the LL test?
No. Mlucas is manually fed and manually reported, unless you use a separate primenet.py.
Quote:
Most of the examples I've found have to do with testing a specific prime once it's found and not actually using the LL test to find them?
These are two different things right?
Only prime exponents might produce Mersenne primes. For first testing, PRP with GEC is recommended, as it's far better error detection than possible with LL.
Quote:
Ok, so this is basically what I need to do I guess? ...
I didn't see any obvious errors in a very quick scan through.
Quote:
Really confusing.
Yes. There is a considerable learning curve.
Possibly you'll find parts of https://www.mersenneforum.org/showthread.php?t=23427 helpful. And https://www.mersenneforum.org/showpo...65&postcount=3
kriesel is offline   Reply With Quote
Old 2023-04-15, 14:17   #3
madderhatter
 
Apr 2023

24 Posts
Default

Quote:
Originally Posted by kriesel View Post
Create worktodo.ini with a text editor. Insert manually reserved assignments. Start small, such as wavefront LLDC or PRP DC (matching whatever type the first test was for the same exponent).The selftest benchmarking will create and append to mlucas.cfg. I suggest renaming between runs to describe the conditions under which each is produced, then copy back to mlucas.cfg the one that's best for the work you plan to run at the time.
No. Mlucas is manually fed and manually reported, unless you use a separate primenet.py.
Only prime exponents might produce Mersenne primes. For first testing, PRP with GEC is recommended, as it's far better error detection than possible with LL.
I didn't see any obvious errors in a very quick scan through.
Yes. There is a considerable learning curve.
Possibly you'll find parts of https://www.mersenneforum.org/showthread.php?t=23427 helpful. And https://www.mersenneforum.org/showpo...65&postcount=3
Thanks for the help! I found your earlier post on it...this is the format I'm looking for then?

"Mlucas
Supports Fermat numbers and Mersenne numbers. Only Mersenne numbers are covered here.
See https://www.mersenneforum.org/showpo...8&postcount=36 for computation-type specific exponent limits, and note that cpu type and software version may impose lower limits.
LL
[Test|DoubleCheck]=[<AID>,]<exponent>,<how_far_factored>,<p-1_done>
<exponent> (does an LL test of the corresponding Mersenne number; discontinued support of this format as of V20.1.1)
DoubleCheck=B83D23BF447184F586470457AD1E03AF,22831811,66,1
Test=DDD21F2A0B252E499A9F9020E02FE232,48295213,69,0
Test=332220523,80,1
332220523

PRP
V19 adds PRP and PRP DC forms, for Mersenne numbers only, residue-type 1 or 5:
PRP=<AID>,<k>,<b>,<n>,<c>,<to>,<tests_saved>
PRP=<AID>,<k>,<b>,<n>,<c>,<to>,<tests_saved>,<base-of-first-test>,<residue-type>
PRP=<AID>,1,2,<n>,-1,<to>,<tests_saved>
PRP=<AID>,1,2,<n>,-1,<to>,<tests_saved>,<base-of-first-test>,[1|5]
PRP=0123456789ABCDEF0123456789ABCDEF,1,2,332220523,-1,0
PRP=0123456789ABCDEF0123456789ABCDEF,1,2,332220523,-1,0,3,1

P-1 (new with V20.0; following is from my reading of its Mlucas.c and error messages from experiments; note, full length AID is required, even for manually generated unassigned lines)
P[M|m]inus1=<AID>,<k>,<b>,<n>,<c>,<B1>,<B2>[,<how_far_factored>[,<B2_start>[,"comma-separated-list-of-known-factors"]]]
P[f|F]actor=<AID>,<k>,<b>,<n>,<c>,<how_far_factored>,<tests_saved>
PFactor=00000000000000000000000000000000,1,2,468000023,-1,82,2

ECM (this appears to me in the V20 source code, not functional for Mersennes, after a quick look)

No Mlucas version to date offers PRP proof generation or PRP-CF"
madderhatter is offline   Reply With Quote
Old 2023-04-16, 12:13   #4
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

32·11·79 Posts
Default

Quote:
Originally Posted by madderhatter View Post
Thanks for the help! I found your earlier post on it...this is the format I'm looking for then?
I've updated https://www.mersenneforum.org/showth...098#post522098 to reflect the greater AID field flexibility added at v20.1.1 patch 23 Nov 2021. A current build of Mlucas should accept copied/pasted worktodo lines from https://www.mersenne.org/manual_assignment/ output for Mlucas-supported work types.
kriesel is offline   Reply With Quote
Old 2023-04-17, 00:38   #5
madderhatter
 
Apr 2023

24 Posts
Default

Quote:
Originally Posted by kriesel View Post
I've updated https://www.mersenneforum.org/showth...098#post522098 to reflect the greater AID field flexibility added at v20.1.1 patch 23 Nov 2021. A current build of Mlucas should accept copied/pasted worktodo lines from https://www.mersenne.org/manual_assignment/ output for Mlucas-supported work types.
Oh wow ok thanks a bunch!!
madderhatter is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing preferences bug (newb) InsetIowa9 Information & Answers 6 2019-03-26 03:27
Newb who needs help with PC EddieTheBear Hardware 19 2015-10-23 13:22
Newb question PicGrabber Msieve 20 2014-10-31 20:06
Newb help (it crashes) Proggie Software 4 2005-01-05 07:35
linux question ( newb) crash893 Software 2 2003-12-26 18:50

All times are UTC. The time now is 04:25.


Fri Jul 7 04:25:33 UTC 2023 up 323 days, 1:54, 0 users, load averages: 1.48, 1.63, 1.55

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

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔