mersenneforum.org  

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

Reply
 
Thread Tools
Old 2020-04-23, 17:10   #254
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

54538 Posts
Default

I am running a fairly deep sieve, 4e12, on a k that I want to pick back up and continue on with using sr1sieve. The CPU utilization floats from 15% to 20% on an i7 CPU with 4 cores and 4 threads running at 4.15 GHz. I understand these are meant to be ran as background processes. Prime95 will run at 50% utilization, with no other processes running, at Priority 1. My sieve will take about four days to complete, if I do not have to stop it. It would cut a lot of time if the sieving utilization could be brought up to 35%, for example.

storm5510 is online now   Reply With Quote
Old 2020-04-23, 17:16   #255
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11100101011012 Posts
Default

Quote:
Originally Posted by storm5510 View Post
I am running a fairly deep sieve, 4e12, on a k that I want to pick back up and continue on with using sr1sieve. The CPU utilization floats from 15% to 20% on an i7 CPU with 4 cores and 4 threads running at 4.15 GHz. I understand these are meant to be ran as background processes. Prime95 will run at 50% utilization, with no other processes running, at Priority 1. My sieve will take about four days to complete, if I do not have to stop it. It would cut a lot of time if the sieving utilization could be brought up to 35%, for example.
I can't say why it does that without doing some profiling. What inputs are you using?
rogue is online now   Reply With Quote
Old 2020-04-23, 22:39   #256
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

B2B16 Posts
Default

Quote:
Originally Posted by rogue View Post
I can't say why it does that without doing some profiling. What inputs are you using?
Edit: The series is 98475*2^n-1.

Code:
sr1sieve -P 4e12 -n 770e3 -N 1e6 -Z -s 3 -v -i sr1.npg -o work.abcd
The above is for an example for first start. I have something shorter, below, for a restart of an existing sieve. All I have to do is use srfile to convert the "abcd" file back to "npg" and rename it. The input file above comes from a short srsieve run.

Code:
sr1sieve -P 4e12 -Z -v -s 3 -i sr1.npg -o% work.abcd
I do not run any of this by hand. I have two batch files I use where I put the parameters on the command line, in a specific order, and they are placed where the matching variables are in the batch. %1, %2, and so on.

Last fiddled with by storm5510 on 2020-04-23 at 22:47
storm5510 is online now   Reply With Quote
Old 2020-04-24, 00:53   #257
Citrix
 
Citrix's Avatar
 
Jun 2003

31348 Posts
Default

Quote:
Originally Posted by storm5510 View Post
I am running a fairly deep sieve, 4e12, on a k that I want to pick back up and continue on with using sr1sieve. The CPU utilization floats from 15% to 20% on an i7 CPU with 4 cores and 4 threads running at 4.15 GHz. I understand these are meant to be ran as background processes. Prime95 will run at 50% utilization, with no other processes running, at Priority 1. My sieve will take about four days to complete, if I do not have to stop it. It would cut a lot of time if the sieving utilization could be brought up to 35%, for example.

You can split the prime range and run 2-3 sieve processes at the same time. Then use srfile to clean the main file.

On a 4 core i7 - I often run 8 processes in parallel to get maximum efficiency.

Last fiddled with by Citrix on 2020-04-24 at 00:53
Citrix is offline   Reply With Quote
Old 2020-04-24, 16:20   #258
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

3·953 Posts
Default

Quote:
Originally Posted by Citrix View Post
You can split the prime range and run 2-3 sieve processes at the same time. Then use srfile to clean the main file.

On a 4 core i7 - I often run 8 processes in parallel to get maximum efficiency.
I have ran split sieve's before, but not on the same machine. I have ran multiple instances of LLR on said CPU. It is sluggish. I do not think Windows 10 cooperates very well. A single instance can do more than two.
storm5510 is online now   Reply With Quote
Old 2020-04-24, 20:44   #259
rob147147
 
Apr 2013
Durham, UK

22×17 Posts
Default

Quote:
Originally Posted by Citrix View Post
I was sieving a range of 10M for my extreme low weight k.
Using a Q value ~ 2500 this can be reduced to a range of around 4096.
I get a speed up of 2.5 times. Much lower than expected.
Do you have any benchmarks and a sieve file for this that I can test on my CUDA code? I've been wanting for some time to try to integrate my CUDA port of sr2sieve into mtsieve, but time has been my enemy. Maybe this year....
rob147147 is offline   Reply With Quote
Old 2020-04-26, 00:59   #260
Citrix
 
Citrix's Avatar
 
Jun 2003

22×11×37 Posts
Default

