text:
mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)

 Dylan14 2018-09-29 11:57

It looks like I found another bug in pixsieve. It seems to stop shortly after p=24068943967, which is well short of 2^52:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>pixsieve -W 12 -w 10000 -P29e9 -i e_100k-1M_primecan.txt -o e_100k-1M_primecan.txt
pixsieve v2.5, a program to find factors of substrings of a decimal string
Sieve started: 24000000131 < p < 29e9 with 21189 terms (100015 <= length <= 999966) (expecting 166 factors)
p=24068943967, 3.942K p/sec, 0 factors found, 1.4% done. ETC 2018-09-29 22:24
C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>[/CODE]
This behavior persists regardless of whether I use the GPU or not:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>pixsieve -G 1 -D 1 -P29e9 -i e_100k-1M_primecan.txt -o e_100k-1M_primecan.txt
pixsieve v2.5, a program to find factors of substrings of a decimal string
GPU primes per worker is 61440
Sieve started: 24000000131 < p < 29e9 with 21189 terms (100015 <= length <= 999966) (expecting 166 factors)
p=24067958093, 8.058K p/sec, 0 factors found, 1.4% done. ETC 2018-09-29 12:51
C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>[/CODE]

 rogue 2018-09-29 12:24

[QUOTE=Dylan14;497056]It looks like I found another bug in pixsieve. It seems to stop shortly after p=24068943967, which is well short of 2^52:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>pixsieve -W 12 -w 10000 -P29e9 -i e_100k-1M_primecan.txt -o e_100k-1M_primecan.txt
pixsieve v2.5, a program to find factors of substrings of a decimal string
Sieve started: 24000000131 < p < 29e9 with 21189 terms (100015 <= length <= 999966) (expecting 166 factors)
p=24068943967, 3.942K p/sec, 0 factors found, 1.4% done. ETC 2018-09-29 22:24
C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>[/CODE]
This behavior persists regardless of whether I use the GPU or not:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>pixsieve -G 1 -D 1 -P29e9 -i e_100k-1M_primecan.txt -o e_100k-1M_primecan.txt
pixsieve v2.5, a program to find factors of substrings of a decimal string
GPU primes per worker is 61440
Sieve started: 24000000131 < p < 29e9 with 21189 terms (100015 <= length <= 999966) (expecting 166 factors)
p=24067958093, 8.058K p/sec, 0 factors found, 1.4% done. ETC 2018-09-29 12:51
C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>[/CODE][/QUOTE]

IF this is from the latest release, then I know the problem and it will be fixed. I introduced a bug in mtsieve 1.8.0

 pepi37 2018-10-01 07:57

[QUOTE=Dylan14;497056]It looks like I found another bug in pixsieve. It seems to stop shortly after p=24068943967, which is well short of 2^52:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>pixsieve -W 12 -w 10000 -P29e9 -i e_100k-1M_primecan.txt -o e_100k-1M_primecan.txt
pixsieve v2.5, a program to find factors of substrings of a decimal string
Sieve started: 24000000131 < p < 29e9 with 21189 terms (100015 <= length <= 999966) (expecting 166 factors)
p=24068943967, 3.942K p/sec, 0 factors found, 1.4% done. ETC 2018-09-29 22:24
C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>[/CODE]This behavior persists regardless of whether I use the GPU or not:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>pixsieve -G 1 -D 1 -P29e9 -i e_100k-1M_primecan.txt -o e_100k-1M_primecan.txt
pixsieve v2.5, a program to find factors of substrings of a decimal string
GPU primes per worker is 61440
Sieve started: 24000000131 < p < 29e9 with 21189 terms (100015 <= length <= 999966) (expecting 166 factors)
p=24067958093, 8.058K p/sec, 0 factors found, 1.4% done. ETC 2018-09-29 12:51
C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>[/CODE][/QUOTE]

Does you have speed increase when using GPU?

 rogue 2018-10-01 14:49

I have uploaded 1.8.1 which fixes the problem I introduced in 1.8.0.

I modified gfndsieve to use AVX routines, but the performance became much worse so I took that code out.

 Dylan14 2018-10-01 15:44

[QUOTE=pepi37;497171]Does you have speed increase when using GPU?[/QUOTE]

As you can see from the code output, running it on the GPU makes the code run at about 8k primes/sec, whereas the CPU runs it at about 4k primes/sec, so the speed roughly doubles. For reference, the computer I am using to run pixsieve has an Intel Core i7-8750H (6 cores with HT) and a GTX 1050ti.

 pepi37 2018-10-01 19:44

[QUOTE=rogue;497181]I have uploaded 1.8.1 which fixes the problem I introduced in 1.8.0.

I modified gfndsieve to use AVX routines, but the performance became much worse so I took that code out.[/QUOTE]

-s --independent Sieve +1 and -1 independently - again not working: give empty file as output

[QUOTE]d:\MTSIEVE\TWINSIEVE>twinsieve -P1000000000 -k2 -K1000000 -W4 -b2 -n1778899 -r -fA -s
twinsieve v1.0.0, a program to find factors of k*b^n+1/-1 numbers for fixed b and n and variable k
Fatal Error: Can only support ABC format if sieving +1 and -1 independently[/QUOTE]
I specified ABC file as output

 rogue 2018-10-02 22:48

I posted 1.8.2 to fix a crash in twinsieve when using the -s option.

 rogue 2018-10-08 14:10

I posed 1.8.3.

I fixed an issue in twinsieve where it couldn't remove factors from an input file.

I added dmdsieve. "dmd" is short for "Double-Mersenne Divisor". It sieves terms of the form 2*k*M+1 where M is a Mersenee Prime. The remaining terms, if prime, are potential divisors of a Double-Mersenne number. This is 2x to 3x faster than mmpsieve. Luigi will be migrating his [URL="http://www.doublemersennes.org/"]project[/URL] to dmdsieve at some point.

 ET_ 2018-10-08 21:24

[QUOTE=rogue;497629]I posed 1.8.3.

I fixed an issue in twinsieve where it couldn't remove factors from an input file.

I added dmdsieve. "dmd" is short for "Double-Mersenne Divisor". It sieves terms of the form 2*k*M+1 where M is a Mersenee Prime. The remaining terms, if prime, are potential divisors of a Double-Mersenne number. This is 2x to 3x faster than mmpsieve. Luigi will be migrating his [URL="http://www.doublemersennes.org/"]project[/URL] to dmdsieve at some point.[/QUOTE]

The fact is that my MMpsieve still serves me well on Raspberry PIs.

Thank upu very much for your work, Mark. :bow:

 rogue 2018-10-09 02:02

The fact is that my MMpsieve still serves me well on Raspberry PIs.

Thank upu very much for your work, Mark. :bow:[/QUOTE]

If someone can write some ARM assembly, then it could run on those as well.

 pinhodecarlos 2018-10-23 18:01

Mark, need some support to run dmdsieve since nothing happens when I trigger the client with the following flags:

[QUOTE]start /low /min dmdsieve.exe -P 225E12 -i 40_24T.txt -o 40_24T.out -O 40_24T.fact -W 8[/QUOTE] Machine is an ivy bridge, win 7 64 bits.

Even using --help or -h I don't see anything. WIth a DOS windows open nothing happens, with a batch file just vanishes. No crash error...I can't even troubleshoot.

 rogue 2018-10-23 20:38

[QUOTE=pinhodecarlos;498590]Mark, need some support to run dmdsieve since nothing happens when I trigger the client with the following flags:

Machine is an ivy bridge, win 7 64 bits.

Even using --help or -h I don't see anything. WIth a DOS windows open nothing happens, with a batch file just vanishes. No crash error...I can't even troubleshoot.

FYI, all mtsieve threads run with idle/low priority so you don't need to do that.

Are you starting with minp from the input file? If not, you probably want to specify on the command line.

Are you starting with a file output from dmdsieve? The reason is that it won't run if you start with an mmpsieve input file.

If you open a cmd prompt and start from there, what does it output? Does it terminate right away with a message?

If still stuck, please send me a link to the input file.

 pinhodecarlos 2018-10-24 17:50

2 Attachment(s)
[QUOTE=rogue;498606]FYI, all mtsieve threads run with idle/low priority so you don't need to do that.

Are you starting with minp from the input file? If not, you probably want to specify on the command line.

Are you starting with a file output from dmdsieve? The reason is that it won't run if you start with an mmpsieve input file.

If you open a cmd prompt and start from there, what does it output? Does it terminate right away with a message?

If still stuck, please send me a link to the input file.[/QUOTE]

Clint terminates without a message. Input file attached.

[QUOTE]

C:\DC\dmdsieve>dmdsieve

C:\DC\dmdsieve>dmdsieve --help

C:\DC\dmdsieve>dmdsieve -help

C:\DC\dmdsieve>dmdsieve -h

C:\DC\dmdsieve>

[/QUOTE]

 pinhodecarlos 2018-10-24 20:02

Was just wondering if I need net framework turned on since on this machine almost windows services are off. Tried the xyy siever and had the same behaviour, nothing happens.

 rogue 2018-10-24 20:07

[QUOTE=pinhodecarlos;498687]Was just wondering if I need net framework turned on since on this machine almost windows services are off. Tried the xyy siever and had the same behaviour, nothing happens.[/QUOTE]

That is very odd. I build with mingw64 and link libraries as static so you shouldn't need other dlls to run the code. If it needed a dll, it was squawk at you.

Can you install mingw64 on that machine and build?

 pinhodecarlos 2018-10-24 20:40

[QUOTE=rogue;498688]That is very odd. I build with mingw64 and link libraries as static so you shouldn't need other dlls to run the code. If it needed a dll, it was squawk at you.

Can you install mingw64 on that machine and build?[/QUOTE]
I’ll try it this weekend. Thank you.

 ATH 2018-12-19 11:56

Using the precompiled "fbncsieve.exe" v1.3.3 from mtsieve 1.8.3:

The line:
fbncsieve.exe -k 1000000001 -K 2000000000 -s "k*20000038^1+1"

fails with:
Fatal Error: 1771575385*20000038^1+1 mod 200000201 = 11167534

It works for other intervals of k.

 rogue 2018-12-19 14:07

[QUOTE=ATH;503323]Using the precompiled "fbncsieve.exe" v1.3.3 from mtsieve 1.8.3:

The line:
fbncsieve.exe -k 1000000001 -K 2000000000 -s "k*20000038^1+1"

fails with:
Fatal Error: 1771575385*20000038^1+1 mod 200000201 = 11167534

It works for other intervals of k.[/QUOTE]

The problem is that it should have stopped at 200000190 and 200000201 is greater than that value. I'll have to add a check to handle that. The is that it should stop sieving at about sqrt(1771575385*20000038).

 rogue 2018-12-22 17:11

I have posted mtsieve 1.8.4 on the website. It addresses the following items:

[code]
Added the new Mersenne Prime to dmdsieve.
Fixed an issue in twinsieve and fbncsieve where it can exit with an error when
testing primes above sqrt(max term).
Fixed an issue (impacting all sieves) in computing the factor rate. The issue will manifest itself by
outputting a large factor removal rate. It only occurs after running the sieve continuously for 5 days.
[/code]

 rogue 2018-12-23 14:30

I realized that I forgot to fix the link on my page. It is fixed now.

 Dylan14 2019-03-10 01:23

I believe there is a bug with fkbnsieve. I issued the following command to a command prompt:

[CODE]fkbnsieve -W 2 -P 1e9 -c 1 -C 1e6 -s "2*11^75000"[/CODE]which should find factors for numbers of the form 2*11^75000+c for c in the set {1,1e6}. The sieve finishes in a few seconds and generates the following sieve file (saved as k2_n11_n75000+c.pfgw):

[CODE]ABCD 2*11^75000$a [41] // Sieved to 1000000009 +10 +50 +10 +14 +54 +60 +12 +54 +4 +68 [and so on...][/CODE]I then put this file as input to pfgw, and I expect that the first number that it should test is 2*11^75000+41. However, instead I get [CODE]C:\Users\Dylan_000\Desktop\Carol-Kynea\pfgw_win_3.8.3>pfgw64 "k2_b11_n75000+c.pfgw" PFGW Version 3.8.3.64BIT.20161203.Win_Dev [GWNUM 28.6] Recognized ABCD Sieve file: ABCD File PRP: 2*11^7500041 1/25945879 ^C Handler Routine called, shutting down program[/CODE]which is not right. Also it seems like c = 0 is not a valid number for the -c flag, since I get the following message when I replace -c 1 to -c 0 in the first command line: [CODE]Fatal Error: kmin must be specified[/CODE] This is on the last version of mtsieve (v1.8.4).  ATH 2019-03-10 01:58 There is just a + missing in the .pfgw file: ABCD 2*11^75000[COLOR="Red"][SIZE="4"]+[/SIZE][/COLOR]$a [41] // Sieved to 1000000009

 Dylan14 2019-03-10 02:39

