![]() |
![]() |
#1 |
"Matthew Anderson"
Dec 2010
Oregon, USA
659 Posts |
![]()
HI,
I want to search for factors of Fermat numbers on my Windows 7 system. I have been using the files at: http://www.fermatsearch.org/download.html I want to search faster than Fermat.exe by Duhrman. I have some GMP libraries compiled for windows. I want to incorporate fast multiplication. I want the two attached files combined into a better executable. I heard from Luigi Morelli that Brian Gladman can do this. I am unable to attach files larger than 1MB. Email mattcanderson@juno.com if you want the Windows C project that has a working executable. The file is called WinFermat_latest.zip Cheers, Matt |
![]() |
![]() |
![]() |
#2 | |
Banned
"Luigi"
Aug 2002
Team Italia
10010110000002 Posts |
![]() Quote:
AFAIK, the fermat-redc.c source code has external definitions for Linux precompiiled object modules. Those modules were compiled by Geoffrey Reynolds (Geoff), based on Ken_g6 assembly source code. I was unable to decompile them, or translate into MASM readable format. Luigi |
|
![]() |
![]() |
![]() |
#3 |
"Mark"
Apr 2003
Between here and the
186416 Posts |
![]()
You should be able to build with MinGW or CygWin.
Last fiddled with by rogue on 2010-12-05 at 13:59 |
![]() |
![]() |
![]() |
#4 |
May 2008
Worcester, United Kingdom
10168 Posts |
![]()
Hi MattcAnderson,
The assembler code you provided is in GCC format. Although it is possible to convert this for Windows by: (a) translating into Intel format, (b) adding function prologues and epilogues in place of register pushes and pops, (c) adding frame pointers for any dynamic stack allocation, (d) changing the register assignments for function parameters, (e) removing any redzone use (not allowed on Windows), and (e) testing and debugging the resulting code, in practice this is VERY time consuming and is not worthwhile unless the resulting code is of very widespread benefit. As others have already said, your best bet is to use either Mingw or Cygwin to build your code. If you want 64-bit code, the mingw64 project is now in good shape and I have been able to use it to produce 64-bit code that works well on Windows. If you really do want to translate the code, I have some tools that will help you a bit. Brian Gladman PS I have just noticed that the assembler code you provided is based on Pierrick Gaudry's REDC code in GMP-ECM. Since GMP-ECM contains my translation of this code for use on Windows, it might be possible to pull the code you need from GMp-ECM. Last fiddled with by Brian Gladman on 2010-12-05 at 16:44 Reason: added information |
![]() |
![]() |
![]() |
#5 |
"Matthew Anderson"
Dec 2010
Oregon, USA
659 Posts |
![]()
Hi all,
Thansk for your replies. I have a windows executable that works, but slowly. It is hosted at: http://sites.google.com/site/mattc1anderson/home-1 Should I hire someone to incorporate the faster multiplication include files? Cheers, Matt |
![]() |
![]() |
![]() |
#6 |
May 2008
Worcester, United Kingdom
52610 Posts |
![]()
Hi Matt
There is good news since I have now looked at the assembler code in more detail and I see that the files already have the basic x64 conversions in them. As I have tools to convert from AT&T syntax to Intel syntax, the work that needs to be done to get these files to work with MSVC is a lot lower than I originally thought. Brian |
![]() |
![]() |
![]() |
#7 |
May 2008
Worcester, United Kingdom
2·263 Posts |
![]()
How much are you willing to pay?
Brian |
![]() |
![]() |
![]() |
#8 |
Banned
"Luigi"
Aug 2002
Team Italia
480010 Posts |
![]()
If you or Matt can provide me with 32 and 64 bits Windows executables, I will pay, not Matt. (Just PM me your coordinates of payment
![]() And FermatSearch will acknowledge your work. Luigi Last fiddled with by ET_ on 2010-12-06 at 14:13 |
![]() |
![]() |
![]() |
#9 |
May 2008
Worcester, United Kingdom
2·263 Posts |
![]()
Hi Luigi
I have attached win32 and x64 executables but I have not been able to test them. Let me know if they work. The x64 version has the assembler code installed and I would be interested to know if it provides a significaant speed improvement. Brian Last fiddled with by Brian Gladman on 2010-12-06 at 15:04 Reason: typo |
![]() |
![]() |
![]() |
#10 | |
Banned
"Luigi"
Aug 2002
Team Italia
26·3·52 Posts |
![]() Quote:
It seems that X64 version has been compiled with #define GMP-Double-Mersenne version 2.1 while the win32 is correctly #define(d) GMP.Fermat version 2.1 So, Win32 version works correctly (and finds factors), while I couldn't test X64 version. Another question: fermat.c source code calls a generic C-coded mulmod, while fermat_redc.c source code calls external mulmodXXX (where XXX is the bit-level). Which source code has been used to create the executables? Luigi |
|
![]() |
![]() |
![]() |
#11 |
May 2008
Worcester, United Kingdom
10168 Posts |
![]()
A revised x64 executable is attached without the Double Mod stuff. It uses the low level assembler for the mod operations.
Brian |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fermat ECM | houding | PrimeNet | 2 | 2017-12-13 08:22 |
GMP-Fermat | houding | FermatSearch | 1 | 2016-12-02 12:36 |
Is it worth the trouble to "upgrade" Windows 8 to Windows 7? | ixfd64 | Lounge | 23 | 2013-04-13 11:12 |
Windows 7 Windows Update & Prime95 issue!!! | Unregistered | Information & Answers | 14 | 2010-04-10 21:47 |
Fermat's Theorem | Crook | Math | 5 | 2005-05-05 17:18 |