![]() |
I am running a fairly deep sieve, 4e12, on a [I]k[/I] that I want to pick back up and continue on with using [I]sr1sieve[/I]. 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. [I]Prime95[/I] 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.
:two cents: |
[QUOTE=storm5510;543557]I am running a fairly deep sieve, 4e12, on a [I]k[/I] that I want to pick back up and continue on with using [I]sr1sieve[/I]. 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. [I]Prime95[/I] 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.[/QUOTE]
I can't say why it does that without doing some profiling. What inputs are you using? |
[QUOTE=rogue;543558]I can't say why it does that without doing some profiling. What inputs are you using?[/QUOTE]
[U]Edit[/U]: 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[/CODE]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 [I]srfile[/I] to convert the "abcd" file back to "npg" and rename it. The input file above comes from a short [I]srsieve[/I] run. [CODE]sr1sieve -P 4e12 -Z -v -s 3 -i sr1.npg -o% work.abcd[/CODE]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. |
[QUOTE=storm5510;543557]I am running a fairly deep sieve, 4e12, on a [I]k[/I] that I want to pick back up and continue on with using [I]sr1sieve[/I]. 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. [I]Prime95[/I] 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.
:two cents:[/QUOTE] 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. |
[QUOTE=Citrix;543601]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.[/QUOTE] I have ran split sieve's before, but not on the same machine. I have ran multiple instances of [I]LLR[/I] on said CPU. It is sluggish. I do not think [I]Windows 10[/I] cooperates very well. A single instance can do more than two. |
[QUOTE=Citrix;543525]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. [/QUOTE] 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.... |
[QUOTE=rob147147;543665]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....[/QUOTE]
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. |
[QUOTE=Citrix;543829]...I think the program is limited by the overhead and not the actual algorithm.[/QUOTE]
In the [I]mtsieve[/I] document, there are references to "MyApp" towards the bottom. I believe this is [I]Microsoft .Net Framework[/I]. 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. [I]Microsoft C++[/I] for example. |
[QUOTE=storm5510;543836]In the [I]mtsieve[/I] document, there are references to "MyApp" towards the bottom. I believe this is [I]Microsoft .Net Framework[/I]. 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. [I]Microsoft C++[/I] for example.[/QUOTE]
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 [i]is[/i] 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. |
[QUOTE=Happy5214;543840]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 [I]is[/I] almost invariably slower than plain C or C++, for much the same reason that Java programs are slower (namely the virtual environment construct). [B]IMHO no serious program in this field (high-performance mathematical computation) should ever use .NET or Java.[/B][/QUOTE] 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. |
[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)); } [/code] Looking at above code from sr1sieve. Can somebody point me to math behind this code. Thanks. |
| All times are UTC. The time now is 19:51. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.