20160926, 07:24  #1 
Banned
"Luigi"
Aug 2002
Team Italia
12A0_{16} Posts 
Fermat code
Rogue graciously provided vversion 2.5 of his GMPFermat code: it has embedded assembly routines and corrected a couple of small bugs of the previous versions. It may be used to chase double Mersennes factors.
Last fiddled with by ET_ on 20160926 at 07:26 
20161107, 14:46  #2 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
2^{7}·37 Posts 
Luigi, can you compile GMPFermat version 2.5 for windows 64 bit?

20161107, 16:19  #3 
Banned
"Luigi"
Aug 2002
Team Italia
2^{5}·149 Posts 

20161107, 17:38  #4 
Einyen
Dec 2003
Denmark
2^{3}·7·53 Posts 
I can try and see if I can compile it with Msys2 and Mingw64, where is the code?

20161107, 18:48  #5  
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
2^{7}·37 Posts 
Quote:
Thank you. 

20161107, 21:02  #6 
Einyen
Dec 2003
Denmark
2^{3}×7×53 Posts 
I compiled it, and it seems fermat64.exe and fermat64_redc.exe is working. But dm.exe (DoubleMersenne) does not seem to do anything, even though it compiled without errors:
gmpfermat.zip 
20161108, 10:03  #7  
Banned
"Luigi"
Aug 2002
Team Italia
2^{5}·149 Posts 
Quote:
I used the following makefile: Code:
Executables were compiled with gcc version 5.4.0 20160609 using these command lines: gcc Wall m64 march=native O2 o fermat64 fermat_redc.c lgmp lm gcc Wall m64 march=native O2 DUSE_REDC o fermat64_redc fermat_redc.c *.S lgmp lm gcc Wall m64 march=native O2 DUSE_REDC D_DM_ o dm fermat_redc.c *.S lgmp lm Luigi 

20161108, 10:40  #8 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
2^{7}×37 Posts 
Andreas,
I get this error on my Sandy Bridge laptop. Code:
Problem signature: Problem Event Name: APPCRASH Application Name: fermat64.exe Application Version: 0.0.0.0 Application Timestamp: 5820e7d0 Fault Module Name: fermat64.exe Fault Module Version: 0.0.0.0 Fault Module Timestamp: 5820e7d0 Exception Code: c000001d Exception Offset: 000000000000167e OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 2057 Additional Information 1: 732c Additional Information 2: 732c1a33d5a194e791bc6d9948b039ca Additional Information 3: acfe Additional Information 4: acfe00ad04837015f217bd304564160f Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\enUS\erofflps.txt 
20161109, 09:51  #9  
Einyen
Dec 2003
Denmark
2^{3}·7·53 Posts 
Quote:
@Carlos: Try this one I compiled on my Sandy Bridge laptop. I renamed the other one to Haswell: gmpfermatsandybridge.zip gmpfermathaswell.zip 

20161109, 10:24  #10 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
4736_{10} Posts 
Thank you Andreas.

20161109, 13:54  #11  
Banned
"Luigi"
Aug 2002
Team Italia
2^{5}·149 Posts 
Quote:
Code:
kStart=1 kEnd=500000 nStart=17 nEnd=17 FilterPrimes=10000 Code:
GMPDoubleMersenne version 2.5 kStart from fermat.ini is odd, it will be made even. Processing range of k from 2 to 500000 and range of n from 17 to 17 Testing for n = 17 Found factor 1768*(2^171)+1 of 2^(2^171)1 Found factor 490546*(2^171)+1 of 2^(2^171)1 Overall rate for n=17: tested 11517 of 499999 numbers ( 2.30 pct) in 0.01 seconds at 64699664 k per second Done real 0m0.576s user 0m0.448s sys 0m0.000s 1  Keep SievePrimes lower than the value used for Fermat factors, as the initialization for (say) 100,000 primes is about 60 seconds, while the gain in percent is not so high. 2  The k here is seen as 2*k, both in the kStart/kEnd pair and in the result (1768 = 2*884). As a comparative benchmark, here is the same range, with kEnd = 50000000 and SievePrimes = 100000: Code:
GMPDoubleMersenne version 2.5 kStart from fermat.ini is odd, it will be made even. Processing range of k from 2 to 50000000 and range of n from 17 to 17 Testing for n = 17 Found factor 1768*(2^171)+1 of 2^(2^171)1 Found factor 490546*(2^171)+1 of 2^(2^171)1 Overall rate for n=17: tested 913353 of 49999999 numbers ( 1.83 pct) in 0.57 seconds at 87506058 k per second Done real 1m4.643s user 0m55.148s sys 0m0.180s Now, my questions/requests: May I have a link where your Windows executables are? I might either download the differently optimized codes or link your page from FermatSearch download page... Last fiddled with by ET_ on 20161109 at 13:57 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Fermat code performances  ET_  FermatSearch  29  20180315 19:06 
Rho code  Happy5214  YAFU  3  20151101 21:54 
Please help me with my code  daxmick  Programming  15  20140214 11:57 
Code Help  Andrew  Programming  12  20130216 20:53 
New Code  JohnFullspeed  Programming  20  20110904 04:28 