![]() |
![]() |
#78 |
"Ben"
Feb 2007
3,361 Posts |
![]()
Sorry - sometimes svn is frustrating. I removed the SVN-inserted conflict marker junk... Try it now.
|
![]() |
![]() |
![]() |
#79 |
Aug 2006
Monza, Italy
22×17 Posts |
![]()
factor(2) now works but factor(2^308+97) still segfaults.
Code:
redgolpe@c2018:~/yafu$ ./yafu 03/26/20 18:00:43 v1.35-beta @ c2018, System/Build Info: Using GMP-ECM 7.0.5-dev, Powered by GMP 6.2.0 detected Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz detected L1 = 32768 bytes, L2 = 8650752 bytes, CL = 64 bytes measured cpu frequency ~= 3503.994240 using 1 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 >> 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$ |
![]() |
![]() |
![]() |
#80 |
Aug 2006
Monza, Italy
22·17 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 ***co-factor*** C47 = 30833240972859993737296999866502074697103820917 ans = 24205111660647199463571475696199723205691503845935261 >> |
![]() |
![]() |
![]() |
#81 | |
"Ben"
Feb 2007
3,361 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 2020-03-26 at 17:56 Reason: the whole function... |
|
![]() |
![]() |
![]() |
#82 |
Aug 2006
Monza, Italy
22×17 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
![]() |
![]() |
![]() |
![]() |
#83 | |
"Ben"
Feb 2007
3,361 Posts |
![]() Quote:
Thank you very much for your reports and testing! This is how these projects get better. ![]() |
|
![]() |
![]() |
![]() |
#84 |
"Ed Hall"
Dec 2009
Adirondack Mtns
2·32·197 Posts |
![]()
The wip branch appears to be working 100% for me here now with GMP 6.2.0.
Thanks much! |
![]() |
![]() |
![]() |
#85 |
Aug 2006
Monza, Italy
22×17 Posts |
![]()
Results on Ubuntu 18.04.4 with yafu v1.35-beta, GMP-ECM 7.0.5-dev, GMP 6.2.0, Msieve 1.54 (patched) of factor(2^308+97):
Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz (skylake), 12 logical processors, 32 GB RAM: 12.3395 seconds Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz (haswell), 12 logical processors, 8 GB RAM: 14.9494 seconds Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (sandy bridge), 8 logical processors, 8 GB RAM: 21.1907 seconds |
![]() |
![]() |
![]() |
#86 |
Mar 2010
5×11 Posts |
![]()
Ed - your guides are a God-send, thanks so much for writing them up and, more importantly, keeping them current!
I installed everything without a hitch - except Yafu. Not an issue, just looking for clarification: I couldn't understand the "Using a text editor, open the Makefile file and make the following edit:" section (was I supposed to just change the highlighted text?) so I just replaced the entire 'ifeq ($(NFS),1)' clause in the Makefile with what you posted, that seemed to work fine. The one edit I had to make that you didn't list: I got an error executing the Makefile because it couldn't find the command 'gcc-7.2.1' so I changed it to 'gcc' and that did the trick. After many years, it's great to be current with my factoring tools. On my newly built 32 thread AMD 3950X Ubuntu 19.10 system, I factored 2^308+97 in 5.0s. ![]() |
![]() |
![]() |
![]() |
#87 | |
"Ed Hall"
Dec 2009
Adirondack Mtns
2×32×197 Posts |
![]() Quote:
Yes, the bold line(s) is(are) the only change(s) necessary. I wonder about your gcc-7.2.1, though. That seems old. It's been 7.3.0 for many revisions. |
|
![]() |
![]() |
![]() |
#88 |
Mar 2010
5·11 Posts |
![]()
I'm using the wip version.
Interesting about the bold edit - the text in my make file looked nothing like what you quoted. Sorry, my mistake, it was gcc-7.3.0 and my system now has gcc-9.2.1, so I mixed them up. Eh, all's well that end's well. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How I Install CADO-NFS onto my Ubuntu Machines | EdH | EdH | 3 | 2019-06-24 03:42 |
How I Install GMP-ECM onto my Ubuntu Machines | EdH | EdH | 12 | 2019-04-16 09:28 |
How I Install msieve onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-23 14:43 |
How I Install ggnfs onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-22 03:31 |
How I Install GMP onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-21 23:48 |