[QUOTE=ATH;510524]There is just a + missing in the .pfgw file:

ABCD 2*11^75000[COLOR=Red][SIZE=4]+[/SIZE][/COLOR]$a [41] // Sieved to 1000000009[/QUOTE] That is the ticket. Also I have the fix: in line 283 of FixedKBNApp.cpp change [CODE]fprintf(termsFile, "ABCD %" PRIu64"*%u^%u$a [%" PRId64"] // Sieved to %" PRIu64"\n", il_K, ii_Base, ii_N, c, largestPrime);[/CODE]
to

[CODE]fprintf(termsFile, "ABCD %" PRIu64"*%u^%u+$a [%" PRId64"] // Sieved to %" PRIu64"\n", il_K, ii_Base, ii_N, c, largestPrime);[/CODE] Also, in lines 98, 101 and 104, instead of kmin and kmax, it should be cmin and cmax.  rogue 2019-03-10 14:37 Thanks for the report. I'll fix the code base.  ATH 2019-03-11 17:44 I found a bug in twinsieve, or at least an unspecified limitation. What is the maximum array of k's it should be able to handle? Right now it is 2^32. I tried with 50B which takes up 6.2 GB RAM: [B]twinsieve.exe -b 2 -n 333333 -k 1 -K 5e10 -P 1e9[/B] [CODE]2019-03-11 13:17:56: Sieve started: 1 < p < 1e9 with 50000000000 terms (1 < k < 50000000000, k*2^333333) (expecting 50000000000 factors) 2019-03-11 15:14:39: Sieve completed at p=1000000007. Primes tested 50847534. Found 49903073399 factors. 96926601 terms remaining. Time 6937.09 seconds[/CODE] This first command works fine and it saves the file "k_b2_n333333.pfgw" at P=1e9. But if you resume the sieve from that file to any higher range, the 2nd time it saves this happens: [B]twinsieve.exe -i k_b2_n333333.pfgw -P 2e9[/B] [CODE]2019-03-11 15:49:17: Sieve started: 1000000007 < p < 2e9 with 96926601 terms (375 < k < 49999999854, k*2^333333) (expecting 3137052 factors[/CODE] [I][B]Fatal Error: Something is wrong. Counted terms (90205758) != expected terms (90792073)[/B][/I] The file saved after this bug is now corrupted and if you restart it, this is in the log file: [CODE]2019-03-11 18:31:00: Sieve started: 2000000011 < p < 3e9 with 90205758 terms (375 < k < [COLOR="Red"]4294967654[/COLOR]], k*2^333333) (expecting 1676083 factors)[/CODE] So it is a 32 bit variable issue somewhere. It also tried another exponent and other values of the 1st and 2nd Pmax like 1e11 and 2e11 or 1e12 and 2e12. In the last case the 2nd run is so long that it fails during the run instead of at the end when saving the file again.  rogue 2019-03-11 17:54 I don't see anything obviously wrong in the code. I'll have to debug this.  ATH 2019-03-11 18:59 Here is a file before the bug happens if that helps: [URL="http://hoegge.dk/mersenne/k_b2_n333333.zip"]k_b2_n333333.zip[/URL] (86 MB, 326 MB unpacked, use 7-zip) It is run with: [B]twinsieve.exe -b 2 -n 333333 -K 5e10 -P 1e11[/B] so if you do: [B]twinsieve.exe -i k_b2_n333333.pfgw -P 11e10[/B] the bug happens in ~2 min on 1 core.  rogue 2019-03-11 20:19 Found it. In ProcessInputTermsFile, bit is defined as uint32_t. It should be uint64_t. This bug only affects sieving where k > 2^32 and will fail when writing the output file.  Thomas11 2019-05-20 09:40 I did a quick comparison between twinsieve 1.0.3 and newpgen and noticed that under certain conditions (e.g. pmax > kmin*b^n) twinsieve seems to miss some factors. For example: [B]./twinsieve -b 6 -n 1 -k 1 -K 200000000 -f N[/B] returns 4037923 candidates starting with: [CODE]34649:T:0:6:3 1 1 2 1 3 1 5 1 [COLOR="Red"]6 1[/COLOR] 7 1 ... [/CODE] while [B]./newpgen -v -t=2 -base=6 -n=1 -kmin=1 -kmax=200000000 -wp=6k.txt[/B] yields 4033838 candidates starting with: [CODE]34666:T:1:6:3 1 1 2 1 3 1 4 1 5 1 7 1 ... [/CODE] Obviously, 6*6^1-1 = 35 has been correctly eliminated by newpgen but missed by twinsieve. For larger k (e.g. when pmax < k*b^n) twinsieve and newpgen yield identical results...  rogue 2019-05-21 01:50 I see what is happening, but fixing it will be more challenging. This issue is more likely to occur with small n and small k, but can happen with larger n and larger k.  rogue 2019-05-21 19:19 I have a fix for this. It means that twinsieve will be slightly slower when kmax > p, but should be slightly faster than kmax < p. How deeply one sieves determines how much speed one gains or loses, ut it most likely won't be noticeable. It appears the newpgen output is also wrong in this case because 4*6+1 is divisible by 5 (so 4 shouldn't be in the output) and both 1*6-1 and 1*6-1 are both prime (so 1 should be in the output). The updated twinsieve correctly leaves 1 and removes 4 from the output. fbncsieve has the same problem as twinsieve. newpgen also has the same problem with other fixed k sieves. This issue can only occur if kmin*b^n < pmax.  pepi37 2019-05-21 20:17 [QUOTE=rogue;517400]I have a fix for this. It means that twinsieve will be slightly slower when kmax > p, but should be slightly faster than kmax < p. How deeply one sieves determines how much speed one gains or loses, ut it most likely won't be noticeable. It appears the newpgen output is also wrong in this case because 4*6+1 is divisible by 5 (so 4 shouldn't be in the output) and both 1*6-1 and 1*6-1 are both prime (so 1 should be in the output). The updated twinsieve correctly leaves 1 and removes 4 from the output. fbncsieve has the same problem as twinsieve. newpgen also has the same problem with other fixed k sieves. This issue can only occur if kmin*b^n < pmax.[/QUOTE] Is new twinsieve and fbncsieve online ?  rogue 2019-05-21 21:29 [QUOTE=pepi37;517408]Is new twinsieve and fbncsieve online ?[/QUOTE] It is posted now. You can d/l from [URL="https://mersenneforum.org/rogue/mtsieve.html"]this page.[/URL] This is version 1.9.0 as there are many changes to support srsieve2, which isn't ready yet. Here are the details: [code] Changes were made to the framework to support srsieve2 (which isn't ready yet). No other sieves use thse features (yet). Modify FactorApp in an effort to more accurately compute the factor rate. When starting a new sieve, the factor rate would be inflated because it would calculate the rate based upon all factors removed. This change will exclude factors removed in the the first 30 minutes that the program has run. This logic will be executed when fewer than 60 terms have been removed in the previous hour. Fixed an issue in fbncsieve and twinsieve where the output file would contain composites that are divisible by p that had already been sieved. [/code]  pepi37 2019-05-21 21:54 [QUOTE=rogue;517414]It is posted now. You can d/l from [URL="https://mersenneforum.org/rogue/mtsieve.html"]this page.[/URL] This is version 1.9.0 as there are many changes to support srsieve2, which isn't ready yet. Here are the details: [code] Changes were made to the framework to support srsieve2 (which isn't ready yet). No other sieves use thse features (yet). Modify FactorApp in an effort to more accurately compute the factor rate. When starting a new sieve, the factor rate would be inflated because it would calculate the rate based upon all factors removed. This change will exclude factors removed in the the first 30 minutes that the program has run. This logic will be executed when fewer than 60 terms have been removed in the previous hour. Fixed an issue in fbncsieve and twinsieve where the output file would contain composites that are divisible by p that had already been sieved. [/code][/QUOTE] Link is old [url]http://www.mersenneforum.org/rogue/mtsieve_1.8.4.7z[/url]  rogue 2019-05-22 02:10 [QUOTE=pepi37;517418]Link is old [url]http://www.mersenneforum.org/rogue/mtsieve_1.8.4.7z[/url][/QUOTE] Are you sure? I see 1.9.0  rogue 2019-05-24 16:27 I have done some very limited tests with srsieve2. Here are some numbers comparing srsieve to srsieve2: [code] srsieve -n25000 -N50000 -P1e8 -m1e8 r56.in srsieve 1.1.4 -- A sieve for integer sequences in n of the form k*b^n+c. Read 200 sequences from input file r56.in'. srsieve started: 25000 <= n <= 50000, 3 <= p <= 100000000 Split 200 base 3 sequences into 1471 base 3^24 subsequences. Sieving 3 <= p <= 100000000 eliminated 4838822 terms, 161378 remain. Wrote [COLOR="Red"]161378 [/COLOR] terms for 200 sequences to srsieve format file srsieve.out'. srsieve stopped: at p=100000000 because --pmax was reached. Processor time: [COLOR="red"]555.30 sec[/COLOR][/code] [code] srsieve2 -n25000 -N50000 -P1e8 -fA -sr56.in srsieve2 v2.0.0, a program to find factors of k*b^n+c numbers for fixed b and variable k and n Sieve started: 2 < p < 1e8 with 5000200 terms (25000 < n < 50000, k*3^n+c) (expecting 4812049 factors) Split 200 base 3 sequences into 1470 base 3^24 sequences. Sieve completed at p=100000007. Processor time: 340.83 sec. (0.00 sieving) (1.00 cores) 161378 terms written to b3_n.pfgw Primes tested: 4761456. Factors found: 4838822. Remaining terms: [COLOR="red"]161378[/COLOR]. Time: [COLOR="red"]341.24 seconds[/COLOR]. [/code] srsieve2 is nearly 40% faster than srsieve for this range. :w00t: I do not know why there is a different number of subsequences, but I will look into that. It doesn't seem to be impacting the results. I have not incorporated the logic from sr1sieve or sr2sieve into it yet. I really want to focus on making sure this code is solid before I start working on that. I will release the code "as is" once I feel confident in what I've written. I have to run more tests before I release it. To help me in my testing, could people send me (via PM) sequences that they would like me to run my tests with? Whether it is one sequence or a thousand, I don't care. I will limit the upper bound of sieving based upon the sequences. The key to the testing is ti compare the outputs and times between the two programs.  rogue 2019-05-24 20:15 Here is a comparison between sr2sieve and srsieve2: [code]sr2sieve -p1e7 -P4e7 -q -i sr_3.abcd sr2sieve 2.0.0 -- A sieve for multiple sequences k*b^n+/-1 or b^n+/-k. Read 2489826 terms for 1007 sequences from ABCD format file sr_3.abcd'. Split 1007 base 3 sequences into 7082 base 3^12 subsequences. Expecting to find factors for about 197186.63 terms in this range. sr2sieve 2.0.0 started: 25000 <= n <= 50000, 10000000 <= p <= 40000000 p=35035009, 95979 p/sec, 179938 factors, 83.5% done, 0 sec/factor, ETA 24 May 14:53 sr2sieve 2.0.0 stopped: at p=40000000 because range is complete. Found factors for [COLOR="red"]197251 [/COLOR]terms in [COLOR="Red"]513.223 [/COLOR]sec. (expected about 197186.63)[/code] [code]srsieve2 -ib3_n.pfgw -ob3.out -p1e7 -P4e7 srsieve2 v2.0.0, a program to find factors of k*b^n+c numbers for fixed b and variable k and n Split 1007 base 3 sequences into 3028 base 3^4 sequences. Sieve started: 1e7 < p < 4e7 with 2489826 terms (25000 < n < 50000, k*3^n+c) (expecting 197187 factors) p=26274431, 4.040K p/sec, 141072 factors found at 435.4 f/sec, 54.2% done. ETC 2019-05-24 15:01 Sieve completed at p=40000003. Processor time: 441.67 sec. (0.03 sieving) (1.00 cores) 2292575 terms written to b3.out Primes tested: 1769076. Factors found: [COLOR="red"]197251[/COLOR]. Remaining terms: 2292575. Time: [COLOR="red"]439.72[/COLOR] seconds.[/code] Note that the above run of sr2sieve is using Legendre tables and srsieve2 does not use Legendre tables. The extra time for sr2sieve is the time needed to build the Legendre tables. The speeds are actually much closer (well under 10%) if one excludes that time. sr2sieve without Legendre tables is much slower than srsieve2. I will need to run more varied ranges to verify that. If that proves to be true, then that limits the code I need to copy from sr2sieve to srsieve2. srsieve2 will automatically build Legendre tables when p > max(k, n, c) (but only if max(k, n, c) < 2^32). I'll add an option to not build them when I get there.  rogue 2019-05-24 23:30 I forgot that I had mixe FPU and SSE code for testing. Switching to SSE only, the numbers look even better: [CODE]Primes tested: 1769076. Factors found: [COLOR="Red"]197251[/COLOR]. Remaining terms: 2292575. Time: [COLOR="Red"]341.86[/COLOR] seconds.[/CODE] It is possible that srsieve2 is now faster than sr2sieve even with Legendre symbols. That will verified with more testing.  hansl 2019-06-11 23:12 I built this on Linux, but couldn't figure out how to get it to link with OpenCL, so I ended up settings "ENABLE_GPU=no". Also had this build error which forced me to remove srsieve2 from the list of programs in the makefile, after which I was able to build: [code] make: *** No rule to make target 'srsieve2', needed by 'all'. Stop. [/code] Also the "f/sec" or "sec per factor" calculation seems buggy (for psieve at least) I got this line at one point [code]p=10519166057, 3.179K p/sec, 140559 factors found at 15.29 sec per factor, 0.0% done. ETC 4219-12-25 02:25[/code] Then later in the same run: [code]p=36020724671, 3.132K p/sec, 150902 factors found at 7.623 f/sec, 0.0% done. ETC 3946-08-09 02:00[/code] Finally after Ctrl-c: [code]Primes tested: 1552746720. Factors found: 150913. Remaining terms: 191421. Time: 487670.27 seconds.[/code] So it seems the overall timing should have been 487670.27 / 150913 ~= 3.23 sec per factor  hansl 2019-06-11 23:53 Another note (*emphasis mine) [quote=https://mersenneforum.org/rogue/mtsieve.html] This is the sieveing source from primesieve 6.3, a library whose sole purpose is to generate a list of primes as quickly as possible. [b]Per the primsieve license, no changes should be made to this code.[/b] [/quote] I found this statement odd and it made me curious enough to look up the license being used by primesieve: [url]https://github.com/kimwalisch/primesieve/blob/master/COPYING[/url] It seems to me that modification is 100% ok, as far as licensing is concerned. However that "COPYING" file should probably be included in your "sieve" directory(if not your top level), especially since all the code comments make reference to it as such.  rogue 2019-06-12 12:53 srsieve2 is still a "work in progress". It is not officially released yet. The calculation of the factoring rate is rather complex. The first few minutes that the sieve is running significantly skew that rate so the code tries to avoid using data from the first few minutes in the calculation. That being written, I'm sure there is more room for improvement. Anyone is welcome to submit suggestions for improvement. I put a copy of COPYING into the folder with the primesieve code.  hansl 2019-06-12 18:24 Question about using gfndsieve: how do you determine a good pmax -P setting? At what point is it optimal to move over to PFGW?  pepi37 2019-06-12 18:30 [QUOTE=hansl;519200]Question about using gfndsieve: how do you determine a good pmax -P setting? At what point is it optimal to move over to PFGW?[/QUOTE] I think as any other sieve: when removal rate is lower then processed rate from PFGW  rogue 2019-06-12 18:54 [QUOTE=pepi37;519201]I think as any other sieve: when removal rate is lower then processed rate from PFGW[/QUOTE] Correct. Assuming that the range being sieved has all terms of relatively the same size (within 20% the number of bits), then use pfgw to do a PRP test on one of the terms. You want the factoring rate to be close to that time. Of course if any of the mtsieve programs is outputting bad factoring rates, that can be a problem.  hansl 2019-06-14 04:14 [QUOTE=hansl;519151]I built this on Linux, but couldn't figure out how to get it to link with OpenCL, so I ended up settings "ENABLE_GPU=no". [/QUOTE] Well I feel a little silly to say this, but all I had to do was add "OPENCL_LIBS=-lOpenCL" in the makefile and that got it working. I guess I was previously assuming that the makefile was already set up for this and that I just hadn't installed the correct library/package for it to work. So I have been testing out GPU capability in gfndsieve, and as was mentioned earlier in the thread by pepi37, it doesn't do much. I have been trying a bunch of different settings combinations to see if any particular setup is more efficient. Starting at p=3 I don't see any noticeable load, but it does seem to increase with larger p. So trying pmin=2^34 and pmax=2^35 just as a benchmark, I see 60-75% load on my laptop's Quadro M1000M. Not sure if its really doing more work or just dealing with much more overhead in some way. Nothing I did to try tuning -G or -g at this point would max the load though. Its difficult to measure what optimal settings are, since the CPU throughput dwarfs the GPU, so maybe its a moot point to try tuning at this stage, but would it be possible to support -W0 when -G is nonzero to make GPU-only tuning more testable? Anyways I don't know a whole lot about optimizing OpenCL or CUDA configurations, but I'm wondering if there's a general rule of thumb for setting -G and -g? Does it make most sense to set -G equal to the number of "Compute Units" aka "Streaming Multiprocessors"? Maybe add 1 or 2 to help keep the work queue filled or does that not help? Then I guess set -g to whatever still fits comfortably in GPU memory? Here's a portion of output from "clinfo" for what its worth. [code] Device Name Quadro M1000M Device Vendor NVIDIA Corporation Device Vendor ID 0x10de Device Version OpenCL 1.2 CUDA Driver Version 418.39 Device OpenCL C Version OpenCL C 1.2 Device Type GPU Device Topology (NV) PCI-E, 01:00.0 Device Profile FULL_PROFILE Device Available Yes Compiler Available Yes Linker Available Yes Max compute units 4 Max clock frequency 1071MHz Compute Capability (NV) 5.0 Device Partition (core) Max number of sub-devices 1 Supported partition types None Max work item dimensions 3 Max work item sizes 1024x1024x64 Max work group size 1024 Preferred work group size multiple 32 Warp size (NV) 32 Preferred / native vector sizes char 1 / 1 short 1 / 1 int 1 / 1 long 1 / 1 half 0 / 0 (n/a) float 1 / 1 double 1 / 1 (cl_khr_fp64) [/code] The GPU has 512 total "cuda cores" by the way, since clinfo doesn't seem to provide that number in its output anywhere.  rogue 2019-06-14 12:55 I could allow for -W0, but some sieves have other constraints which require a minimum p before using the GPU. It is certainly possible that someone could write better OpenCL code than I. Some sieves will see a noticeable gain when using the GPU and others will not.  pepi37 2019-06-14 14:28 And I have suggestion why this project is in this phase. Revert measure of speed like was in sr1sieve or sr2sieve. Number of tested primes is less important then sieve depth. Also sieve depth show me immediately how sieve is deep, number of tested primes show me nothing. And when person do sieve, only important thing is sieve depth.  rogue 2019-06-14 15:37 [QUOTE=pepi37;519306]And I have suggestion why this project is in this phase. Revert measure of speed like was in sr1sieve or sr2sieve. Number of tested primes is less important then sieve depth. Also sieve depth show me immediately how sieve is deep, number of tested primes show me nothing. And when person do sieve, only important thing is sieve depth.[/QUOTE] It shows the sieve depth and the rate. I do not understand the request.  rogue 2019-06-18 12:30 I have posted 1.9.2. Here are the changes: [LIST][*]Split makefile so only GPU-enabled code will compile and link with OpenCL libraries with intention of a single makefile in the future as having two nearly identical makefiles is difficult to maintain.[*]Made changes to the framework to support sieving in chunks as needed by gfndsieve and dmdsieve. [*]Added -x and -X switches to gfndsieve. With these switches one can execute Fermat divisibility checks after sieving.[*]Allow gfndsieve to sieve smaller n, but report if k*2^n+1 is a prime in the range being sieved. It will not report if k*2^n+1 is prime when k*2^n+1 > maxp, but less than maxp^2[*]Added -x and -X switches to dmdsieve. With these switches one can execute MMP divisibility checks after sieving.[/LIST] With these changes gmp-fermat and gmp-double-mersenne are obsolete. The changes to gfndsieve and dmdsieve make them at least 50% faster than the aforementioned programs. Although the srsieve2 code is included, it won't compile right now. I was in the middle of some refactoring when the changes above became higher priority. I'm out of town for two weeks, but hope to have time to get the srsieve pieces compiled and working again, which shouldn't be too hard. The sr2sieve/sr1sieve pieces need a lot more work.  KEP 2019-06-22 10:26 [QUOTE=rogue;519494]Although the srsieve2 code is included, it won't compile right now. I was in the middle of some refactoring when the changes above became higher priority. I'm out of town for two weeks, but hope to have time to get the srsieve pieces compiled and working again, which shouldn't be too hard. The sr2sieve/sr1sieve pieces need a lot more work.[/QUOTE] Could I ask, that the needed .dll files will be included in the mtsieve download file at sourceforge? It is not a high priority case, but eventually once sr1sieve and sr2sieve is implemented in the srsieve2 code, I most definently would like to use mtsieve on the Xeon. However the Xeon does not have the opencl environment installed and since the machine is not mine personally, it will not have opencl installed - hence mtsieve complaints about missing .dll files. What I´m asking is like we see it in the Prime95 fileset, a download file where all files needed to run mtsieve is in one file and a file where I do not have to go to unclear websites and retrieve a potentially bad .dll file - thank you.  rogue 2019-06-22 12:14 [QUOTE=KEP;519808]Could I ask, that the needed .dll files will be included in the mtsieve download file at sourceforge? It is not a high priority case, but eventually once sr1sieve and sr2sieve is implemented in the srsieve2 code, I most definently would like to use mtsieve on the Xeon. However the Xeon does not have the opencl environment installed and since the machine is not mine personally, it will not have opencl installed - hence mtsieve complaints about missing .dll files. What I´m asking is like we see it in the Prime95 fileset, a download file where all files needed to run mtsieve is in one file and a file where I do not have to go to unclear websites and retrieve a potentially bad .dll file - thank you.[/QUOTE] I assume you are referring to the OpenCL dlls. I will be updating the makefile so that the sieves not using OpenCL do not rely on them. As for the ones that do, I'll see what i can do.  KEP 2019-06-23 06:53 [QUOTE=rogue;519814]I assume you are referring to the OpenCL dlls. I will be updating the makefile so that the sieves not using OpenCL do not rely on them. As for the ones that do, I'll see what i can do.[/QUOTE] That is correct. I noticed that the k*fixed(b)^fixed(n)+/-c used the openCL dlls, but is srsieve2 once fully developed doesn't need the dlls, then I sure want be doing anything for years that would need the dlls - however they would be nice to have in the future since fbncsieve is very much faster compared to NewPGen and that would be nice to have in case I decide to start untested ranges in the future :smile: Thanks for your effort :smile:  mathwiz 2019-06-23 18:04 How does one compile mtsieve on Linux? After downloading and extracting with "7za x", I get a ton of linker errors: [code]$ make -f makefile.nogpu
g++ -Isieve -m64 -Wall -O2 -std=c++11 -lstdc++ -o afsieve core/App.o core/FactorApp.o core/AlgebraicFactorApp.o core/Clock.o core/Parser.o core/Worker.o core/HashTable.o core/main.o core/SharedMemoryItem.o sieve/Erat.o sieve/EratBig.o sieve/EratMedium.o sieve/EratSmall.o sieve/PreSieve.o sieve/CpuInfo.o sieve/MemoryPool.o sieve/PrimeGenerator.o sieve/PrimeSieve.o sieve/Wheel.o sieve/IteratorHelper.o sieve/popcount.o sieve/nthPrime.o sieve/PrintPrimes.o sieve/ParallelSieve.o sieve/iterator.o sieve/api.o sieve/SievingPrimes.o x86_asm/fpu_mod_init_fini.o x86_asm/fpu_push_pop.o x86_asm/fpu_mulmod.o x86_asm/fpu_powmod.o x86_asm/fpu_powmod_4b_1n_4p.o x86_asm/fpu_mulmod_iter.o x86_asm/fpu_mulmod_iter_4a.o x86_asm/fpu_mulmod_4a_4b_4p.o x86_asm/sse_mod_init_fini.o x86_asm/sse_powmod_4b_1n_4p.o x86_asm/sse_mulmod_4a_4b_4p.o x86_asm/avx_set_a.o x86_asm/avx_set_b.o x86_asm/avx_get.o x86_asm/avx_compute_reciprocal.o x86_asm/avx_compare.o x86_asm/avx_mulmod.o x86_asm/avx_powmod.o x86_asm/sse_powmod_4b_1n_4p_mulmod_1k.o alternating_factorial/AlternatingFactorialApp.o alternating_factorial/AlternatingFactorialWorker.o alternating_factorial/afsieve.o -lpthread
core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTSSt9exception[_ZTSSt9exception]+0x0): multiple definition of typeinfo name for std::exception' core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTISt9exception[_ZTISt9exception]+0x0): multiple definition of typeinfo for std::exception'
core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTSSt13runtime_error[_ZTSSt13runtime_error]+0x0): multiple definition of typeinfo name for std::runtime_error' core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTISt13runtime_error[_ZTISt13runtime_error]+0x0): multiple definition of typeinfo for std::runtime_error'
sieve/PrimeSieve.o:PrimeSieve.cpp:(.text$_ZNKSt5ctypeIcE8do_widenEc[_ZNKSt5ctypeIcE8do_widenEc]+0x0): multiple definition of std::ctype<char>::do_widen(char) const' ... alternating_factorial/AlternatingFactorialApp.o:AlternatingFactorialApp.cpp:(.text$_ZNSt6vectorIbSaIbEE14_M_fill_insertESt13_Bit_iteratoryb[_ZNSt6vectorIbSaIbEE14_M_fill_insertESt13_Bit_iteratoryb]+0x328): undefined reference to operator new(unsigned long long)'
alternating_factorial/AlternatingFactorialWorker.o:AlternatingFactorialWorker.cpp:(.text$_ZN26AlternatingFactorialWorkerD0Ev[_ZN26AlternatingFactorialWorkerD0Ev]+0x25): undefined reference to operator delete(void*, unsigned long long)' core/App.o:App.cpp:(.xdata+0x14): undefined reference to __gxx_personality_seh0' core/App.o:App.cpp:(.xdata+0xd8): undefined reference to __gxx_personality_seh0' core/FactorApp.o:FactorApp.cpp:(.xdata+0x48): undefined reference to __gxx_personality_seh0' core/FactorApp.o:FactorApp.cpp:(.xdata+0x78): undefined reference to __gxx_personality_seh0' core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.xdata+0x58): undefined reference to __gxx_personality_seh0' core/Worker.o:Worker.cpp:(.xdata+0x20): more undefined references to __gxx_personality_seh0' follow[/code] I have: [code]$ g++ --version
g++ (Debian 7.3.0-18) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.[/code]

 hansl 2019-06-23 20:00

