![]() |
[QUOTE=rogue;535644]:censored: Yet another reason to dislike Windows. Thanks for finding the reason.[/QUOTE]
Was a fixed version ever posted for this problem? I also run ubuntu, also have the "Unable to lock mutex thread_1_worker. Exiting" error. 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. |
[QUOTE=VBCurtis;545178]Was a fixed version ever posted for this problem? I also run ubuntu, also have the "Unable to lock mutex thread_1_worker. Exiting" error.
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.[/QUOTE] Worker.h was fixed on 1/20. The latest build has that fix. |
Well, I've tried the download button from the sourceforge project, and the link from [url]http://www.mersenneforum.org/rogue/mtsieve.html[/url] (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. |
[QUOTE=VBCurtis;545180]Well, I've tried the download button from the sourceforge project, and the link from [url]http://www.mersenneforum.org/rogue/mtsieve.html[/url] (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.[/QUOTE] The source is only in sourceforge. I do not provide Linux builds and I do not know the last version built for linux. The issue was encountered on Windows, but could happen on other platforms. |
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. |
[QUOTE=VBCurtis;545194]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.[/QUOTE] This was updated in revision 16 months ago. I'm not certain why you are seeing something different. |
If using fbncsieve.exe can you sieve sequence k*2^n+1 and k*2^n-1 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. |
[QUOTE=Citrix;545477]If using fbncsieve.exe can you sieve sequence k*2^n+1 and k*2^n-1 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.[/QUOTE] Use twinsieve with the -s argument to sieve for a single fixed n and both +1 and -1. 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. |
I posted the binaries to mtsieve 2.0.0 at sourceforge. This is what I fixed:
[list][*]Fixed an issue with the framework where it could stop sieving before reaching the max prime specified on the command line.[*]Fixed a link issue with gfndsieve and dmdsieve with GMP on OS X.[*]Fixed a compiler issue with the .align ASM instruction on OS X.[/list] |
[QUOTE=rogue;545486]Use twinsieve with the -s argument to sieve for a single fixed n and both +1 and -1.
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.[/QUOTE] Thanks. 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; } } [/code] |
1 Attachment(s)
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(); } [/code] |
| All times are UTC. The time now is 22:45. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.