mersenneforum.org  

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

Reply
 
Thread Tools
Old 2009-01-28, 10:45   #1
hj47
 
hj47's Avatar
 
Oct 2008

2·3·11 Posts
Default Most efficient way to LL

Hey,

Is it more efficient/productive to do two LL's on a dual core or 1 LL shared between both cores. If the latter is better, how do I go about doing it?

Cheers :D
hj47 is offline   Reply With Quote
Old 2009-01-28, 12:13   #2
Mr. P-1
 
Mr. P-1's Avatar
 
Jun 2003

116910 Posts
Default

It's more efficient in the long run to do two LLs - one on each core.
Mr. P-1 is offline   Reply With Quote
Old 2009-01-28, 15:10   #3
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

3×52×71 Posts
Default

Quote:
Originally Posted by Mr. P-1 View Post
It's more efficient in the long run to do two LLs - one on each core.
There have been a couple reports on this forum (not this thread) where two cores will process one LL in half or less the time as one core but it is unlikely.

I have a core2 Due E6600 that appears to process a DC in slightly less than half the time with two cores. I haven't tried a LL test yet.

Also read this thread, especially posts by Phantomas that talk about his experience: http://www.mersenneforum.org/showthread.php?t=11025
petrw1 is offline   Reply With Quote
Old 2009-01-28, 16:54   #4
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

11101100011012 Posts
Default

Quote:
Originally Posted by petrw1 View Post
There have been a couple reports on this forum (not this thread) where two cores will process one LL in half or less the time as one core but it is unlikely.
I am curious as to why you might even think that it is possible.

If one cuts a piece of string in half and ties the pieces together,
is the result ever longer than the original??????
R.D. Silverman is offline   Reply With Quote
Old 2009-01-28, 17:39   #5
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

135448 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
I am curious as to why you might even think that it is possible.

If one cuts a piece of string in half and ties the pieces together,
is the result ever longer than the original?
With cache locality it's possible for toy applications. But I don't think there are any real applications where this is a significant effect.

I do like your analogy, though.

Last fiddled with by CRGreathouse on 2009-01-28 at 17:40
CRGreathouse is offline   Reply With Quote
Old 2009-01-28, 17:44   #6
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

22·2,939 Posts
Default

On my Core2 duo, running Prime95 2-threaded is only a few% less throughput than running 2 single-threaded jobs, so I prefer doing that because there's only one job to be managed, restarted-after-interrupt, etc.

Bob, it is actually possible for superlinear scaling - my Mlucas code actually runs slightly faster running on 2 and 4 Itanium cores in multithreaded mode than linear scaling would predict, likely due to cache effects, e.g. each core in multithreaded mode deals with a working data set which fits in the L2 cache, whereas one job per core leads to a working set that exceeds the L2 cache size. I admit such occurrences appear to be the exception rather than the rule, but be aware that it is possible.

Last fiddled with by ewmayer on 2009-01-28 at 17:45
ewmayer is offline   Reply With Quote
Old 2009-01-28, 17:53   #7
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

22·3·499 Posts
Default

ewmayer, do you know of anything other than memory hierarchy that would lead to superlinear scaling?

Last fiddled with by ewmayer on 2009-01-28 at 18:06 Reason: Nope, but perhaps one of our Comp Sci majors can ome up with one.
CRGreathouse is offline   Reply With Quote
Old 2009-01-28, 17:55   #8
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

532510 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
I am curious as to why you might even think that it is possible.

If one cuts a piece of string in half and ties the pieces together,
is the result ever longer than the original??????
I agree it seems impossible but on the link I provided (Post #7) Phantomas did report his stats suggesting it is possible. He also suggested an explanation.

Quote:
This is the case in my test with my Q9450. With 4 independent LL-Tests (2560K) one itteration is about 54.somewhat ms. With 2 LL-Tests with 2 cores it's about 26.somewhatelse ms. So it is in fact a little, tiny bit faster. And I assume that this is because it's using the L2 Cache better. My RAM runs at 1200MHz 6,6,6,15, and maybe the effect is bigger on 800MHz Ram's (hope so...)
My personal test was very brief ... on my E6600 I switched one 18M DC test from 1 CPU to 2 CPUs for a couple minutes only and saw the per iteration time drop from 0.028 to 0.014 and sometimes 0.013 ... granted too short to draw any conclusions.

Last fiddled with by petrw1 on 2009-01-28 at 17:56
petrw1 is offline   Reply With Quote
Old 2009-01-28, 18:47   #9
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2·3·13·83 Posts
Default

Before the last few responses, I nearly suggested that
RDS was being a bit naive re the vagaries of programming,
but I chickened out.

David

Last fiddled with by davieddy on 2009-01-28 at 18:48
davieddy is offline   Reply With Quote
Old 2009-01-28, 19:25   #10
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default

Quote:
Originally Posted by davieddy View Post
Before the last few responses, I nearly suggested that RDS was being a bit naive re the vagaries of programming, but I chickened out.
Last time I cut a piece of string in half and then tied the pieces together, the resulting span from one end to the other was shorter than the original ... but I may be mistaking whether the string length is intended to be analogous to elapsed time, or to speed, and thus whether hyperthreading (or split caches) is analogous to mathematical knots, or to nautical knots.

Perhaps we should use chalk, as in the famous joke about one-half piece ...

Last fiddled with by cheesehead on 2009-01-28 at 19:32
cheesehead is offline   Reply With Quote
Old 2009-01-28, 21:05   #11
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2×3×13×83 Posts
Default

Quote:
Originally Posted by cheesehead View Post
Perhaps we should use chalk, as in the famous joke about one-half piece ...
I'm sure someone will tell me to Google this, but the
keyword(s) aren't clear. Enlightenment welcome
Meanwhile I shall attempt to reconstruct the joke.

Best thought so far - you are getting your own back for my
silly fish joke.

Last fiddled with by davieddy on 2009-01-28 at 21:12
davieddy is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
LL tests more credit-efficient than P-1? ixfd64 Software 8 2023-05-20 01:09
Efficient Test paulunderwood Computer Science & Computational Number Theory 5 2017-06-09 14:02
Efficient testing in Pfgw Trejack Information & Answers 2 2016-04-30 05:30
Wheel factorization: Efficient? 3.14159 Miscellaneous Math 520 2010-08-30 07:21
Efficient modular reduction with SSE fivemack Computer Science & Computational Number Theory 15 2009-02-19 06:32

All times are UTC. The time now is 13:50.


Fri Jul 7 13:50:38 UTC 2023 up 323 days, 11:19, 0 users, load averages: 1.07, 1.17, 1.13

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.

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