![]() |
![]() |
#1 |
May 2005
Brutal Police State, UK
112 Posts |
![]()
I have a fresh, new installation of Ubuntu 8.10, and I have copies of gmp-4.2.4.tar.gz and ecm-6.2.1.tar.gz.
I don't know what, if any, other software I will need. I need detailed instructions for compiling GMP-ECM, if anyone will help please? |
![]() |
![]() |
![]() |
#2 |
Jun 2003
Ottawa, Canada
117010 Posts |
![]()
With Ubuntu you probably already have GMP installed. Just follow the detailed instructions that come with the ECM tar ball in the "INSTALL" file. It is pretty straight forward 5 step process.
|
![]() |
![]() |
![]() |
#3 |
(loop (#_fork))
Feb 2006
Cambridge, England
2×3,191 Posts |
![]()
sudo apt-get install gmp-ecm gets you 6.1.2 without any effort.
|
![]() |
![]() |
![]() |
#4 |
"Nancy"
Aug 2002
Alexandria
46438 Posts |
![]()
M0CZY,
which cpu does you computer have? There is no optimized assembly for x86_64 cpus in the official GMP 4.2.4, but patches exist that add at least some assembly for the most common functions for AMD64 and Core 2. If you want the fastest possible GMP-ECM, you'll need to hunt down bits and pieces of code and put together an optimized GMP on your own... it's a bit messy. Alex |
![]() |
![]() |
![]() |
#5 | |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2×41×71 Posts |
![]() Quote:
i still managed to get 2x speed by running in 64-bit though i had to install GMP to get GMP-ECM to compile on the 64-bit version of Ubuntu after i installed GMP 4.2.4 the first time the ./configure for GMP-ECM said i had mismatching versions of gmp.h which it said was 4.2.2 and the other part which it said was 4.2.4 it took quite a bit of fiddling to get it to work i installed: sudo apt-get install libc6-dev g++ gcc sudo apt-get install build-essentials sudo apt-get install m4 |
|
![]() |
![]() |
![]() |
#6 | |
Jun 2003
Ottawa, Canada
2×32×5×13 Posts |
![]() Quote:
With the official GMP 4.2.4 in the Windows projects there are specific builds for Core2 64bit and Opteron 64bit. Would those have the right bits in them then? Do you have any idea of the 4.3 release will include these optimizations by default? Last fiddled with by Jeff Gilchrist on 2009-02-06 at 17:45 |
|
![]() |
![]() |
![]() |
#7 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2·41·71 Posts |
![]()
before i compiled GMP-ECM on 64-bit linux for myself i had heard of a possible 3x speed benefit
i suspect that might have been with the extra bits running 64-bit GMP-ECM in a virtual machine with a 32-bit host means ~1.5 times 32-bit speed |
![]() |
![]() |
![]() |
#8 | |
"Ben"
Feb 2007
3,371 Posts |
![]() Quote:
Geoff also has posts with the resulting core2 (and opteron) optimized gmp-ecm binary in the thread, which I've found to be the fastest on my core2 systems. |
|
![]() |
![]() |
![]() |
#9 |
"Nancy"
Aug 2002
Alexandria
1001101000112 Posts |
![]()
If you configure on a 64 bit system with --enable-asm-redc, then for numbers of up to 20 words (385 digits), at least stage 1 uses GMP-ECM's own assembly code, so except for addition etc which still uses GMP functions, there's not much speed to gain (other than by writing better mulredc code of course).
Stage 2 uses GMP functions for computing the roots of the polynomials, and if you run with -no-ntt, for the polynomial multiplication, too (otherwise it uses NTT code which relies on GMP only little). So getting a well optimized GMP matters most if you want to factor somewhat larger numbers, where stage 1 and/or stage 2 do all the work via GMP. Pierrick Gaudry has a patch for AMD64 assembly (http://www.loria.fr/~gaudry/mpn_AMD64/), Jason Worth Martin has a patch for Core 2 (http://www.math.jmu.edu/~martin/). I found that in some cases, the AMD64 code is faster even on Core 2, but haven't looked into the issue much. GMP 4.3 will (finally!) have asm code for x86_64 architectures. It's supposed to be out last week or so... but Torbjörn has always valued "when it's ready" over "when I said I would." Alex Last fiddled with by akruppa on 2009-02-06 at 19:41 |
![]() |
![]() |
![]() |
#10 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2·41·71 Posts |
![]()
if that's the case then it probably isn't worth fiddling around with the patches but waiting for GMP 4.3
Last fiddled with by henryzz on 2009-02-07 at 10:48 |
![]() |
![]() |
![]() |
#11 |
Jun 2003
Ottawa, Canada
49216 Posts |
![]()
Is that why the 4.3 preliminary benchmarks are showing such a nice speedup or is that from something else?
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling GMP-ECM | ATH | GMP-ECM | 69 | 2017-01-04 12:03 |
Help needed compiling GMP-ECM on 64bit Mac | yoyo | GMP-ECM | 16 | 2009-03-18 22:46 |
Compiling 24.14 | CBoland | Software | 6 | 2007-08-01 00:11 |
Compiling new version of GMP-ECM | M0CZY | GMP-ECM | 3 | 2006-05-27 09:54 |
Compiling ECM 5.0.3 for windows | BotXXX | Factoring | 25 | 2005-09-13 12:24 |