mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2008-04-16, 21:46   #1
jbristow
 
jbristow's Avatar
 
Aug 2007

1358 Posts
Default 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 is offline   Reply With Quote
Old 2008-04-17, 03:47   #2
jbristow
 
jbristow's Avatar
 
Aug 2007

3×31 Posts
Default

It looks like Jason answered my question under Vanishing Fermat Quotients before I asked it. I'll check out the SVN version.
jbristow is offline   Reply With Quote
Old 2008-04-17, 04:40   #3
jbristow
 
jbristow's Avatar
 
Aug 2007

3·31 Posts
Default

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
Thanks to the GMP-ECM team for making this program available and Brian for putting together the MSVC project files.

Last fiddled with by jbristow on 2008-04-17 at 04:40
jbristow is offline   Reply With Quote
Old 2008-04-17, 14:32   #4
Jay
 
Jay's Avatar
 
Dec 2007

2216 Posts
Default

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.
Jay is offline   Reply With Quote
Old 2008-04-17, 14:42   #5
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

Jay,

your stage 2 probably uses the Schönhage-Strassen code for polynomial multiplication in (Z/FmZ)[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

Last fiddled with by akruppa on 2008-04-17 at 14:43
akruppa is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling YAFU for Windows using mingw bsquared YAFU 59 2020-08-21 16:31
build with MSVC 2010 problem Geek2600 Msieve 0 2018-02-12 13:37
compiling svn 427 for Windows 64 bit. skan NFSNET Discussion 7 2012-04-18 10:30
Compiling Msieve 1.39 on Windows Jeff Gilchrist Msieve 20 2009-02-21 22:43
Compiling ECM 5.0.3 for windows BotXXX Factoring 25 2005-09-13 12:24

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


Sat Jul 17 00:18:56 UTC 2021 up 49 days, 22:06, 1 user, load averages: 1.45, 1.58, 1.57

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.