20200326, 16:43  #78 
"Ben"
Feb 2007
2×3×7^{2}×11 Posts 
Sorry  sometimes svn is frustrating. I removed the SVNinserted conflict marker junk... Try it now.

20200326, 17:03  #79 
Aug 2006
Monza, Italy
5·7 Posts 
factor(2) now works but factor(2^308+97) still segfaults.
Code:
redgolpe@c2018:~/yafu$ ./yafu 03/26/20 18:00:43 v1.35beta @ c2018, System/Build Info: Using GMPECM 7.0.5dev, Powered by GMP 6.2.0 detected Intel(R) Core(TM) i77800X CPU @ 3.50GHz detected L1 = 32768 bytes, L2 = 8650752 bytes, CL = 64 bytes measured cpu frequency ~= 3503.994240 using 1 random witnesses for RabinMiller 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 >> factor(2) fac: factoring 2 fac: using pretesting plan: normal fac: using specified qs/gnfs crossover of 93 digits fac: using specified qs/snfs crossover of 75 digits div: primes less than 10000 Total factoring time = 0.0047 seconds ***factors found*** P1 = 2 1 >> factor(2^308+97) fac: factoring 521481209941628438084722096232800809229175908778479680162851955034721612739414196782949728353 fac: using pretesting plan: normal fac: using specified qs/gnfs crossover of 93 digits fac: using specified qs/snfs crossover of 75 digits div: primes less than 10000 fmt: 1000000 iterations rho: x^2 + 3, starting 200 iterations on C93 rho: x^2 + 3, starting 200 iterations on C87 rho: x^2 + 2, starting 200 iterations on C87 rho: x^2 + 1, starting 200 iterations on C87 nfs: searching for brent special forms... nfs: input divides 2^308 + 97 Segmentation fault (core dumped) redgolpe@c2018:~/yafu$ 
20200326, 17:39  #80 
Aug 2006
Monza, Italy
43_{8} Posts 
SIQS seems to work for any number. Segfaults seem confined to composites for which NFS is invoked.
Code:
>> siqs(2^308+97) starting SIQS on c93: [...] ***factors found*** P6 = 785033 P41 = 21544259627996485962520784751544229716373 ***cofactor*** C47 = 30833240972859993737296999866502074697103820917 ans = 24205111660647199463571475696199723205691503845935261 >> 
20200326, 17:56  #81  
"Ben"
Feb 2007
2·3·7^{2}·11 Posts 
Quote:
in include\gmp_xface.h replace this code (starting at line 50 in my version) Code:
static INLINE void uint64_2gmp(uint64 src, mpz_t dest) { #if GMP_LIMB_BITS == 64 dest>_mp_d[0] = src; dest>_mp_size = (src ? 1 : 0); #else /* mpz_import is terribly slow */ mpz_set_ui(dest, (uint32)(src >> 32)); mpz_mul_2exp(dest, dest, 32); mpz_add_ui(dest, dest, (uint32)src); #endif } with this code: Code:
static INLINE void uint64_2gmp(uint64 src, mpz_t dest) { #if GMP_LIMB_BITS == 64 mpz_set_ui(dest, src); #else /* mpz_import is terribly slow */ mpz_set_ui(dest, (uint32)(src >> 32)); mpz_mul_2exp(dest, dest, 32); mpz_add_ui(dest, dest, (uint32)src); #endif } Last fiddled with by bsquared on 20200326 at 17:56 Reason: the whole function... 

20200326, 18:35  #82 
Aug 2006
Monza, Italy
5×7 Posts 
It looks like it's working, no errors on any input so far with the msieve patch. I assume you have means to directly contact the author about the needed fix. Thank you for the time you spend on this project, and let me know if you need a beta tester

20200326, 19:00  #83  
"Ben"
Feb 2007
2·3·7^{2}·11 Posts 
Quote:
Thank you very much for your reports and testing! This is how these projects get better. 

20200326, 20:38  #84 
"Ed Hall"
Dec 2009
Adirondack Mtns
2×3×499 Posts 
The wip branch appears to be working 100% for me here now with GMP 6.2.0.
Thanks much! 
20200327, 15:28  #85 
Aug 2006
Monza, Italy
5·7 Posts 
Results on Ubuntu 18.04.4 with yafu v1.35beta, GMPECM 7.0.5dev, GMP 6.2.0, Msieve 1.54 (patched) of factor(2^308+97):
Intel(R) Core(TM) i77800X CPU @ 3.50GHz (skylake), 12 logical processors, 32 GB RAM: 12.3395 seconds Intel(R) Core(TM) i75820K CPU @ 3.30GHz (haswell), 12 logical processors, 8 GB RAM: 14.9494 seconds Intel(R) Core(TM) i73820 CPU @ 3.60GHz (sandy bridge), 8 logical processors, 8 GB RAM: 21.1907 seconds 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How I Install CADONFS onto my Ubuntu Machines  EdH  EdH  3  20190624 03:42 
How I Install GMPECM onto my Ubuntu Machines  EdH  EdH  12  20190416 09:28 
How I Install msieve onto my Ubuntu Machines  EdH  EdH  0  20180223 14:43 
How I Install ggnfs onto my Ubuntu Machines  EdH  EdH  0  20180222 03:31 
How I Install GMP onto my Ubuntu Machines  EdH  EdH  0  20180221 23:48 