20200512, 18:18  #298  
"Curtis"
Feb 2005
Riverside, CA
4243_{10} Posts 
Quote:
Am I to edit the source as indicated in the posts above, or has that been done for me in a released version? I grabbed source from sourceforge 11 May, CHANGES.txt notes 1.9.6 changes from 15 Jan 2020. 

20200512, 18:27  #299  
"Mark"
Apr 2003
Between here and the
5·1,171 Posts 
Quote:


20200512, 19:28  #300 
"Curtis"
Feb 2005
Riverside, CA
4,243 Posts 
Well, I've tried the download button from the sourceforge project, and the link from http://www.mersenneforum.org/rogue/mtsieve.html (this link appears to be windows .exe's only, I don't see source)
Neither seems to have the fix. Where can I find the latest build? Edit: I notice that srsieve2.exe from the MForum link is dated 21 Jan, so maybe it does but the fix concerned linux, and that's an .exe, so it doesn't seem too relevant. Last fiddled with by VBCurtis on 20200512 at 19:29 
20200512, 19:46  #301  
"Mark"
Apr 2003
Between here and the
1011011011111_{2} Posts 
Quote:
The issue was encountered on Windows, but could happen on other platforms. 

20200512, 22:26  #302 
"Curtis"
Feb 2005
Riverside, CA
1093_{16} Posts 
No, unconnected's report from posts 280 and 282 were ubuntu 18.04, same OS I'm running. You noticed that windows *does not* point out the problem in the succeeding posts.
Changing line 117 in workers.h from > SetValueNoLock to > SetValueHasLock results in a functioning srsieve2. Thanks for your quick replies! Note that I grabbed the code from sourceforge this morning, so this change has not yet made it into SF. 
20200513, 13:11  #303  
"Mark"
Apr 2003
Between here and the
5·1,171 Posts 
Quote:


20200515, 18:28  #304 
Jun 2003
2·3^{3}·29 Posts 
If using fbncsieve.exe can you sieve sequence k*2^n+1 and k*2^n1 at the same time (for a range of k)? What command line arguments should one use to do this?
Also if you have multiple n and multiple k (Where # of k>> # of n) for same base is there a way to sieve that all at once. Last fiddled with by Citrix on 20200515 at 18:28 
20200515, 19:36  #305  
"Mark"
Apr 2003
Between here and the
5×1,171 Posts 
Quote:
For your other question, if using base 2 and +1, then use gfndsieve. I do not have a sieve that sieves a single base for both +1 and 1, a range of k, and a range of n. I don't think it would be too difficult to modify twinsieve to do that. 

20200520, 16:04  #306 
"Mark"
Apr 2003
Between here and the
5·1,171 Posts 
I posted the binaries to mtsieve 2.0.0 at sourceforge. This is what I fixed:

20200524, 04:55  #307  
Jun 2003
2·3^{3}·29 Posts 
Quote:
I am working on kmin=2 kmax=n b=2 N=n*n c=+1 and 1 Currently I am using fbncsieve (now twinsieve) for each N value separately using a script. If there could be a sieve for these square numbers that would be great. These numbers can be sieved very efficiently. You can jump from one N value to next using 1 modular multiplication and 3 additions making it extremely fast to sieve together than sieve separately. A GPU version should also be possible. Here is the code that you can use for this Code:
//Adapted from multisieve void SquareNSieve::DoWork64Bit(uint64_t thePrime) { uint32_t nmin, nmax; nmin = 100; nmax = 1000; uint64_t temp, power; temp = thePrime + 1; temp >> 1; temp = expmod62(temp, nmax*nmax, thePrime); power = expmod62(2, 2 * nmax, thePrime); for (int x = nmax; x >= nmin; x) { if (temp <= x) LogFactor('', temp, 2, x*x, thePrime); if (temp >= thePrime  x) LogFactor('+', temp, 2, x*x, thePrime); temp = mulmod62(temp, power, thePrime); if (temp&1) { temp = temp + thePrime; } temp >> 1; if (power&1) { power = power + thePrime; } power >> 1; if (power&1) { power = power + thePrime; } power >> 1; } } Last fiddled with by Citrix on 20200524 at 05:45 

20200525, 05:49  #308 
Jun 2003
11000011110_{2} Posts 
I tried to write the code my self. I have attached it.
The program mainly writes the factors to factor file which need to be processed by srfile. There is no input or output file. I only modified the FPU code and not the AVX multiplication code. I cannot get it to compile. gmp.h is missing. I do not have GMP installed on my computer. Can anyone help compile it? I do not have experience with GPU apps  how do I modify the code for GPU? Possibly cw_kernel.cl needs to be modified. Not sure what to do with the cw_kernel.h file. Code:
void SquareNWorker::TestLargePrimesFPU(uint64_t *ps) { uint64_t powinvs[4]; uint64_t tempinvs[4]; for (int i = 0; i < 4; i++) { powinvs[i] = ps[i] + 1; powinvs[i] >> 1; tempinvs[i] = powinvs[i]; } fpu_powmod_4b_1n_4p(powinvs, 2 * ii_MaxN, ps); fpu_powmod_4b_1n_4p(tempinvs, ii_MaxN * ii_MaxN, ps); for (int32_t x = ii_MaxN; x >= ii_MinN; x) { for (int i = 0; i < 4; i++) { if (tempinvs[i] <= x) { ip_SquareNApp>ReportFactor(tempinvs[i], x*x, 1, ps[i]); } if (tempinvs[i] >= ps[i]  x) { ip_SquareNApp>ReportFactor(tempinvs[i], x*x, +1, ps[i]); } // do not verify factors // just write to file as k*2^n+1 // use srfile then to clean up abc file. // modified report factor so also print k. } fpu_push_1divp(ps[3]); fpu_push_1divp(ps[2]); fpu_push_1divp(ps[1]); fpu_push_1divp(ps[0]); fpu_mulmod_4a_4b_4p(powinvs, tempinvs, ps); for (int i = 0; i < 4; i++) { if (tempinvs[i] & 1) { tempinvs[i] += ps[i]; } tempinvs[i] >> 1; if (powinvs[i] & 1) { powinvs[i] += ps[i]; } powinvs[i] >> 1; if (tempinvs[i] & 1) { powinvs[i] += ps[i]; } powinvs[i] >> 1; } } fpu_pop(); fpu_pop(); fpu_pop(); fpu_pop(); } 