![]() |
[QUOTE=WraithX;313472]The purpose of -op is to check if an input number is prime or prp and then "O"utput that "P"rime number to a file.
If you'd like to save all the factors of an input number out to a file you can use the -of option, which will "O"utput "F"actors to a file. There is also a -ou option which will "O"utput an "U"nfactored number to a specified file if yafu knows that the input number is composite, but was unable to find any factors before stopping.[/QUOTE] Thanks, now it's clear for me with -op. |
By the way, in my recent compiling attempts, I've noticed the following:
[code]gcc -g -march=native -mtune=native -static -DUSE_NFS -O3 -fomit-frame-pointer -Wall -I. -Iinclude -I/usr/local/include/ -I/home/bill/yafu/ecm/ -c -o factor/tinyqs/tinySIQS.o factor/tinyqs/tinySIQS.c factor/tinyqs/tinySIQS.c: In function ‘tiny_get_params’: factor/tinyqs/tinySIQS.c:669:55: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c:673:24: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c:676:46: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c:677:46: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c: In function ‘tiny_BlockGauss’: factor/tinyqs/tinySIQS.c:1482:21: warning: ‘apoly’ may be used uninitialized in this function factor/tinyqs/tinySIQS.c:1486:33: warning: ‘bpoly’ may be used uninitialized in this function[/code] On downdriver runs, I've seen YAFU segfault on numbers between ~30-~60 digits, and that's probably the cause of it. I haven't run any testing or anything though :smile:. |
[QUOTE=Dubslow;313903]By the way, in my recent compiling attempts, I've noticed the following:
[code]gcc -g -march=native -mtune=native -static -DUSE_NFS -O3 -fomit-frame-pointer -Wall -I. -Iinclude -I/usr/local/include/ -I/home/bill/yafu/ecm/ -c -o factor/tinyqs/tinySIQS.o factor/tinyqs/tinySIQS.c factor/tinyqs/tinySIQS.c: In function ‘tiny_get_params’: factor/tinyqs/tinySIQS.c:669:55: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c:673:24: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c:676:46: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c:677:46: warning: array subscript is above array bounds factor/tinyqs/tinySIQS.c: In function ‘tiny_BlockGauss’: factor/tinyqs/tinySIQS.c:1482:21: warning: ‘apoly’ may be used uninitialized in this function factor/tinyqs/tinySIQS.c:1486:33: warning: ‘bpoly’ may be used uninitialized in this function[/code] On downdriver runs, I've seen YAFU segfault on numbers between ~30-~60 digits, and that's probably the cause of it. I haven't run any testing or anything though :smile:.[/QUOTE] No, tinySIQS is still under construction; it is not called by anything. I had some ideas for a really fast qs routine on small inputs that I'm in the process of building, but I guess I'm too lazy to use a branch. One other person has told me they've seen segfaults in that size range, and even supplied me with several examples, but I've never been able to duplicate the issue. |
Hi Ben,
I think I just found another file descriptor leak. nfs.c Line 225. Putting in an fclose() later on stops the accumulation of open files when doing multiple nfs jobs. Let me know if you have any questions. Cheers, Jonathan |
[QUOTE=jcrombie;314590]Hi Ben,
I think I just found another file descriptor leak. nfs.c Line 225. Putting in an fclose() later on stops the accumulation of open files when doing multiple nfs jobs. Let me know if you have any questions. Cheers, Jonathan[/QUOTE] Yes indeed, many thanks! |
[QUOTE=Dubslow;313903]By the way, in my recent compiling attempts, I've noticed the following:
On downdriver runs, I've seen YAFU segfault on numbers between ~30-~60 digits, and that's probably the cause of it. I haven't run any testing or anything though :smile:.[/QUOTE] I'm trying to help someone else that has reported a similar issue but I haven't been able to reproduce it. Can you be on the lookout for this happening again and post details? session.log, factor.log, screen output, whatever is available... thanks! |
[QUOTE=bsquared;314876]I'm trying to help someone else that has reported a similar issue but I haven't been able to reproduce it. Can you be on the lookout for this happening again and post details? session.log, factor.log, screen output, whatever is available...
thanks![/QUOTE] :huh: So I recall seeing segfaults, but when I ran this [URL="http://factordb.com/sequences.php?se=1&aq=2*5*3526500485061923432367983409220156464244574870194801533900127&action=all&fr=0&to=100"]contrived test case[/URL], aliqueit/yafu were fast enough that all I saw was [code]22 .run c60 = 998881009296393205225332016644065366342210983016933710695256 = 2^3 * 23609 * 977480785755394643 * 5410506809646308675021358282615697361 : Decreased! WARNING: couldn't find factor in factor.log[/code] So I went and found the [URL="http://factordb.com/index.php?id=1100000000544343721"]23rd line[/URL], put it into yafu, and while it didn't segfault, it didn't quite work properly either. [code]./yafu "factor(874100213131058476296835511642052808239428830496427359985944)" >> fac: factoring 874100213131058476296835511642052808239428830496427359985944 fac: using pretesting plan: normal fac: using tune info for qs/gnfs crossover fac: found siqs savefile, resuming siqs starting SIQS on c42: 301543875680860441336284120250710461887943 873 relations found: 473 full + 400 from 3462 partial threw away 0 relations with large primes too small ==== sieve params ==== n = 44 digits, 144 bits factor base: 784 primes (max prime = 13229) single large prime cutoff: 661450 (50 * pmax) using 32k sieve core sieve interval: 2 blocks of size 32768 polynomial A has ~ 5 factors using multiplier of 47 using SPV correction of 20 bits, starting at offset 30 using SSE2 for x32 sieve scanning using SSE2 for resieving 13-16 bit primes using SSE2 for 8x trial divison to 13 bits using inline ASM to sieve primes up to 16 bits using SSE2 for poly updating up to 15 bits trial factoring cutoff at 41 bits ==== sieving in progress (1 thread): 848 relations needed ==== ==== Press ctrl-c to abort and save state ==== sieving required 0 total polynomials trial division touched 0 sieve locations out of 0 QS elapsed time = 0.0377 seconds. ==== post processing stage (msieve-1.38) ==== begin with 3934 relations reduce to 1222 relations in 2 passes attempting to read 1222 relations recovered 1222 relations recovered 195 polynomials freed 2 duplicate relations attempting to build 870 cycles found 870 cycles in 1 passes distribution of cycle lengths: length 1 : 472 length 2 : 398 largest cycle: 2 relations matrix is 784 x 870 (0.1 MB) with weight 16765 (19.27/col) sparse part has weight 16765 (19.27/col) filtering completed in 3 passes matrix is 728 x 792 (0.1 MB) with weight 14963 (18.89/col) sparse part has weight 14963 (18.89/col) commencing Lanczos iteration memory use: 0.1 MB lanczos halted after 13 iterations (dim = 726) recovered 64 nontrivial dependencies Lanczos elapsed time = 0.0200 seconds. Sqrt elapsed time = 0.0000 seconds. SIQS elapsed time = 0.0560 seconds. pretesting / qs ratio was 0.00 Total factoring time = 0.0585 seconds ***factors found*** PRP19 = 6360254748086903119 PRP23 = 47410660048099744306697 ans = 1[/code] It worked except it didn't print any of the small factors. factor.log doesn't have much else. [code]10/16/12 23:22:15 v1.32 @ Gravemind, **************************** 10/16/12 23:23:54 v1.32.2 @ Gravemind, 10/16/12 23:23:54 v1.32.2 @ Gravemind, **************************** 10/16/12 23:23:54 v1.32.2 @ Gravemind, Starting factorization of 874100213131058476296835511642052808239428830496427359985944 10/16/12 23:23:54 v1.32.2 @ Gravemind, using pretesting plan: normal 10/16/12 23:23:54 v1.32.2 @ Gravemind, using tune info for qs/gnfs crossover 10/16/12 23:23:54 v1.32.2 @ Gravemind, **************************** 10/16/12 23:23:54 v1.32.2 @ Gravemind, starting SIQS on c42: 301543875680860441336284120250710461887943 10/16/12 23:23:54 v1.32.2 @ Gravemind, random seeds: 2644775804, 1043351560 10/16/12 23:23:54 v1.32.2 @ Gravemind, ==== sieve params ==== 10/16/12 23:23:54 v1.32.2 @ Gravemind, n = 44 digits, 144 bits 10/16/12 23:23:54 v1.32.2 @ Gravemind, factor base: 784 primes (max prime = 13229) 10/16/12 23:23:54 v1.32.2 @ Gravemind, single large prime cutoff: 661450 (50 * pmax) 10/16/12 23:23:54 v1.32.2 @ Gravemind, using 32k sieve core 10/16/12 23:23:54 v1.32.2 @ Gravemind, sieve interval: 2 blocks of size 32768 10/16/12 23:23:54 v1.32.2 @ Gravemind, polynomial A has ~ 5 factors 10/16/12 23:23:54 v1.32.2 @ Gravemind, using multiplier of 47 10/16/12 23:23:54 v1.32.2 @ Gravemind, using SPV correction of 20 bits, starting at offset 30 10/16/12 23:23:54 v1.32.2 @ Gravemind, using SSE2 for trial division and x32 sieve scanning 10/16/12 23:23:54 v1.32.2 @ Gravemind, using SSE2 for resieving 13-16 bit primes 10/16/12 23:23:54 v1.32.2 @ Gravemind, using inline ASM to sieve primes up to 16 bits 10/16/12 23:23:54 v1.32.2 @ Gravemind, trial factoring cutoff at 41 bits 10/16/12 23:23:54 v1.32.2 @ Gravemind, ==== sieving started (1 thread) ==== 10/16/12 23:23:54 v1.32.2 @ Gravemind, trial division touched 0 sieve locations out of 0 10/16/12 23:23:54 v1.32.2 @ Gravemind, 873 relations found: 473 full + 400 from 3462 partial, using 0 polys (-1 A polys) 10/16/12 23:23:54 v1.32.2 @ Gravemind, on average, sieving found inf rels/poly and 104434.83 rels/sec 10/16/12 23:23:54 v1.32.2 @ Gravemind, trial division touched 0 sieve locations out of 0 10/16/12 23:23:54 v1.32.2 @ Gravemind, ==== post processing stage (msieve-1.38) ==== 10/16/12 23:23:54 v1.32.2 @ Gravemind, begin with 3934 relations 10/16/12 23:23:54 v1.32.2 @ Gravemind, reduce to 1222 relations in 2 passes 10/16/12 23:23:54 v1.32.2 @ Gravemind, recovered 1222 relations 10/16/12 23:23:54 v1.32.2 @ Gravemind, recovered 195 polynomials 10/16/12 23:23:54 v1.32.2 @ Gravemind, freed 2 duplicate relations 10/16/12 23:23:54 v1.32.2 @ Gravemind, attempting to build 870 cycles 10/16/12 23:23:54 v1.32.2 @ Gravemind, found 870 cycles in 1 passes 10/16/12 23:23:54 v1.32.2 @ Gravemind, distribution of cycle lengths: 10/16/12 23:23:54 v1.32.2 @ Gravemind, length 1 : 472 10/16/12 23:23:54 v1.32.2 @ Gravemind, length 2 : 398 10/16/12 23:23:54 v1.32.2 @ Gravemind, largest cycle: 2 relations 10/16/12 23:23:54 v1.32.2 @ Gravemind, matrix is 784 x 870 (0.1 MB) with weight 16765 (19.27/col) 10/16/12 23:23:54 v1.32.2 @ Gravemind, sparse part has weight 16765 (19.27/col) 10/16/12 23:23:54 v1.32.2 @ Gravemind, filtering completed in 3 passes 10/16/12 23:23:54 v1.32.2 @ Gravemind, matrix is 728 x 792 (0.1 MB) with weight 14963 (18.89/col) 10/16/12 23:23:54 v1.32.2 @ Gravemind, sparse part has weight 14963 (18.89/col) 10/16/12 23:23:54 v1.32.2 @ Gravemind, commencing Lanczos iteration 10/16/12 23:23:54 v1.32.2 @ Gravemind, memory use: 0.1 MB 10/16/12 23:23:54 v1.32.2 @ Gravemind, lanczos halted after 13 iterations (dim = 726) 10/16/12 23:23:54 v1.32.2 @ Gravemind, recovered 64 nontrivial dependencies 10/16/12 23:23:54 v1.32.2 @ Gravemind, prp19 = 6360254748086903119 10/16/12 23:23:54 v1.32.2 @ Gravemind, prp23 = 47410660048099744306697 10/16/12 23:23:54 v1.32.2 @ Gravemind, Lanczos elapsed time = 0.0200 seconds. 10/16/12 23:23:54 v1.32.2 @ Gravemind, Sqrt elapsed time = 0.0000 seconds. 10/16/12 23:23:54 v1.32.2 @ Gravemind, SIQS elapsed time = 0.0560 seconds. 10/16/12 23:23:54 v1.32.2 @ Gravemind, 10/16/12 23:23:54 v1.32.2 @ Gravemind, 10/16/12 23:23:54 v1.32.2 @ Gravemind, Total factoring time = 0.0585 seconds[/code] session.log had nothing but the random seeds. [code]10/16/12 23:23:54 v1.32.2 @ Gravemind, New random seeds: 2644775804, 1043351560 10/16/12 23:23:54 v1.32.2 @ Gravemind, Processing expression: factor(874100213131058476296835511642052808239428830496427359985944)[/code] Edit: It appears the siqs.dat file isn't deleted between calls by aliqueit. :huh: I just tried after manually deleting it, and that worked as desired. [code]./yafu "factor(874100213131058476296835511642052808239428830496427359985944)" >> fac: factoring 874100213131058476296835511642052808239428830496427359985944 fac: using pretesting plan: normal fac: using tune info for qs/gnfs crossover div: primes less than 10000 div: found prime factor = 2 div: found prime factor = 2 div: found prime factor = 2 div: found prime factor = 263 div: found prime factor = 317 fmt: 1000000 iterations rho: x^2 + 3, starting 1000 iterations on C55 rho: x^2 + 2, starting 1000 iterations on C55 rho: found prp6 factor = 444791 rho: x^2 + 2, starting 1000 iterations on C49 rho: found prp7 factor = 9771241 rho: x^2 + 2, starting 1000 iterations on C42 rho: x^2 + 1, starting 1000 iterations on C42 pm1: starting B1 = 150K, B2 = gmp-ecm default on C42 fac: setting target pretesting digits to 12.92 fac: sum of completed work is t0.00 fac: work done at B1=2000: 0 curves, max work = 30 curves fac: 30 more curves at B1=2000 needed to get to t12.92 ecm: 30/30 curves on C42, B1=2K, B2=gmp-ecm default fac: setting target pretesting digits to 12.92 fac: t15: 1.00 fac: t20: 0.04 fac: sum of completed work is t15.18 starting SIQS on c42: 301543875680860441336284120250710461887943 blah blah ***factors found*** P1 = 2 P1 = 2 P1 = 2 P3 = 263 P3 = 317 P6 = 444791 P7 = 9771241 PRP23 = 47410660048099744306697 PRP19 = 6360254748086903119 ans = 1[/code] siqs.dat still existed after this run, so just add a remove() call somewhere after the siqs code. (Not sure what the segfaulting is atm.) |
Aliqueit also had more barfing on [URL="http://factordb.com/index.php?id=1100000000544343733"]iter 27[/URL], but when I ran YAFU just now [i]without[/i] deleting siqs.dat, it factored just fine (without siqs).
[code]26 .run c60 = 615286477111732181679951035842167338884881007577000991627976 = 2^3 * 7^2 * 13 * 4142360789771 * 29147413936495125970898997707508626121770311 : Decreased! WARNING: couldn't find factor in factor.log WARNING: couldn't find factor in factor.log WARNING: couldn't find factor in factor.log WARNING: couldn't find factor in factor.log WARNING: couldn't find factor in factor.log WARNING: couldn't find factor in factor.log[/code] [code]./yafu "factor(829960605115350271481237315335080901091780286960460109274104)" 10/16/12 23:33:31 v1.32.2 @ Gravemind, System/Build Info: Using GMP-ECM 6.4.2, Powered by GMP 5.0.4 detected Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz detected L1 = 32768 bytes, L2 = 8388608 bytes, CL = 64 bytes measured cpu frequency ~= 3392.303850 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 >> fac: factoring 829960605115350271481237315335080901091780286960460109274104 fac: using pretesting plan: normal fac: using tune info for qs/gnfs crossover div: primes less than 10000 div: found prime factor = 2 div: found prime factor = 2 div: found prime factor = 2 div: found prime factor = 7 div: found prime factor = 7 div: found prime factor = 11 div: found prime factor = 13 div: found prime factor = 503 div: found prime factor = 1039 fmt: 1000000 iterations rho: x^2 + 3, starting 1000 iterations on C50 rho: x^2 + 2, starting 1000 iterations on C50 rho: x^2 + 1, starting 1000 iterations on C50 rho: found prp8 factor = 30988831 rho: x^2 + 1, starting 1000 iterations on C42 pm1: starting B1 = 150K, B2 = gmp-ecm default on C42 pm1: found prp14 factor = 14907968152709 fac: setting target pretesting digits to 8.92 fac: sum of completed work is t0.00 fac: work done at B1=2000: 0 curves, max work = 30 curves fac: 30 more curves at B1=2000 needed to get to t8.92 Total factoring time = 0.0781 seconds ***factors found*** P1 = 2 P1 = 2 P1 = 2 P1 = 7 P1 = 7 P2 = 11 P2 = 13 P3 = 503 P4 = 1039 P8 = 30988831 PRP14 = 14907968152709 PRP29 = 61323677594622203904291821963 ans = 1[/code] |
I just did some more testing with aliqueit showing all the yafu output, and it factored it correctly but I still got the error; I paused aliqueit and factor.log didn't exist o_0 so I factored it with yafu manually, and factor.log appeared. :huh: Is there a file handle collision somewhere? Because in aliqueit's case, it's getting called hundreds of times per second...
|
If you factor the C60 in yafu you get:
[code] P1 = 2 P1 = 2 P1 = 2 P1 = 7 P1 = 7 P2 = 13 PRP13 = 4142360789771 PRP44 = 29147413936495125970898997707508626121770311 [/code] In aliqueit.cc there is the function "find_log_factors" which needs the string to find a line with a factor. The 3 functions run_yafu(), run_factor() and run_msieve() (which only write the error "WARNING: couldn't find factor in factor.log") gives the search string for the first 2 with "prp" and for the last with "factor:". The output above corresponds with the 6 warnings: the factors found are not PRP but P! This should help here. |
The problem I'm talking about is a real crash (segfault). The person I'm helping sent me a couple windows .dmp files, which I have no idea what to do with, but show that there is something wrong somewhere. I just can't reproduce it so I'm looking for more data.
|
| All times are UTC. The time now is 23:28. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.