mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory

Reply
 
Thread Tools
Old 2011-09-07, 01:31   #23
Christenson
 
Christenson's Avatar
 
Dec 2010
Monticello

34038 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
I would like to help out with the search. You guys are taking R. Gerbicz's code and compiling it, but what command line parameters are you using?

I see talk about different ranges are better for things, but if you have core2 based CPUs what would the best settings be? Did I see that someone said it is better to run it on 1 core because running it on multiple ends up being the same speed?
Time to rename this thread...something like "Wil(l there be more )son(s of) primes search(ed for?)"
Christenson is offline   Reply With Quote
Old 2011-09-07, 07:44   #24
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

11000012 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
I would like to help out with the search. You guys are taking R. Gerbicz's code and compiling it, but what command line parameters are you using?
My command line parameter are:
icc -O3 -lgmp wilsontest.c -o wilsontest.exe
(needs of course GMP installed properly)

If you mean the parameters for running it:
There are no real command line parameters as you have to interactivly type it in. But you can mimic the input with echo (assuming that you start from scratch)
echo -e "<start>\n<end>\n<interval>\n0\n" | ./wilsontest.exe

Last fiddled with by MrRepunit on 2011-09-07 at 07:52 Reason: added runtime parameters
MrRepunit is offline   Reply With Quote
Old 2011-09-07, 07:53   #25
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3×17×23 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
My command line parameter are:
icc -O3 -lgmp wilsontest.c -o wilsontest.exe
(needs of course GMP installed properly)
No I meant command line parameters to *run* the program, not compile it. I now have a working 64bit Windows binary if anyone is interested.

I understand the start and end value part, but when it says how many primes to test what are people using? It is best to keep increasing that until you use as much RAM as possible to speed things up? And someone was saying it is better to use 1 core with lots of RAM instead of multiple cores with your RAM split between them?

I will try the range 7e10 to 8e10 then.

Jeff.
Jeff Gilchrist is offline   Reply With Quote
Old 2011-09-07, 08:04   #26
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

97 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
No I meant command line parameters to *run* the program, not compile it. I now have a working 64bit Windows binary if anyone is interested.

I understand the start and end value part, but when it says how many primes to test what are people using? It is best to keep increasing that until you use as much RAM as possible to speed things up? And someone was saying it is better to use 1 core with lots of RAM instead of multiple cores with your RAM split between them?

I will try the range 7e10 to 8e10 then.

Jeff.
That what I was thinking after I answered, so I edited my last post before seeing yours.
Concerning the runtime with splitting and without:
I don't have exact timings, but my feeling is that using more cores should be faster. By looking at the timings of fivemack I see that a factor of ten in the used interval (4E6 to 4E7) just gives a speedup of a factor 2.5. So ten cores instead of one on that range would be faster.
MrRepunit is offline   Reply With Quote
Old 2011-09-07, 08:11   #27
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

1418 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
I now have a working 64bit Windows binary if anyone is interested.
I am interested. Is it on your usual webpage?
MrRepunit is offline   Reply With Quote
Old 2011-09-07, 10:29   #28
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

2·7·461 Posts
Default

I've split this into algorithm-discussion and practicalities threads; am happy to rearrange if it becomes unwieldy again
fivemack is offline   Reply With Quote
Old 2011-09-07, 10:33   #29
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

2×7×461 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
I don't have exact timings, but my feeling is that using more cores should be faster. By looking at the timings of fivemack I see that a factor of ten in the used interval (4E6 to 4E7) just gives a speedup of a factor 2.5. So ten cores instead of one on that range would be faster.
I'm still not quite sure what the right answer is; it's going to depend on how much memory you have per core, and it is clear that the memory usage does depend on the value of 'interval' even if interval is much larger than the number of primes in the range.

At the moment, if you have about (maybe a little over) one gigabyte per core, I would run a 1e9 range on each core and use 2e7 as the interval parameter. But I haven't yet completed a calibration run with that parameter choice, I expect it to take a bit over 24 hours but I'm not at all sure how much over.
fivemack is offline   Reply With Quote
Old 2011-09-07, 12:11   #30
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

22258 Posts
Default

Quote:
Originally Posted by fivemack View Post
I'm still not quite sure what the right answer is; it's going to depend on how much memory you have per core, and it is clear that the memory usage does depend on the value of 'interval' even if interval is much larger than the number of primes in the range.

At the moment, if you have about (maybe a little over) one gigabyte per core, I would run a 1e9 range on each core and use 2e7 as the interval parameter. But I haven't yet completed a calibration run with that parameter choice, I expect it to take a bit over 24 hours but I'm not at all sure how much over.
I have 8GB on my system, but I tried running the tool with the full 7e10 to 8e10 start and finish with a 20,000,000 interval and it seemed to be using about 1.2GB of RAM. Now I'm trying just 7e10 to 7.1e10 but with a 50,000,000 interval and the RAM usage only went up slightly to 1.4GB of RAM max, but often time it hovers around 550MB of RAM.
Jeff Gilchrist is offline   Reply With Quote
Old 2011-09-07, 12:17   #31
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3×17×23 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
I am interested. Is it on your usual webpage?
It is but not publicly listed. You can download the core2 optimized version for Windows 64bit here:
http://gilchrist.ca/jeff/factoring/wilsontest_win64.zip
Jeff Gilchrist is offline   Reply With Quote
Old 2011-09-07, 12:22   #32
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

97 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
I have 8GB on my system, but I tried running the tool with the full 7e10 to 8e10 start and finish with a 20,000,000 interval and it seemed to be using about 1.2GB of RAM. Now I'm trying just 7e10 to 7.1e10 but with a 50,000,000 interval and the RAM usage only went up slightly to 1.4GB of RAM max, but often time it hovers around 550MB of RAM.
I just took a memory profile of running over 2 hours (the test itself was running much longer before I started the profiling) the range 1e9 to 5e9 using an interval of 50000000 primes. It is normally around 3GB but with lots of peaks up to 4GB. So one can say that using an interval of k*10^7 the program uses at maximum k*0.8 GB RAM.

(If someone is interested in the profiling script I can upload it.)
MrRepunit is offline   Reply With Quote
Old 2011-09-07, 12:51   #33
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

2·7·461 Posts
Default

The memory usage is very peaky: the below graph is for running 50G .. 60G with interval= 4e7. X axis is in ten-second units since the program starts, Y axis is memory use in kilobytes.

The drops to ~400M use occur at the start of intervals; you can see three phases for each interval - the large-memory phase, an intermediate phase where there's a sort of square-root curve visible in the growth of memory use, and the output phase where the memory use is flat.

The moduli in this graph are [11, 1, 5, 1, 1, 5] (the last 5 is not finished yet); you can clearly see the 1-2-3 timing ratio.
Attached Thumbnails
Click image for larger version

Name:	B.png
Views:	171
Size:	63.8 KB
ID:	6966  

Last fiddled with by fivemack on 2011-09-07 at 13:04
fivemack is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Twin prime search? MooooMoo Twin Prime Search 115 2010-08-29 17:38
k=51 or about coordinated prime search Kosmaj Riesel Prime Search 7 2007-07-13 22:15
Prime Search on PS-3? Kosmaj Riesel Prime Search 6 2006-11-21 15:19
Genetics and Wilson's theorem David John Hill Jr Science & Technology 2 2006-05-10 14:10
Generalized wilson's theorem bouayoun Math 3 2004-03-12 18:24

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


Fri Aug 12 00:15:30 UTC 2022 up 35 days, 19:02, 2 users, load averages: 1.95, 1.34, 1.17

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

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