![]() |
I upgraded gmp from 5.1.2 to 5.1.3 and got the latest msieve and yafu and recompiled everything from scratch on multiple machines. YAFU now does the following on each one:
[code] 01/20/14 00:34:55 v1.34.5 @ math85, System/Build Info: Using GMP-ECM, Powered by GMP detected Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz detected L1 = 32768 bytes, L2 = 4194304 bytes, CL = 64 bytes measured cpu frequency ~= 2659.983410 using 20 random witnesses for Rabin-Miller PRP checks =============================================================== ======= Welcome to YAFU (Yet Another Factoring Utility) ======= ======= bbuhrow@gmail.com ======= ======= Type help at any time, or quit to quit ======= =============================================================== cached 78498 primes. pmax = 999983 >> siqs(3012104413) ***factors found*** P2 = 13 C10 = 3012104413 1 >> [/code]I'll play some more later to see if I can tell which upgrade broke it, but anyone else is invited to verify. Thanks for all the work. |
gmp 5.1.2 - msieve 886 - yafu 1.34.5 rev ?? (prior to svn move)
[code] >> siqs(3012104413) ***factors found*** P5 = 97577 P5 = 30869 ans = 1 [/code]Same everything, except yafu 1.34.5 rev 324: [code] >> siqs(3012104413) ***factors found*** P2 = 13 C10 = 3012104413 1 [/code]On several machines.:sad: Tomorrow I'll try to go backwards in revisions... |
[QUOTE=EdH;364946]...
Tomorrow I'll try to go backwards in revisions...[/QUOTE] Here are my results, verified on multiple machines. revision 320: [code] ***factors found*** P5 = 97577 P5 = 30869 ans = 1 [/code]revision 321: [code] ***factors found*** P2 = 13 C10 = 3012104413 ans = 1 [/code]files changed between r320 and r321: [code] U /home/math24/Math/yafu/include/factor.h U /home/math24/Math/yafu/include/nfs.h U /home/math24/Math/yafu/factor/qs/smallmpqs.c U /home/math24/Math/yafu/factor/nfs/nfs.c U /home/math24/Math/yafu/factor/nfs/nfs_poly.c U /home/math24/Math/yafu/factor/nfs/snfs.c U /home/math24/Math/yafu/factor/factor_common.c [/code]But, I wonder...no one else can verify one way or the other, or, no one else has tried? I took a quick look at the difference between versions for smallmpqs.c and saw you did quite a lot of work on that code. Thanks for all... |
Thanks, EdH, for the detective work.
Fixed in r325. |
[QUOTE=bsquared;364979]Thanks, EdH, for the detective work.
Fixed in r325.[/QUOTE] Updated and fully operatingl! Thanks much, B[SUP]2[/SUP]!!... |
r326:[code]nextprime(33)
ans = 2[/code]It looks like this was introduced in r318. Any odd input to nextprime is incorrect, as the initial value is never initialized to the input. There are multiple ways to fix it so I think you should choose which style is best. Here is a suggestion. [code]Index: top/utils.c =================================================================== --- top/utils.c (revision 326) +++ top/utils.c (working copy) @@ -488,10 +488,11 @@ // my naive implementation that does a tiny amount of trial division first! //mpz_nextprime(p, n); + mpz_set(p, n); // start on an odd number if (mpz_even_p(n)) { - mpz_add_ui(p, n, 1); + mpz_add_ui(p, p, 1); a++; if ((VFLAG > 0) && (mpz_sizeinbase(n,10) > 1024)) { @@ -563,10 +564,11 @@ mpz_set_ui(p, 13); else { + mpz_set(p, n); // start on an odd number if (mpz_even_p(n)) { - mpz_sub_ui(p, n, 1); + mpz_sub_ui(p, p, 1); a++; if ((VFLAG > 0) && [/code]On a different note, for some time now I've had to wrap factor/factor_common.c lines 1624-1633 in "#if USE_SNFS" or it won't link. On a related note, have you considered, everywhere you're using NUM_WITNESSES, instead using something like: [FONT=Courier New] mpz_probab_prime_p(p,1) && mpz_strongbpsw_prp(p)[/FONT] which should be pretty close to the same speed on composites, but faster for primes (and there are faster GMP BPSW implementations). It also gives arguable better results: BPSW+1 M-R with semi-random base, vs. 20 M-R with semi-random bases. (I say semi-random because GMP and MPIR use the same seed for every call, so you can search for countexamples, see [URL="http://www.trnicely.net/misc/mpzspsp.html"]Nicely's page[/URL] for instance). Just a thought. |
All excellent suggestions, catches, and fixes, thanks!
[URL="http://sourceforge.net/p/yafu/code/327/"]r327[/URL] |
How the [URL="http://www.mersenneforum.org/showthread.php?p=366173"]new msieve[/URL] release will affect yafu? (I am thinking to the "faster LA" part of msieve, more or less, and I assume it is not yet in the new yafu).
|
[QUOTE=LaurV;366178]How the [URL="http://www.mersenneforum.org/showthread.php?p=366173"]new msieve[/URL] release will affect yafu? (I am thinking to the "faster LA" part of msieve, more or less, and I assume it is not yet in the new yafu).[/QUOTE]
I haven't checked how it will affect anything. but assuming the interface is still compatible then anything new in the cpu branch of msieve should carryover, once I update to the new msieve source. |
ECM not run very optimally?
Hi,
Yafu seems to run ECM threads in a rather suboptimal way. I have set it to use 8 threads, and what I see is this: Yafu launches 8 ECM processes at once, then waits until [I]all[/I] of them have terminated until it launches 8 new ones. Therefore after 7 of the processes have terminated, the last one runs single-threaded to completion, which is not optimal. |
I'm trying to use yafu to generate SNFS polynomials, but in most cases I get something like: [code]
yafu "snfs(785147655469^11-1, (785147655469^11-1)/412321076416675668)" -np -job opn3.poly -v 02/21/14 17:56:06 v1.34.5 @ linux-5hwg, System/Build Info: Using GMP-ECM 6.4.4, Powered by GMP 5.1.1 detected AMD Athlon(tm) II X2 240 Processor detected L1 = 65536 bytes, L2 = 1048576 bytes, CL = 64 bytes measured cpu frequency ~= 2800.011550 using 20 random witnesses for Rabin-Miller PRP checks =============================================================== ======= Welcome to YAFU (Yet Another Factoring Utility) ======= ======= bbuhrow@gmail.com ======= ======= Type help at any time, or quit to quit ======= =============================================================== cached 78498 primes. pmax = 999983 >> nfs: checking for job file - no job file found nfs: checking for poly file - no poly file found nfs: commencing nfs on c131: 69897995262237401384834482134705237527278265531430925083091457319961583310673219510486114342658465407446141111495051191668134955668 nfs: searching for brent special forms... nfs: searching for homogeneous cunningham special forms... nfs: searching for XYYXF special forms... nfs: couldn't find special form nfs: failed to find snfs polynomial! [/code] And similar for (792^48-2)/5587590670330242555933682 Am I doing something wrong? What cases can yafu find a polynomial for? Chris |
| All times are UTC. The time now is 22:03. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.