Quote:
Originally Posted by rob147147 View Post
Do you have any benchmarks and a sieve file for this that I can test on my CUDA code? I've been wanting for some time to try to integrate my CUDA port of sr2sieve into mtsieve, but time has been my enemy. Maybe this year....
You could create a similar sieve file yourself with searching a heavy weight k (say 15) from n=10M to N=10M+4096 for base 2.

Alternatively you could search
k=15
n=10M
N=20M
Use base as b=2^2048 i.e only choose n that are multiple of 2048.

On my AMD Radeon 5 (4 cores) I get between 8-10M p /sec per thread.
I can run 8 of these at a time for maximum efficiency.
So around 70-80M p/sec.

on an i7 4th generation (4 cores) I can clear around 300-320M p/sec.

I am using sr1sieve. I haven't tried srsieve2.exe.

I think the program is limited by the overhead and not the actual algorithm.

Last fiddled with by Citrix on 2020-04-26 at 01:01
Citrix is offline   Reply With Quote
Old 2020-04-26, 03:59   #261
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

1011001010112 Posts
Default

Quote:
Originally Posted by Citrix View Post
...I think the program is limited by the overhead and not the actual algorithm.
In the mtsieve document, there are references to "MyApp" towards the bottom. I believe this is Microsoft .Net Framework. I experimented with the 2008 and 2010 versions. I found the applications to be rather sluggish. I stopped using each. It seemed Microsoft was moving away from programs which could do hard number-crunching into more database oriented applications where speed was not on the list of priorities. There are exceptions though. Microsoft C++ for example.
storm5510 is online now   Reply With Quote
Old 2020-04-26, 05:22   #262
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

991 Posts
Default

Quote:
Originally Posted by storm5510 View Post
In the mtsieve document, there are references to "MyApp" towards the bottom. I believe this is Microsoft .Net Framework. I experimented with the 2008 and 2010 versions. I found the applications to be rather sluggish. I stopped using each. It seemed Microsoft was moving away from programs which could do hard number-crunching into more database oriented applications where speed was not on the list of priorities. There are exceptions though. Microsoft C++ for example.
In that documentation, MyApp is just a placeholder for an actual App subclass name (such as SierpinskiRieselApp for srsieve2). It has nothing to do with .NET, and mtsieve doesn't use .NET. On Windows, it just uses the regular C++ Windows API interface.

.NET is almost invariably slower than plain C or C++, for much the same reason that Java programs are slower (namely the virtual environment construct). IMHO no serious program in this field (high-performance mathematical computation) should ever use .NET or Java.

Last fiddled with by Happy5214 on 2020-04-26 at 05:27 Reason: Quote
Happy5214 is offline   Reply With Quote
Old 2020-04-26, 15:12   #263
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

B2B16 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
In that documentation, MyApp is just a placeholder for an actual App subclass name (such as SierpinskiRieselApp for srsieve2). It has nothing to do with .NET, and mtsieve doesn't use .NET. On Windows, it just uses the regular C++ Windows API interface.

.NET is almost invariably slower than plain C or C++, for much the same reason that Java programs are slower (namely the virtual environment construct). IMHO no serious program in this field (high-performance mathematical computation) should ever use .NET or Java.
I agree completely. Some of the 32-bit antique languages from the 1990's would even be faster. Once upon a time, I used Visual Basic 6 as that was what I was taught in trade school. I could take virtually the same code and duplicate it in .Net 2008, with the required syntax variations. I would compile the .Net application as a 64-bit executable. The original 32-bit VB6 program would run circles around it .Net has too much baggage and too many dependencies.
storm5510 is online now   Reply With Quote
Old 2020-05-21, 00:53   #264
Citrix
 
Citrix's Avatar
 
Jun 2003

22×11×37 Posts
Default

Code:
static double expected_factors(uint32_t n, uint64_t p0, uint64_t p1)
{
  /* TODO: Use a more accurate formula. This one is only reasonable when
     p0/p1 is close to 1.
   */

  return n*(1-log(p0)/log(p1));
}
Looking at above code from sr1sieve. Can somebody point me to math behind this code. Thanks.
Citrix is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sieving twins with srsieve henryzz Twin Prime Search 0 2014-03-18 12:44
Intel announces multi-core enhancements for Haswell chips ixfd64 Hardware 8 2012-02-10 20:32
LLRnet enhancements kar_bon No Prime Left Behind 10 2008-03-28 11:21
TODO list and suggestions/comments/enhancements Greenbank Octoproth Search 2 2006-12-03 17:28
Suggestions for future enhancements Reboot It Software 16 2003-10-17 01:31

All times are UTC. The time now is 14:10.


Fri Jul 7 14:10:00 UTC 2023 up 323 days, 11:38, 0 users, load averages: 1.42, 1.36, 1.24

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.

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