mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GMP-ECM (https://www.mersenneforum.org/forumdisplay.php?f=55)
-   -   Compiling GMP-ECM in Windows using MSVC (https://www.mersenneforum.org/showthread.php?t=10211)

jbristow 2008-04-16 21:46

Compiling GMP-ECM in Windows using MSVC
 
I've been trying to compile a 64-bit version of GMP-ECM in Windows using MSVC. I believe that I've successfully compiled GMP using Brian Gladman's project file, but I haven't been able to succesfully compile GMP-ECM.

Has anyone done this and do they have any tips relevant to MSVC? My current sticking point is config.h. I've tried to adapt config.h.in manually by changing #undefs to #defines where I can verify that it's applicable. Is this the right general approach? Thanks.

jbristow 2008-04-17 03:47

It looks like Jason answered my question under Vanishing Fermat Quotients before I asked it. I'll check out the SVN version.

jbristow 2008-04-17 04:40

Brian's project files make a MSVC 64-bit version very easy to compile. As mentioned in other threads, the 64-bit version is quite a bit faster than the 32-bit binary (I've been using one downloaded from this forum). Since these are different versions I'm comparing, I'm sure some of the extra speed is due to improvements made by the GMP-ECM team as well. Here are my timings for B1=11000 curves for a few different numbers:

[code]
Digits GMP-ECM 6.1.3 32-bit GMP-ECM 6.2-rc1 64-bit
345 Step 1: 593ms Step 1: 203ms
Step 2: 343ms Step 2: 202ms
1052 Step 1: 5367ms Step 1: 1592ms
Step 2: 1872ms Step 2: 920ms
4307 Step 1: 51137ms Step 1: 17425ms
Step 2: 21590ms Step 2: 11139ms
[/code]

Thanks to the GMP-ECM team for making this program available and Brian for putting together the MSVC project files.

Jay 2008-04-17 14:32

I've no idea what type of system you have, other than it being a 64-bit box with a 64-bit Windows OS.

However I thought I would share the results of my test. Using 2^4096+1 with some factors removed, I have a 1202 digit number.

3.4ghz P4 with WinXP Pro
----------------
GMP-ECM 6.1.3 [powered by GMP 4.2.1 and GWNUM 24.11] [ECM]
(((2^4096+1))/567769560251395253764097)/63766529
Input number is (((2^4096+1))/567769560251395253764097)/63766529 (1202 digits)
Using B1=11000, B2=1873422, polynomial x^1, sigma=1479987595
Step 1 took 484ms
Step 2 took 484ms

AMD 3600+ with WinXP Pro
----------------
GMP-ECM 6.1.3 [powered by GMP 4.2.2 and GWNUM 24.11] [ECM]
(((2^4096+1))/567769560251395253764097)/63766529
Input number is (((2^4096+1))/567769560251395253764097)/63766529 (1202 digits)
Using B1=11000, B2=1873422, polynomial x^1, sigma=551041455
Step 1 took 609ms
Step 2 took 422ms

Both steps are significantly faster than the times you report for 1052-digit test number.

You may note that I am using GWNUM for step-1 base-2 operations. This results in a significantly faster speed for step-1. However you will note that my step-2 is roughly half the time you report.

akruppa 2008-04-17 14:42

Jay,

your stage 2 probably uses the Schönhage-Strassen code for polynomial multiplication in (Z/F[sub]m[/sub]Z)[x]. This timing is not comparable with a stage 2 on a number not of a special form.

Edit: and it probably uses GWNUM for stage 1, so all bets are off here.

Alex


All times are UTC. The time now is 00:19.

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