[code]$make -f makefile.nogpu g++ -Isieve -m64 -Wall -O2 -std=c++11 -lstdc++ -o afsieve core/App.o core/FactorApp.o core/AlgebraicFactorApp.o core/Clock.o core/Parser.o core/Worker.o core/HashTable.o core/main.o core/SharedMemoryItem.o sieve/Erat.o sieve/EratBig.o sieve/EratMedium.o sieve/EratSmall.o sieve/PreSieve.o sieve/CpuInfo.o sieve/MemoryPool.o sieve/PrimeGenerator.o sieve/PrimeSieve.o sieve/Wheel.o sieve/IteratorHelper.o sieve/popcount.o sieve/nthPrime.o sieve/PrintPrimes.o sieve/ParallelSieve.o sieve/iterator.o sieve/api.o sieve/SievingPrimes.o x86_asm/fpu_mod_init_fini.o x86_asm/fpu_push_pop.o x86_asm/fpu_mulmod.o x86_asm/fpu_powmod.o x86_asm/fpu_powmod_4b_1n_4p.o x86_asm/fpu_mulmod_iter.o x86_asm/fpu_mulmod_iter_4a.o x86_asm/fpu_mulmod_4a_4b_4p.o x86_asm/sse_mod_init_fini.o x86_asm/sse_powmod_4b_1n_4p.o x86_asm/sse_mulmod_4a_4b_4p.o x86_asm/avx_set_a.o x86_asm/avx_set_b.o x86_asm/avx_get.o x86_asm/avx_compute_reciprocal.o x86_asm/avx_compare.o x86_asm/avx_mulmod.o x86_asm/avx_powmod.o x86_asm/sse_powmod_4b_1n_4p_mulmod_1k.o alternating_factorial/AlternatingFactorialApp.o alternating_factorial/AlternatingFactorialWorker.o alternating_factorial/afsieve.o -lpthread core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTSSt9exception[_ZTSSt9exception]+0x0): multiple definition of typeinfo name for std::exception'
core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTISt9exception[_ZTISt9exception]+0x0): multiple definition of typeinfo for std::exception' core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTSSt13runtime_error[_ZTSSt13runtime_error]+0x0): multiple definition of typeinfo name for std::runtime_error'
core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.rdata$_ZTISt13runtime_error[_ZTISt13runtime_error]+0x0): multiple definition of typeinfo for std::runtime_error' sieve/PrimeSieve.o:PrimeSieve.cpp:(.text$_ZNKSt5ctypeIcE8do_widenEc[_ZNKSt5ctypeIcE8do_widenEc]+0x0): multiple definition of std::ctype<char>::do_widen(char) const'
...
alternating_factorial/AlternatingFactorialApp.o:AlternatingFactorialApp.cpp:(.text$_ZNSt6vectorIbSaIbEE14_M_fill_insertESt13_Bit_iteratoryb[_ZNSt6vectorIbSaIbEE14_M_fill_insertESt13_Bit_iteratoryb]+0x328): undefined reference to operator new(unsigned long long)' alternating_factorial/AlternatingFactorialWorker.o:AlternatingFactorialWorker.cpp:(.text$_ZN26AlternatingFactorialWorkerD0Ev[_ZN26AlternatingFactorialWorkerD0Ev]+0x25): undefined reference to operator delete(void*, unsigned long long)'
core/App.o:App.cpp:(.xdata+0x14): undefined reference to __gxx_personality_seh0'
core/App.o:App.cpp:(.xdata+0xd8): undefined reference to __gxx_personality_seh0'
core/FactorApp.o:FactorApp.cpp:(.xdata+0x48): undefined reference to __gxx_personality_seh0'
core/FactorApp.o:FactorApp.cpp:(.xdata+0x78): undefined reference to __gxx_personality_seh0'
core/AlgebraicFactorApp.o:AlgebraicFactorApp.cpp:(.xdata+0x58): undefined reference to __gxx_personality_seh0'
core/Worker.o:Worker.cpp:(.xdata+0x20): more undefined references to `__gxx_personality_seh0' follow[/code]

I have:

[code]$g++ --version g++ (Debian 7.3.0-18) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.[/code][/QUOTE] Run "make -f makefile.nogpu clean" first  rogue 2019-06-23 20:37 The most likely issue is the version of gcc you are using. Can you update it?  henryzz 2019-06-23 21:25 Is it linking to gmp and gmpxx? I am a bit surprised there is no -lgmp or -lgmpxx on that g++ line  rogue 2019-06-23 23:39 [QUOTE=henryzz;519924]Is it linking to gmp and gmpxx? I am a bit surprised there is no -lgmp or -lgmpxx on that g++ line[/QUOTE] Only dmdsieve and gfndsieve require gmp.  mathwiz 2019-07-01 21:19 [QUOTE=rogue;519494]I have posted 1.9.2. Here are the changes: With these changes gmp-fermat and gmp-double-mersenne are obsolete. The changes to gfndsieve and dmdsieve make them at least 50% faster than the aforementioned programs.[/QUOTE] The table at [url]http://www.fermatsearch.org/productivity.html[/url] still shows GMP-Fermat as significantly faster than gfndsieve+pfgw for n <= 1000. Is this accurate, or does the table need to be updated?  ET_ 2019-07-02 10:52 [QUOTE=mathwiz;520490]The table at [url]http://www.fermatsearch.org/productivity.html[/url] still shows GMP-Fermat as significantly faster than gfndsieve+pfgw for n <= 1000. Is this accurate, or does the table need to be updated?[/QUOTE] Mike, Gary and I are working on a possible benchmarking suite, as there are just too many variables in play while trying to define the efficiency of each program before all the others. In other words, the benchmark page gives a rough idea of the efficiency, but should not be taken as liquid gold.  ET_ 2019-07-02 10:54 [QUOTE=ET_;520525]Mike, Gary and I are working on a possible benchmarking suite, as there are just too many variables in play while trying to define the efficiency of each program before all the others. In other words, the benchmark page gives a rough idea of the efficiency, but should not be taken as liquid gold.[/QUOTE] Just as example, gfndsieve is faster than GMP-Fermat, but GMP-Fermat can work on larger gaps than gfndsieve at once.  rogue 2019-07-02 13:58 [QUOTE=mathwiz;520490]The table at [url]http://www.fermatsearch.org/productivity.html[/url] still shows GMP-Fermat as significantly faster than gfndsieve+pfgw for n <= 1000. Is this accurate, or does the table need to be updated?[/QUOTE] It is accurate. The problem is the overhead added by pfgw really hurts throughput for smaller n.  rogue 2019-07-02 13:59 [QUOTE=ET_;520526]Just as example, gfndsieve is faster than GMP-Fermat, but GMP-Fermat can work on larger gaps than gfndsieve at once.[/QUOTE] What do you mean by "larger gaps"?  ET_ 2019-07-02 14:17 [QUOTE=rogue;520547]What do you mean by "larger gaps"?[/QUOTE] Gaps that make gfndsieve memory dump.  rogue 2019-07-02 14:42 [QUOTE=ET_;520550]Gaps that make gfndsieve memory dump.[/QUOTE] Are you referring to cases where -X is too large? As long as -X is reasonably set, gnfdsieve should not crash.  ET_ 2019-07-02 14:59 [QUOTE=rogue;520557]Are you referring to cases where -X is too large? As long as -X is reasonably set, gnfdsieve should not crash.[/QUOTE] No, the dump happened with the -x switch (not -X), small N and a very large k range  rogue 2019-07-02 15:41 [QUOTE=ET_;520561]No, the dump happened with the -x switch (not -X), small N and a very large k range[/QUOTE] -X defaults to 1e10, so it will take slightly over 1 GB of memory to run. If you use -X to set to a smaller value, will it run? If not, please let me know the range for k and n. Maybe there is a different bug that needs to be fixed.  ET_ 2019-07-02 16:43 [QUOTE=rogue;520567]-X defaults to 1e10, so it will take slightly over 1 GB of memory to run. If you use -X to set to a smaller value, will it run? If not, please let me know the range for k and n. Maybe there is a different bug that needs to be fixed.[/QUOTE] [code] ./gfndsieve -n 120 -N 121 -k 1200000000000000 -K 1300000000000000 -P 1e9 -x gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n Errore di segmentazione (core dump creato) [/code]  rogue 2019-07-02 17:56 [QUOTE=ET_;520575][code] ./gfndsieve -n 120 -N 121 -k 1200000000000000 -K 1300000000000000 -P 1e9 -x gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n Errore di segmentazione (core dump creato) [/code][/QUOTE] I found a bug in the code and will be fixed in the next release. For now sieve a single n at a time instead of multiple n.  ET_ 2019-07-02 18:07 [QUOTE=rogue;520580]I found a bug in the code and will be fixed in the next release. For now sieve a single n at a time instead of multiple n.[/QUOTE] Thank you Mike .  Dylan14 2019-07-25 02:19 I found a bug for xyyxsieve. When testing for the + form (ie x^y + y^x) the header it spits out in the output file is [CODE]ABC$a^$b$c$b^$a[/CODE]which looks right, however when pfgw is used to test this, it yields the following, for example:

[CODE]105^1828+11828^105[/CODE]which comes from the line

[CODE]105 1828 +1[/CODE]in the file. However, the actual number that should be tested is 105^1828+1828^105. So the header is incorrect. This can be fixed (I think) by changing line 324 of XYYXApp.cpp from

[CODE]fprintf(fPtr, "ABC $a^$b$c$b^$a // Sieved to %" PRIu64"\n", largestPrime);[/CODE]to [CODE]fprintf(fPtr, "ABC$a^$b$c*$b^$a // Sieved to %" PRIu64"\n", largestPrime);[/CODE]
If it helps with debugging, the command line I used was xyyxsieve -P 1e8 -W 12 -s + -x 100 -X 200 -y 1000 -Y 2000 -o test.

 rogue 2019-07-25 13:15

[QUOTE=Dylan14;522260]I found a bug for xyyxsieve. When testing for the + form (ie x^y + y^x) the header it spits out in the output file is

[CODE]ABC $a^$b$c$b^$a[/CODE]which looks right, however when pfgw is used to test this, it yields the following, for example: [CODE]105^1828+11828^105[/CODE]which comes from the line [CODE]105 1828 +1[/CODE]in the file. However, the actual number that should be tested is 105^1828+1828^105. So the header is incorrect. This can be fixed (I think) by changing line 324 of XYYXApp.cpp from [CODE]fprintf(fPtr, "ABC$a^$b$c$b^$a // Sieved to %" PRIu64"\n", largestPrime);[/CODE]to

[CODE]fprintf(fPtr, "ABC $a^$b$c*$b^$a // Sieved to %" PRIu64"\n", largestPrime);[/CODE] If it helps with debugging, the command line I used was xyyxsieve -P 1e8 -W 12 -s + -x 100 -X 200 -y 1000 -Y 2000 -o test.[/QUOTE] Thanks for the report. I'll fix it.  rogue 2019-07-26 00:25 I am releasing mtsieve 1.9.3. Here are the changes: [list][*]Re-implemented a single makefile. It will now build separate exes for OpenCL enabled binaries.[*]Fix ABC format line in xyyxsieve output file.[*]Adjust reported factoring rate to account for less than 1 full CPU or more than 1 full CPU.[*]Handle race condition that can trigger an infinite loop.[*]Allow the first chunk to be smaller so that a rebuild of terms can be triggered earlier.[*]srsieve2 will compile, but requires more testing and only has srsieve functions.[/list] I haven't seen any issues with srsieve2. Of course that doesn't mean that there aren't any. Please run alongside srsieve/sr2sieve if you use it. For most bases it is about 40% faster than srsieve, but for others it is a wash. I'm not certain why, but I suspect it has something to do with cache hits and misses.  Gary 2019-08-04 22:19 Mark, I am doing some benchmarking of gfndsieve (mtsieve 1.9.3) with various values of N. When I run a range of K that is greater than the default -X size, the program seems to go into an infinite loop. See below. At the point that it prints "Sieve started" the second time, the CPU utilization shown by top drops from ~100% to <1%. Not sure if this is related to the problem reported by Luigi or not. If I add -X 2e10 it works correctly, so for now I have a workaround at the cost of more memory. Also a suggestion: When using -x, would it be possible for gfndsieve to set the default pmax value as a function of N so as to minimize the total runtime? Currently I am just guessing at the best pmax for each N based on some testing at N = 1000. The optimal pmax there is about 5e9, which is much less than the current default of 2^62. Thanks! [code] Omen-Linux: /usr/bin/time gfndsieve -n 29 -N 29 -k 50000000000000001 -K 50000020000000000 -x -W 1 -P 50000000 gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n Sieve started: 3 < p < 5e7 with 10000000000 terms (50000000000000001 <= k <= 50000010000000002, 29 <= n <= 29, k*2^n+1) (expecting 9380279109 factors) p=419, 1.321 p/sec, 4084567559 factors found at 66.29M f/sec, 0.0% done. ETC 2019-10-28 09:46 p=255917, 367.8 p/sec, 4549217009 factors found at 37.09M f/sec, 0.5% done. ETC 2019-08-04 19:48 Sieve completed at p=50000047. Processor time: 165.37 sec. (0.01 sieving) (1.00 cores) Primes tested: 3001136. Factors found: 4683516745. Remaining terms: 5316483255. Time: 165.21 seconds. Tested 37.76 pct of range at 61901906 terms per second (53.16 pct terms passed sieving) Tested 50.00 pct of range at 40816326 terms per second (53.16 pct terms passed sieving) Sieve started: 3 < p < 5e7 with 4999999999 terms (50000010000000002 <= k <= 50000019999999999, 29 <= n <= 29, k*2^n+1) (expecting 4690139554 factors) p=50000047, 49.30K p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:16 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:17 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:18 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:19 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:20 ... never ends ... [/code]  rogue 2019-08-05 01:59 [QUOTE=Gary;523093]Mark, I am doing some benchmarking of gfndsieve (mtsieve 1.9.3) with various values of N. When I run a range of K that is greater than the default -X size, the program seems to go into an infinite loop. See below. At the point that it prints "Sieve started" the second time, the CPU utilization shown by top drops from ~100% to <1%. Not sure if this is related to the problem reported by Luigi or not. If I add -X 2e10 it works correctly, so for now I have a workaround at the cost of more memory. Also a suggestion: When using -x, would it be possible for gfndsieve to set the default pmax value as a function of N so as to minimize the total runtime? Currently I am just guessing at the best pmax for each N based on some testing at N = 1000. The optimal pmax there is about 5e9, which is much less than the current default of 2^62. Thanks! [code] Omen-Linux: /usr/bin/time gfndsieve -n 29 -N 29 -k 50000000000000001 -K 50000020000000000 -x -W 1 -P 50000000 gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n Sieve started: 3 < p < 5e7 with 10000000000 terms (50000000000000001 <= k <= 50000010000000002, 29 <= n <= 29, k*2^n+1) (expecting 9380279109 factors) p=419, 1.321 p/sec, 4084567559 factors found at 66.29M f/sec, 0.0% done. ETC 2019-10-28 09:46 p=255917, 367.8 p/sec, 4549217009 factors found at 37.09M f/sec, 0.5% done. ETC 2019-08-04 19:48 Sieve completed at p=50000047. Processor time: 165.37 sec. (0.01 sieving) (1.00 cores) Primes tested: 3001136. Factors found: 4683516745. Remaining terms: 5316483255. Time: 165.21 seconds. Tested 37.76 pct of range at 61901906 terms per second (53.16 pct terms passed sieving) Tested 50.00 pct of range at 40816326 terms per second (53.16 pct terms passed sieving) Sieve started: 3 < p < 5e7 with 4999999999 terms (50000010000000002 <= k <= 50000019999999999, 29 <= n <= 29, k*2^n+1) (expecting 4690139554 factors) p=50000047, 49.30K p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:16 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:17 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:18 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:19 p=50000047, 0.000 p/sec, no factors found, 100.0% done. ETC 2019-08-04 13:20 ... never ends ... [/code][/QUOTE] Thanks for the bug report. I'll take a look. It will probably be something really simple. To limit pmax based upon nmax would require a table. If someone could come up with a list mapping n to p, that would save me a lot of time.  Gary 2019-08-05 06:33 [QUOTE]To limit pmax based upon nmax would require a table. If someone could come up with a list mapping n to p, that would save me a lot of time.[/QUOTE] I can test several of the Ns in the FermatSearch Productivity table and determine a ball-park optimal value of pmax. Will take a few days.  rogue 2019-08-05 15:28 I tracked down the problem. Do you need the fix?  Gary 2019-08-07 04:23 [QUOTE=rogue;523145]I tracked down the problem. Do you need the fix?[/QUOTE] It's not urgent. I can wait for the next release. I have determined the optimal pmax for n from 40 to 10k, and have a run going now for up to 100k. I should be able to send you a table in a day or so, then maybe that and the fix could be the next release.  rogue 2019-08-07 16:29 [QUOTE=Gary;523257]It's not urgent. I can wait for the next release. I have determined the optimal pmax for n from 40 to 10k, and have a run going now for up to 100k. I should be able to send you a table in a day or so, then maybe that and the fix could be the next release.[/QUOTE] Sounds good. Thanks for your contribution.  Gary 2019-08-11 14:48 Here are the optimal pmax values I found for various values of n: [CODE] n pmax 40 3e06 60 1e08 80 1e09 100 1e09 150 1e09 200 1e09 300 3e09 400 3e09 600 1e10 800 1e10 1000 1e10 2000 1e10 3000 1e10 5000 3e10 10000 3e10 20000 3e10 30000 3e10 50000 3e10 100000 3e10 [/CODE]For each n I measured execution time over a range of pmax that was 100x to 1000x (smallest pmax to largest pmax), and then adjusted the range until I saw a local minimum at the center of the range. For each n, I chose a range of k that was close to the current search wavefront. A typical run is shown below. Let me know if you want me to find the optimal pmax for any other n's. For n <= 100 gfndsieve -x appears to be slower than GMP-Fermat (fermat64_redc). See below for n=40 with both programs using about 500K primes. Is this what you would expect, or are there some parameters for gfndsieve that I should set differently to get best performance? [CODE] Omen-Linux: cat fermat.ini nStart=40 nEnd=40 kStart=50000000000000001 kEnd=50000017000000000 Omen-Linux: /usr/bin/time fermat64_redc GMP-Fermat version 2.5 The value FilterPrimes was not set, it will default to 500000. Processing range of k from 50000000000000001 to 50000017000000000 and range of n from 40 to 40 Testing for n = 40 Tested to 50000014834221031 (tested 3.55 pct candidates) at 81286434 per second Overall rate for n=40: tested 603673601 of 17000000000 numbers ( 3.55 pct) in 209.10 seconds at 81299377 k per second Done 209.15user 0.00system 3:29.15elapsed 99%CPU (0avgtext+0avgdata 11136maxresident)k 0inputs+32outputs (0major+4000minor)pagefaults 0swaps Omen-Linux: /usr/bin/time gfndsieve -n 40 -N 40 -k 50000000000000001 -K 50000017000000000 -x -X 20000000000 -W 1 -P 74e5 gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n Sieve started: 3 < p < 74e5 with 8500000000 terms (50000000000000001 <= k <= 50000016999999999, 40 <= n <= 40, k*2^n+1) (expecting 7909609279 factors) p=23, 0.133 p/sec, 5866227649 factors found at 94.15M f/sec, 0.0% done. ETC 2020-04-28 14:59 p=4759, 10.36 p/sec, 7375468757 factors found at 59.80M f/sec, 0.1% done. ETC 2019-08-13 14:16 p=229399, 323.6 p/sec, 7726883695 factors found at 15.13M f/sec, 3.1% done. ETC 2019-08-11 11:11 Sieve completed at p=7400023. Processor time: 230.93 sec. (0.01 sieving) (1.00 cores) Primes tested: 501964. Factors found: 7896495619. Remaining terms: 603504381. Time: 230.30 seconds. Tested 32.78 pct of range at 40978506 terms per second ( 7.10 pct terms passed sieving) Tested 65.59 pct of range at 40842360 terms per second ( 7.10 pct terms passed sieving) Tested 98.39 pct of range at 40897250 terms per second ( 7.10 pct terms passed sieving) Tested 100.00 pct of range at 40865384 terms per second ( 7.10 pct terms passed sieving) 416.53user 0.38system 6:56.97elapsed 99%CPU (0avgtext+0avgdata 2453548maxresident)k 0inputs+16outputs (0major+612545minor)pagefaults 0swaps [/CODE]A few other issues I ran into using gfndsieve that you may want to address in the next release: 1) When I first ran "make gfndsieve", during the load phase I got an undefined reference error for all of the pthreads functions. I noticed you already have "EXTRALDFLAGS+=-lpthread" in the makefile but were not using it, so I added$(EXTRALDFLAGS)
to the end of the build line for gfndsieve. Seems this would need to be added to many of the other binaries also, or you may have
a different fix in mind.

2) If I time gfndsieve and redirect stdout and stderr to a file, the time output overwrites the last output line of gfndsieve.
See below. I worked around this in App.cpp WriteToConsole by changing the printf("\r") to printf("\n"). This eliminates the status line
overwrite completely, which is fine/preferred when redirecting output, but probably not what you want in general.

[CODE]Omen-Linux: /usr/bin/time gfndsieve -n 1000 -N 1000 -k 300000000001 -K 300060000000 -x -X 1e10 -W 1 -P 5000000000 >& out
Omen-Linux: cat out
gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n
Sieve started: 3 < p < 5e9 with 30000000 terms (300000000001 <= k <= 300059999999, 1000 <= n <= 1000, k*2^n+1) (expecting 28524211 factors)
Sieve completed at p=5000000039.
Processor time: 9.84 sec. (0.72 sieving) (0.82 cores)
Primes tested: 234954224. Factors found: 28492833. Remaining terms: 1507167. Time: 12.03 seconds.
348.75user 0.18system 5:51.47elapsed 99%CPU (0avgtext+0avgdata 1233304maxresident)kng)
0inputs+64outputs (0major+307780minor)pagefaults 0swaps[/CODE]

 rogue 2019-08-11 16:18

I would expect that each program would have a different optimal sieve depth for a given n to reach maximum throughput.

 Gary 2019-08-12 02:16

[QUOTE=rogue;523525]I would expect that each program would have a different optimal sieve depth for a given n to reach maximum throughput.[/QUOTE]
Yes, agreed. The point I was trying to make (maybe poorly) was that even when I use the pmax that maximizes throughput of gfndsieve at n=40, it is still only half the throughput of GMP-Fermat. Once I get your -X fix I will try larger ranges of K with smaller chunk sizes to see if that improves throughput.

Thanks!

 pepi37 2019-08-16 21:10

I try to compile latest mtsieve under Linux and failed with many errors. On same machine I can compile 1.9. without any problem: so it looks like problem appear on latest few revision.

 rogue 2019-08-16 23:10

[QUOTE=pepi37;523796]I try to compile latest mtsieve under Linux and failed with many errors. On same machine I can compile 1.9. without any problem: so it looks like problem appear on latest few revision.[/QUOTE]

PM me with the output from the build.

 rogue 2019-08-17 19:07

I have posted 1.9.4. The changes are:
[LIST][*]Fix a segfault with srsieve2 when rebuilding subsequences.[*]Fix a segfault with AVX logic on non-Windows OSes.[*]Fixed an issue with gfndsieve and dmdsieve where a large range of k and small range of x cause it to not sieve subsequent subranges.[*]Added a table to gfndsieve to pre-set pmax if using -x and -P is not specified.[*]Add -D flag to xyyxsieve to disable AVX as it crashes in the AVX routines on Windows OS on AMD CPUs. The flag will be removed when that issue is resolved, but I need someone with an AMD CPU to figure it out as I don't have one. Other sieves using AVX might have the same issue. I'll add -D to them if they have the problem and I'm asked to fix.[*]Added -fP to srsieve2. This will generate a more verbose ABC output file with each line specificing the values of k, n, and c. It will also add the number_primes switch which is supported by pfgw to ensure only a single prime for each distinct k of the file.[*]Added -fB to srsieve2. This will generate a format that can be used to load BOINC. This is equivalent to the "PRP" format used by srsieve/srfile[/LIST]
I have not tested the -fB option for srsieve2 as it was a late addition.

 rebirther 2019-08-17 20:00

-FB is not working in srsieve2, gives me an error message with -f B, the program recognize a space between FB but there isnt one.

 pepi37 2019-08-18 10:25

1 Attachment(s)
[QUOTE=rogue;523836]I have posted 1.9.4. The changes are:
[LIST][*]Fix a segfault with srsieve2 when rebuilding subsequences.[*]Fix a segfault with AVX logic on non-Windows OSes.[*]Fixed an issue with gfndsieve and dmdsieve where a large range of k and small range of x cause it to not sieve subsequent subranges.[*]Added a table to gfndsieve to pre-set pmax if using -x and -P is not specified.[*]Add -D flag to xyyxsieve to disable AVX as it crashes in the AVX routines on Windows OS on AMD CPUs. The flag will be removed when that issue is resolved, but I need someone with an AMD CPU to figure it out as I don't have one. Other sieves using AVX might have the same issue. I'll add -D to them if they have the problem and I'm asked to fix.[*]Added -fP to srsieve2. This will generate a more verbose ABC output file with each line specificing the values of k, n, and c. It will also add the number_primes switch which is supported by pfgw to ensure only a single prime for each distinct k of the file.[*]Added -fB to srsieve2. This will generate a format that can be used to load BOINC. This is equivalent to the "PRP" format used by srsieve/srfile[/LIST]
I have not tested the -fB option for srsieve2 as it was a late addition.[/QUOTE]

This build is compiled without error but I must install before compiling libgmp-dev package ( under Debian) because I got error: fatal error: no gmp.h
But after installing package all is OK!
Thanks!

Compiling is ok but there is no twinsieve , srsieve2 and xyyxsieve

 rogue 2019-08-18 15:06

[QUOTE=rebirther;523837]-FB is not working in srsieve2, gives me an error message with -f B, the program recognize a space between FB but there isnt one.[/QUOTE]

I'm confused. Are you using -F or -f? -F is not a switch, but -f is.

 rogue 2019-08-18 15:08

[QUOTE=pepi37;523853]This build is compiled without error but I must install before compiling libgmp-dev package ( under Debian) because I got error: fatal error: no gmp.h
But after installing package all is OK!
Thanks!

Compiling is ok but there is no twinsieve , srsieve2 and xyyxsieve[/QUOTE]

If you use one of these commands: "make twinsieve", "make srsieve2", or
"make xyyxsieve", what happens?

 Dylan14 2019-08-18 15:20

Not sure if this is a bug or not, but I am trying to sieve the gap

[CODE]n 4900-4999 7e8-10e8[/CODE]in gfndsieve for someone to test for the FermatSearch. However, it seems that gfndsieve is having a bit of trouble with this range:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>gfndsieve -W 12 -P 1e10 -n 4900 -N 4999 -k 7e8 -K 10e8
gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n
Sieve started: 3 < p < 1e10 with 15000000000 terms (700000001 <= k <= 999999999, 4900 <= n <= 4999, k*2^n+1) (expecting 14284318118 factors)
p=5353556269, 4.022M p/sec, 14222420430 factors found at 947.2K f/sec, 53.5% done. ETC 2019-08-18 11:14
Sieve completed at p=10000000033.
Processor time: 1387.59 sec. (5.11 sieving) (2.47 cores)
Fatal Error: Something is wrong. Counted terms (731497142) != expected terms (757534783)[/CODE]Even cutting the amount of k's tested from 3e8 to 1e8 doesn't help:

[CODE]C:\Users\Dylan\Desktop\prime finding\sieves\mtsieve>gfndsieve -W 12 -P 1e10 -n 4900 -N 4999 -k 7e8 -K 8e8
gfndsieve v1.6, a program to find factors of k*2^n+1 numbers for variable k and n
Sieve started: 3 < p < 1e10 with 5000000000 terms (700000001 <= k <= 799999999, 4900 <= n <= 4999, k*2^n+1) (expecting 4761439373 factors)
p=737410679, 553.0K p/sec, 4715578537 factors found at 1.089M f/sec, 7.4% done. ETC 2019-08-18 11:49
Sieve completed at p=10000000033.
Processor time: 611.70 sec. (3.94 sieving) (3.03 cores)
Fatal Error: Something is wrong. Counted terms (243821033) != expected terms (249825410)[/CODE]I thought that it could be a problem with the computer writing all the terms to disk, but I dismissed that as the computer I'm testing this on has a NVMe SSD, which is fast, and that I have done smaller ranges at higher n values with no problems. What could be the issue here?

 rebirther 2019-08-18 15:24

[QUOTE=rogue;523868]I'm confused. Are you using -F or -f? -F is not a switch, but -f is.[/QUOTE]

[CODE]n:\riesel-base537 - Kopie>srsieve2 -n2501 -N10000 -P1e9 -spl_remain.txt -fB
srsieve2 v1.1, a program to find factors of k*b^n+c numbers for fixed b and vari
able k and n
Fatal Error: srsieve2: invalid argument -f B[/CODE]

 pepi37 2019-08-18 15:42

[QUOTE=rogue;523869]If you use one of these commands: "make twinsieve", "make srsieve2", or
"make xyyxsieve", what happens?[/QUOTE]

make twinsieve works ok and produce twinsieve, and also xyyxsieve

make srsieve2

make srsieve2
make: *** No rule to make target 'sierpinksi_riesel/SierpinskiRieselApp.o', needed by 'srsieve2'. Stop.

 Dylan14 2019-08-18 17:21

[QUOTE=Dylan14;523870]Not sure if this is a bug or not, but I am trying to sieve the gap

[CODE]n 4900-4999 7e8-10e8[/CODE]in gfndsieve for someone to test for the FermatSearch. However, it seems that gfndsieve is having a bit of trouble with this range:

(some output involving term numbers not matching)
[/QUOTE]

I figured the problem out. The sieve has to start as a single thread process and then after the initial sieve is done, then multiple threads can be used.

 rogue 2019-08-18 19:55

[QUOTE=pepi37;523872]make twinsieve works ok and produce twinsieve, and also xyyxsieve

make srsieve2

make srsieve2
make: *** No rule to make target 'sierpinksi_riesel/SierpinskiRieselApp.o', needed by 'srsieve2'. Stop.[/QUOTE]

Sorry, but that is due to a misspelling in the path. I correctly the misspelling of the folder name, but didn't save the change to the makefile. It should be "sierpinski_riesel" not "sierpinksi_riesel" in the makefile. Fix that and you should be able to build.

 rogue 2019-08-18 19:56

[QUOTE=Dylan14;523877]I figured the problem out. The sieve has to start as a single thread process and then after the initial sieve is done, then multiple threads can be used.[/QUOTE]

A number of sieves, due to the high percentage of terms removed with the initial block of primes, only run a single thread for that block an in effort to avoid some of of the throttling that occurs when multiple threads try to access the same memory.

To get to multiple threads more quickly, use -w to specify smaller chunks of primes.

 rogue 2019-08-29 01:56

I posted version 1.9.5 of the framework. The only change is that I fixed the factor rate calculation.

 ET_ 2019-08-29 11:22

[QUOTE=rogue;524767]I posted version 1.9.5 of the framework. The only change is that I fixed the factor rate calculation.[/QUOTE]

I ran make and found:

#include "CIsOneSubsequenceHelper.h" - the correct file name is CisOneSubsequenceHelper.h

dm_divisor/DMDivisorApp.cpp
gfn_divisor/GFNDivisorApp.cpp
fixed_bnc/FixedBNCApp.cpp
fixed_kbn/FixedKBNApp.cpp
kbb/KBBApp.cpp
sierpinski_riesel/SierpinskiRieselApp.cpp
twin/TwinApp.cpp
ALL have wrong permissions (I had to chmod 666 to them)

core/../opencl/Device.h:19:13: fatal error: CL/cl.h: File or directory not existing
And setting ENABLE_GPU=no does not work either.

Luigi

 rogue 2019-08-29 13:38

[QUOTE=ET_;524782]I ran make and found:

#include "CIsOneSubsequenceHelper.h" - the correct file name is CisOneSubsequenceHelper.h

dm_divisor/DMDivisorApp.cpp
gfn_divisor/GFNDivisorApp.cpp
fixed_bnc/FixedBNCApp.cpp
fixed_kbn/FixedKBNApp.cpp
kbb/KBBApp.cpp
sierpinski_riesel/SierpinskiRieselApp.cpp
twin/TwinApp.cpp
ALL have wrong permissions (I had to chmod 666 to them)

core/../opencl/Device.h:19:13: fatal error: CL/cl.h: File or directory not existing
And setting ENABLE_GPU=no does not work either.

Luigi[/QUOTE]

I'll fix that spelling. Windows doesn't care but OS X and Linux do.

Since the .7z file is created on Windows, I don't know how its permissions correspond to permissions on Linux.

The ENABLE_GPU flag is removed from the makefile. If you have a GPU, then you will need to install an OpenCL SDK. You also might need to modify the GPUCPPFLAGS and GPULDFLAGS in the makefile.

If you do not have a GPU, then use "make cpu_all". It will no build the OpenCL versions of the exes.

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


text:
# Migrate from uTorrent to KTorrent

How would I transfer data from uTorrent(windows) to KTorrent(Ubuntu)? I have hundreds of files that were seeding in windows, all fully downloaded.

-
Just a note, you can run utorrent in wine. –  MrStatic Aug 21 '10 at 13:37
Would it have same performance for large number of torrents/connections? –  Pablo Aug 21 '10 at 14:36

I hope that there is a more elegant way than one I'm going to suggest, but if nothing comes up, this could help.

Make sure that windows disk is visible from Ubuntu. Get all .torrent files for torrents you are seeding in µTorrent. Then open them in KTorrent one by one. Once KTorrent asks you where you want to save files, chose same location where you downloaded them from windows. KTorrent should detect percentage downloaded and continue downloading further. Since the downloads are complete it should start seeding.

Of course, try this out with smallest torrent first, just in case something goes wrong.

EDIT

Preliminary results:

First step for me was to open KTorrent and open configure KTorrent settings. There under Application there should be option Default save location. Set it to location where data from torrents is downloaded. After that button labeled OK is to be clicked. Then we proceed to next step.

Second step is to test settings. Open favorite terminal application. I personally like Konsole. Then type:

ktorrent \path\to\torrent\file\foo.torrent --silent

This will add torrent to ktorrent and start downloading it with out user intervention. Process will be run in background, so same shell can be used again. It should detect that torrent is already downloaded and switch to seeding mode. ktorent --silent can be run even if ktorrent is already running and will add any new torrents to running instance.

Try this out and report how it works.

Third step: Bash script which should detect all .torrent files in a directory and call ktorrent for each of them :

After completing first two steps, and making sure that they worked correctly, open you favorite console application and navigate to directory where the .torrent files are. then type following:

gedit script.sh

gedit window will open. Paste following code in it:

#!/bin/bash

for f in  *.torrent #this will list through every .torrent in working directory
do
echo "Proccessing $f file..." ktorrent "$f"  --silent #this will call ktorrent for every .torrent file detected
done

Click save. The script will be saved. Next thing we need to do is to allow it to execute.

Type:

chmod +x script.sh

This will make script executable. Finally, run it by typing:

./script.sh

It should add all torrents in directory to ktorrent. This way you'll save the effort needed for manually adding hundreds of torrents.

-
This is the same thing you'd do when moving to any torrent client –  Sathya Aug 21 '10 at 13:50
@Sathya Indeed it is. That's why I hope that someone will provide better answer. Doing this procedure for hundreds of files can take thousands of seconds and can be impractical. –  AndrejaKo Aug 21 '10 at 14:36
So there is no automated way? Considering that I have many of them, it will be not easy to add one by one... –  Pablo Aug 21 '10 at 14:37
@Michael AFAIK there is no automated way :( –  Sathya Aug 21 '10 at 14:53
@Michael I meant the directories where the downloaded files are stored. Anyway, I'll take a look and report the results. –  AndrejaKo Aug 21 '10 at 16:09

Just to note instead of opening a file saving a script making it executable and such you can just execute the whole thing in one line like this:

for f in  *.torrent; do echo "Processing $f";ktorrent "$f"  --silent;done

Just make sure you are in the directory with torrent files when you do.

-

format: plain


text:
Archive

Archive for the ‘puzzles’ Category

Three interesting puzzles

Here are three puzzles I got from 3 different people recently. The first I got from Charles, who got it from a problem set of the Brazilian Programming Competition.

Puzzle #1: Given $n$ and a vector of in-degrees and out-degrees $\text{in}_i$ and $\text{out}_i$ for $i=1..n$, find if there is a simple directed graph on $n$ nodes with those in and out-degrees in time $O(n \log n)$. By a simple directed graph, I mean at most one edge between each pair $(i,j)$, allowing self loops $(i,i)$.

Solving this problem in time $O(n^3)$ is easy using a max-flow computation – simply consider a bipartite graph with and edge $(i,j)$ between each pair with capacity $1$. Add a source and connect to each node in the left size with capacity $\text{in}_i$ and add also a sink in the natural way, compute max-flow and check if it is $\sum_i \text{in}_i$. But it turns out we can do it in a lot more efficient way. The solution I thought works in time $O(n \log n)$ but maybe there is a linear solution out there. If you know of one, I am curious.

The second puzzle was given to me by Hyung-Chan An:

Puzzle #2: There is grid of size $n \times m$ formed by rigid bars. Some cells of the grid have a rigid bar in the diagonal, making that whole square rigid. The question is to decide, given a grid and the location of the diagonal bars if the entire structure is rigid or not. By rigid I mean, being able to be deformed.

We thought right away in a linear algebraic formulation: look at each node and create a variable for each of the 4 angles around it. Now, write linear equations saying that some variables sum to 360, since they are around one node. Equations saying that some variable must be 90 (because it is in a rigid cell). Now, for the variables internal to each square, write that opposite angles must be equal (since all the edges are of equal length) and then you have a linear system of type $Ax = b$ where $x$ are the variables (angles). Now, we need to check if this system admits more then one solution. We know a trivial solution to it, which is all variable is 90. So, we just need to check if the matrix $A$ has full rank.

It turns out this problem has a much more beautiful and elegant solution and it is totally combinatorial – it is based on verifying that a certain bipartite graph is connected. You can read more about this solution in Bracing rectangular frameworks. I by (Bolker and Crapo 1979). A cute idea is to use the the following more general linear system (which works for rigidity in any number of dimensions). Consider a rigid bar from point $p_a \in \mathbb{R}^n$ to point $p_b \in \mathbb{R}^n$. If the structure is not rigid, then there is a movement it can make: let $v_a$ and $v_b$ be the instantaneous velocities of points $a$ and $b$. If $p_a(t), p_b(t)$ are the movements of points $a,b$, then it must hold that: $\Vert p_a(t) - p_b(t) \Vert = \Vert p_a(0) - p_b(0) \Vert$, so taking derivatives we have:

$(p_a(0) - p_b(0)) \cdot (v_a - v_b) = 0$

This is a linear system in the velocities. Now, our job is to check if there are non zero velocities, which again is to check that the matrix of the linear system is or is not full-rank.  An interesting thing is that if we look at this question for the grid above, this matrix will be the matrix of a combinatorial problem! So we can simply check if it has full rank by solving the combinatorial problem. Look at the paper for more details.

The third puzzle I found in the amazing website called The Puzzle Toad, which is CMU’s puzzle website:

Puzzle #3: There is a game played between Arthur and Merlin. There is a table with $n$ lamps disposed in a circle, initially some are on and some are off. In each timestep, Arthur writes down the position of the lamps that are off. Then Merlin (in an adversarial way) rotates the table. The Arthur’s servant goes and flips (on –> off, off –> on) the lamps whose position Arthur wrote down (notice now he won’t be flipping the correct lamps, since Merlin rotated the table. if Arthur wrote lamp 1 and Merlin rotated the table by 3 positions, the servant will actually be flipping lamp 4. The question is: given $n$ and an initial position of the table, is there a strategy for Merlin  such that Arthur never manages to turn all the lamps on.

See here for a better description and a link to the solution. For $n = 2^k$ no matter what Merlin does, Arthur always manages to turn on all the lamps eventually, where eventually means in $O(n^2)$ time. The solution is a very pretty (and simple) algebraic argument. I found this problem really nice.

Categories: Tags:

Do we believe the Axiom of Choice ?

Continuing on my series of posts from Israel, I’d like to share some exciting puzzle that I heard today from Omer Tamuz. I’ve learned before about the Axiom of Choice in a Measure Theory class, but never saw a so striking and counter-intuitive application of it. Ok, you might say the Banach–Tarski paradox is a pehaps better example – but since it’s proof is so complicated, it is not as striking as seeing how a simple application of it can generate un-intuitive results. First, let me present two puzzles:

Puzzle #0: There are $n+1$ people in a line, and each has a $0/1$ number on his hat. Each player can look to the numbers of the players in front of him. So, if $x_i$ is the number of player $i$, then player $i$ knows $x_{i+1},\hdots,x_n$. Now, from $i = 0 \hdots n$ the players will say his own number. Is there a protocol such that players $1,\hdots,n$ will get their own number right? (Notice that they hear what the players before him said).

Puzzle #1: Consider the same puzzle with an infinite number of players. I.e. there are $x_i; i \in \mathbb{Z}_+$ and player $i$ knows $x_j$ for all $j > i$. Show a protocol for all players, except the first to get the answer right?

Puzzle #2: Still the same setting, but now players don’t hear what the previous player said. Is there a protocol such that only a finite number of players get it wrong ? (notice that it needs to be finite, not bounded).

Puzzle #0 is very easy and the answer is simply parity check. Player $0$ could  simply declares $y = x_1 \otimes\hdots \otimes x_n$ where $\otimes$ stands for XOR. Now, player $1$ can for example reconstruct $x_1$ by $y \otimes x_2 \otimes \hdots \otimes x_n$. Now, player $2$ can do the same computation and figure out $x_1$. Now, he can calculate $x_2 = y \otimes x_1 \otimes x_2 \otimes \hdots \otimes x_n$ and so on… When we move to an infinite number of players, however, we can’t do that anymore because taking the XOR of an infinite number of bits is not well defined. However, we can still can solve Puzzles #1 and #2 if we believe and are willing to accept the Axiom of Choice.

Axiom of Choice: Given a family of sets $\{ S_i \}_{i \in I}$ there is a set $\{x_i; i \in I\}$ such that $x_i \in S_i$, i.e. a set that takes a representative from each element in the family.

It is used, for example to show that there is no measure $\mu : 2^{[0,1)} \rightarrow \mathbb{R}$ that is shift invariant (say under addition modulo $1$) and $\mu([0,1)) = 1$. The proof goes the following way: define the following equivalence relation on $[0,1)$: $x \sim y$ if $x - y \in \mathbb{Q}$. Now, consider the family of all the equivalence classes and invoke the Axiom of Choice. Let $K$ be the set obtained. Now, we can write the interval as a disjoint union:

$[0,1) = \cup_{x \in \mathbb{Q}} (K+x)$

where all operations are modulo $1$ and $K+x = \{y+x; y \in K\}$. Since it is an enumerable union, if such a measure existed, then: $\mu([0,1)) = \sum_{x \in \mathbb{Q}} \mu(K+x) = \sum_{x \in \mathbb{Q}} \mu(K)$ which is either $0$ if $\mu(K) = 0$ or $\infty$ if $\mu(K) >0$.

This is kinda surprising, but more surprising is how we can use the exact same technique to solve the puzzles: first, let’s solve Puzzle #2: let $S$ be the set of all infinite $\{0,1\}$-strings and consider the equivalence relation on $S$ such that $x \sim y$ if the strings differ in a finite number of positions. Now, invoke the axiom of choice in the equivalence classes and let $S_0$ be the set of representatives. Now, if $F$ is the set of all strings with finite number of $1$‘s and $\otimes$ the operation such that $z = x \otimes z$ if $z_i = x_i \otimes y_i$. We can therefore write:

$S = \cup_{x \in F} (S_o \otimes x)$

Now, a protocol the players could use is to look ahead and since they are seeing an infinite number of bits, they can figure out which equivalence class from $S/\sim$ they the entire string is. Now, they take $y \in S_0$ the representative of this class and guess $y_i$. Notice that $y$ will differ from the real string by at most a finite number of bits.

Now, to solve puzzle #1, the player $0$ simply looks at $x = x_1 x_2 \hdots$ and figure out the equivalence class he is and let $y \in S_0$ be the representative of this class. Now, since $x$ and $y$ differ by a finite number of bits, he can simply calculate XOR of $x$ and $y$ (now, since it is a finite number of them, XOR is well defined) and announce it. With this trick, it just becomes like Puzzle #0.

Categories: Tags:

Probability Puzzles

Today in a dinner with Thanh, Hu and Joel I heard about a paradox I haven’t heard so far. Probability is full of cute problems that challenge our understanding of the basic concepts. The most famous of them is the Monty Hall Problem, which asks:

You are on a TV game show and there are ${3}$ doors – one of them contains a prize, say a car and the other two door contain things you don’t care about, say goats. You choose a door. Then the TV host, who knows where the prize is, opens one door you haven’t chosen and that he knows has a goat. Then he asks if you want to stick to the door you have chosen or if you want to change to the other door. What should you do?

Probably you’ve already came across this question in some moment of your life and the answer is that changing doors would double your probability of getting the price. There are several ways of convincing your intuitions:

• Do the math: when you chose the door, there were three options so the prize is in the door you chose with ${\frac{1}{3}}$ probability and in the other door with probability ${\frac{2}{3}}$ (note that the presenter can always open some door with a goat, so conditioning on that event doesn’t give you any new information).
• Do the actual experiment (computationally) as done here. One can always ask a friend to help, get some goats and perform the actual experiment.
• To convince yourself that “it doesn’t matter” is not correct, think ${100}$ doors. You choose one and the TV host open ${98}$ of them and asks if you want to change or stick with your first choice. Wouldn’t you change?

I’ve seen TV shows where this happened and I acknowledge that other things may be involved: there might be behavioral and psychologic issues associated with the Monty Hall problem – and possibly those would interest Dan Ariely, whose book I began reading today – and looks quite fun. But the problem they told me about today in dinner was another: the envelope problem:

There are two envelopes and you are told that in one of them there is twice the amount that there is in the other. You choose one of the envelopes at random and open it: it contains ${100}$ bucks. Now, you don’t know if the other envelope has ${50}$ bucks or ${200}$ bucks. Then someone asks you if you wanted to pay ${10}$ bucks and change to the other envelope. Should you change?

Now, consider two different solutions to this problem: the first is fallacious and the second is correct:

1. If I don’t change, I get ${100}$ bucks, if I change I pay a penalty of ${10}$ and I get either ${50}$ or ${200}$ with equal probability, so my expected prize if I change is ${\frac{200+50}{2}-10 = 115 > 100}$, so I should change.
2. I know there is one envelope with ${x}$ and one with ${2x}$, then my expected prize if I don’t change is ${\frac{x + 2x}{2} = \frac{3}{2}x}$. If I change, my expected prize is ${\frac{x + 2x}{2} - 10 < \frac{3}{2}x}$, so I should not change.

The fallacy in the first argument is perceiving a probability distribution where there is no one. Either the other envelope contains ${50}$ bucks or it contains ${200}$ bucks – we just don’t know, but there is no probability distribution there – it is a deterministic choice by the game designer. Most of those paradoxes are a result of either an ill-defined probability space, as Bertrand’s Paradox or a wrong comprehension of the probability space, as in Monty Hall or in several paradoxes exploring the same idea as: Three Prisioners, Sleeping Beauty, Boy or Girl Paradox, …

There was very recently a thrilling discussion about a variant on the envelope paradox in the xkcd blag – which is the blog accompaning that amazing webcomic. There was a recent blog post with a very intriguing problem. A better idea is to go there and read the discussion, but if you are not doing so, let me summarize it here. The problem is:

There are two envelopes containing each of them a distinct real number. You pick one envelope at random, open it and see the number, then you are asked to guess if the number in the other envelope is larger or smaller then the previous one. Can you guess correctly with more than ${\frac{1}{2}}$ probability?

A related problem is: given that you are playing the envelope game and there are number ${A}$ and ${B}$ (with ${A < B}$). You pick one envelope at random and then you are able to look at the content of the first envelope you open and then decide to switch or not. Is there a strategy that gives you expected earnings greater than ${\frac{A+B}{2}}$ ?

The very unexpected answers is yes !!! The strategy that Randall presents in the blog and there is a link to the source here is: let ${X}$ be a random variable on ${{\mathbb R}}$ such that for each ${a we have ${P(a < X < b) > 0}$, for example, the normal distribution or the logistic distribution.

Sample ${X}$ then open the envelope and find a number ${S}$ now, if ${X < S}$ say the other number is lower and if ${X > S}$ say the other number is higher. You get it right with probability

$\displaystyle P(\text{picked }A) P(X > A) + P(\text{picked }B) P(X < B) = \frac{1}{2} (1 + P(A < X < B))$

which is impressive. If you follow your guess, your expected earning ${Y}$ is:

\displaystyle \begin{aligned} &P(\text{picked }A) \mathop{\mathbb E}[Y \vert \text{picked }A] + P(\text{picked }B) \mathop{\mathbb E}[Y \vert \text{picked }B] = \\ & = \frac{1}{2} [P(XA) B] + \frac{1}{2} [P(XB) A] \\ &= \frac{1}{2}[A [P(XB)] + B [P(X>A) + P(X \frac{A+B}{2} \\ \end{aligned}

The xkcd pointed to this cool archive of puzzles and riddles. I was also told that the xkcd puzzle forum is also a source of excellent puzzles, as this:

You are the most eligible bachelor in the kingdom, and as such the King has invited you to his castle so that you may choose one of his three daughters to marry. The eldest princess is honest and always tells the truth. The youngest princess is dishonest and always lies. The middle princess is mischievous and tells the truth sometimes and lies the rest of the time. As you will be forever married to one of the princesses, you want to marry the eldest (truth-teller) or the youngest (liar) because at least you know where you stand with them. The problem is that you cannot tell which sister is which just by their appearance, and the King will only grant you ONE yes or no question which you may only address to ONE of the sisters. What yes or no question can you ask which will ensure you do not marry the middle sister?

copied from here.

Categories: puzzles Tags:


text:
A'Campo Curvature Bumps and the Dirac Phenomenon Near A Singular Point

Laurentiu Paunescu (Sydney)

Abstract

The level curves of an analytic function germ can have bumps (maxima of Gaussian curvature) at unexpected points near the singularity. This phenomenon is fully explored for $f(z,w)\in \mathbb{C}\{z,w\}$ using the Newton-Puiseux infinitesimals and the notion of gradient canyon. Equally unexpected is the Dirac phenomenon: as $$c\to 0,$$ the total Gaussian curvature of $$f=c$$ accumulates in the minimal gradient canyons, and nowhere else. Our approach mimics the introduction of polar coordinates in Analytic Geometry.

This is joint work with S. Koike and T-C Kuo.


text:
# 8.2: Basic Cooley-Tukey FFT

The Cooley-Tukey FFT always uses the Type 2 index map from Multidimensional Index Mapping. This is necessary for the most popular forms that have $$N=R^M$$, but is also used even when the factors are relatively prime and a Type 1 map could be used. The time and frequency maps from Multidimensional Index Mapping are

$n=((K_1n_1+K_2n_2))_N \nonumber$

$k=((K_3k_1+K_4k_2))_N \nonumber$

Type-2 conditions in the 2.2: The Index Map become

$K_1=aN_2\; \; or\; \; K_2=bN_1\; \; but\; not\; both \nonumber$

and

$K_3=cN_2\; \; or\; \; K_4=dN_1\; \; but\; not\; both \nonumber$

The row and column calculations in 2.2: The Index Map are uncoupled by Type-two index map which for this case are

$((K_1K_4))_N=0\; \; or\; \; ((K_2K_3))_N=0\; \; but\; not\; both \nonumber$

To make each short sum a DFT, the KiKi" role="presentation" style="position:relative;" tabindex="0">

This page titled 8.2: Basic Cooley-Tukey FFT is shared under a CC BY license and was authored, remixed, and/or curated by C. Sidney Burrus.


text:
# Real coordinate space

In mathematics, the real coordinate space of dimension n, denoted Rn (/ɑːrˈɛn/ ar-EN) or ${\displaystyle \mathbb {R} ^{n}}$, is the set of the n-tuples of real numbers, that is the set of all sequences of n real numbers. With component-wise addition and scalar multiplication, it is a real vector space, and its elements are called coordinate vectors.

The coordinates over any basis of the elements of a real vector space form a real coordinate space of the same dimension as that of the vector space. Similarly, the Cartesian coordinates of the points of a Euclidean space of dimension n form a real coordinate space of dimension n.

These one to one correspondences between vectors, points and coordinate vectors explain the names of coordinate space and coordinate vector. It allows using geometric terms and methods for studying real coordinate spaces, and, conversely, to use methods of calculus in geometry. This approach of geometry was introduced by René Descartes in the 17th century. It is widely used, as it allows locating points in Euclidean spaces, and computing with them.


text:
Home

Browse
Communities
& Collections

Issue Date
Author
Title
Subject

Sign on to:

My Account
authorized users

Edit Profile

Help
 Please use this identifier to cite or link to this item: http://hdl.handle.net/1807/11237

 Title: The Position of the Sammarinese Dialects in the Romagnol Linguistic Group Authors: Michelotti, Alexander Advisor: Danesi, Marcel Department: Italian Studies Keywords: Italian DialectologyRomagnolo Issue Date: 1-Aug-2008 Abstract: Although Italo-Romance varieties continue to be documented, classified, and analyzed by dialectologists, many are at risk of not being recorded thoroughly and systematically before their imminent extinction. While considerable attention has been devoted to the phonetics, phonology, morphosyntax, and lexicon of the more archetypal Romagnol dialects spoken in the Po Valley, dialectologists have largely overlooked peripheral Romagnol varieties such as Sammarinese. The present dissertation begins to fill this lacuna in Italian dialectology by providing an historical and synchronic study of Sammarinese phonology and morphology based on the examination of old and modern texts as well as copious oral data. The main purpose of the thesis is to delineate diatopic variation within the tiny Republic through comparative analysis, while also addressing the need for a more complete and precise definition of Sammarinese‘s position in the Romagnol linguistic group. In addition to confirming Sammarinese‘s status as a Borderline Romagnol variety, the dissertation offers evidence that Sammarinese is divided geographically into two main dialectal groups: Northeastern and Southwestern. The secondary intent of the thesis is to provide systematic, comprehensive, and phonetically precise documentation of the phonology and morphology of a moribund language. iii The dissertation consists of five chapters. The Introduction includes a brief linguistic history which relates diatopic variation to geopolitical factors. The first chapter also contributes an assessment of the status of scholarship dedicated to Sammarinese dialectology. Chapter 2 examines diachronic phonetics, emphasizing the dichotomy between the traits which link Southwestern Sammarinese to Borderline Romagnol and those which join Northeastern Sammarinese with the Romagnol varieties of the Po Valley. Chapter 3 treats synchronic phonetics and proposes a generative phonology which aims to identify the diasystem underlying phonetic variation within the Republic. Chapter 4 analyzes historical declensional morphology, underscoring diatopic variation in internal flexion configurations as further evidence of the division between Northeastern and Southwestern Sammarinese. Chapter 5 examines diachronic verb morphology. The dissertation concludes with an assessment of linguistic aspects meriting further research and analysis. URI: http://hdl.handle.net/1807/11237 Appears in Collections: DoctoralItalian Studies - Doctoral theses

Files in This Item:

File Description SizeFormat
View/Open


text:
lilypond-user
[Top][All Lists]

## Re: Inputting special symbols

 From: stk Subject: Re: Inputting special symbols Date: Fri, 6 Jan 2006 02:46:32 -0500 (EST)

Gilles wrote:

> And . . . also . . . :  Blank spaces at the
> beginning or end of double-quoted strings are trimmed.

That's true.  To get spaces between non-space \markup items you can write
things like

\markup { "foo" \hspace #10 "bar" }

That trick doesn't work for getting spaces at the end (I think I recall
that some people wanted such a thing for instrument names to be placed to
the left of the staff).  I don't know whether the following would work --

\markup {"foo" \hspace #10 "<utf-8 byte codes for an invisible char>"}

-- because I haven't tried it.  By an invisible character I mean something
like a non-break space or an extra-thin or extra-wide space; I know that
such things exist in Unicode.

-- Tom

reply via email to


text:
# Free falls

What 's the difference between an object thrown or dropped , does a thrown object treat as a free fall condition ?? if it does
we know that d=v(initial)*t + 1/2a*t^2
and we know that in free falls condition we use the equation d= 1/2g*t^2
that means initial velocity of free falls should be zero and thrown object has an initial velocity ??
can any one explain to me this , please >>>???

It's hard to make out what you are asking but I think that what you are saying is correct.

If we release (not throw), a ball for instance, on earth relative to earth then it's initial velocity is fairly obviously zero. You were just holding the ball before it dropped, it's was not moving relative to you or the earth. It clearly doesn't have any velocity (it's not moving!)

Now if we throw a ball we swing our arm before the ball is released. The ball is moving with our arm but the ball is still moving so when it it released the ball will have some initial velocity

EDIT: In both instances there is the same acceleration (9.8 m/s^2) the only difference is that in the throwing scenario we are giving the ball an starting velocity.

$$x(t) = x_0 + v_0 t + \frac{g t^2}{2}$$ will work in both cases, but if we drop a ball then $$v_0=0$$ in that equation.

Yes...in everyday speaking the difference between 'throwing' and 'dropping' (or 'lifting') is the initial velocity.The first one implies that the initial velocity is not zero while the second implies that it is.


text:
Operative Neurosurgery

Site Tools

logistic_regression

Logistic regression

In statistics, logistic regression, or logit regression, is a type of probabilistic statistical classification model.

It is also used to predict a binary response from a binary predictor, used for predicting the outcome of a categorical dependent variable (i.e., a class label) based on one or more predictor variables (features). That is, it is used in estimating the parameters of a qualitative response model. The probabilities describing the possible outcomes of a single trial are modeled, as a function of the explanatory (predictor) variables, using a logistic function. Frequently (and subsequently in this article) “logistic regression” is used to refer specifically to the problem in which the dependent variable is binary—that is, the number of available categories is two—while problems with more than two categories are referred to as multinomial logistic regression or, if the multiple categories are ordered, as ordered logistic regression.

Logistic regression measures the relationship between a categorical dependent variable and one or more independent variables, which are usually (but not necessarily) continuous, by using probability scores as the predicted values of the dependent variable.

As such it treats the same set of problems as does probit regression using similar techniques.

Simple logistic regression analysis refers to the regression application with one dichotomous outcome and one independent variable; multiple logistic regression analysis applies when there is a single dichotomous outcome and more than one independent variable.