mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2012-10-03, 12:52   #122
VolMike
 
VolMike's Avatar
 
Jun 2007
Moscow,Russia

7×19 Posts
Default

Quote:
Originally Posted by WraithX View Post
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.
Thanks, now it's clear for me with -op.
VolMike is offline   Reply With Quote
Old 2012-10-07, 05:56   #123
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

1C1D16 Posts
Default

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
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 .
Dubslow is offline   Reply With Quote
Old 2012-10-07, 13:47   #124
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

64218 Posts
Default

Quote:
Originally Posted by Dubslow View Post
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
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 .
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.
bsquared is offline   Reply With Quote
Old 2012-10-14, 06:14   #125
jcrombie
 
jcrombie's Avatar
 
"Jonathan"
Jul 2010
In a tangled web...

2×107 Posts
Default

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
jcrombie is offline   Reply With Quote
Old 2012-10-15, 01:56   #126
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·5·223 Posts
Default

Quote:
Originally Posted by jcrombie View Post
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
Yes indeed, many thanks!
bsquared is offline   Reply With Quote
Old 2012-10-16, 16:01   #127
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·5·223 Posts
Default

Quote:
Originally Posted by Dubslow View Post
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 .
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!
bsquared is offline   Reply With Quote
Old 2012-10-17, 04:28   #128
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·2,399 Posts
Default

Quote:
Originally Posted by bsquared View Post
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!


So I recall seeing segfaults, but when I ran this contrived test case, 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
So I went and found the 23rd line, 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
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
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)
Edit: It appears the siqs.dat file isn't deleted between calls by aliqueit. 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
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.)

Last fiddled with by Dubslow on 2012-10-17 at 04:32
Dubslow is offline   Reply With Quote
Old 2012-10-17, 04:36   #129
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·2,399 Posts
Default

Aliqueit also had more barfing on iter 27, but when I ran YAFU just now without 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:
./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
Dubslow is offline   Reply With Quote
Old 2012-10-17, 06:24   #130
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×2,399 Posts
Default

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. Is there a file handle collision somewhere? Because in aliqueit's case, it's getting called hundreds of times per second...
Dubslow is offline   Reply With Quote
Old 2012-10-17, 08:40   #131
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

54478 Posts
Default

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
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.
kar_bon is offline   Reply With Quote
Old 2012-10-17, 13:15   #132
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·5·223 Posts
Default

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.
bsquared is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running YAFU via Aliqueit doesn't find yafu.ini EdH YAFU 8 2018-03-14 17:22
Where to report bugs Matt Software 1 2007-02-20 19:13
Possible Prime95 bugs JuanTutors Software 9 2006-09-24 21:22
RMA 1.7 beta bugs TTn 15k Search 2 2004-11-24 22:11
RMA 1.6 fixes LLR bugs! TTn 15k Search 16 2004-06-16 01:22

All times are UTC. The time now is 08:40.

Tue Dec 1 08:40:23 UTC 2020 up 82 days, 5:51, 1 user, load averages: 2.42, 2.22, 1.93

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.