![]() |
![]() |
#1 |
Einyen
Dec 2003
Denmark
65528 Posts |
![]()
I am wondering what "make ecm-params; make" actually does?
I did it twice right after each other on 2 versions of GMP-ECM compiled with exact same options and nothing else was running on the machine, but the values in ecm-params.h is still quite different, like MUL_NTT_THRESHOLD and POLYEVALT_NTT_THRESHOLD: Code:
#define TUNE_MULREDC_THRESH 20 #define TUNE_SQRREDC_THRESH 1 #define MPZMOD_THRESHOLD 60 #define REDC_THRESHOLD 511 #define MPN_MUL_LO_THRESHOLD_TABLE {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 14, 1, 1, 18, 18, 18, 18, 20} #define NTT_GFP_TWIDDLE_DIF_BREAKOVER 17 #define NTT_GFP_TWIDDLE_DIT_BREAKOVER 17 #define MUL_NTT_THRESHOLD 512 #define PREREVERTDIVISION_NTT_THRESHOLD 32 #define POLYINVERT_NTT_THRESHOLD 512 #define POLYEVALT_NTT_THRESHOLD 4096 #define MPZSPV_NORMALISE_STRIDE 128 Code:
#define TUNE_MULREDC_THRESH 20 #define TUNE_SQRREDC_THRESH 16 #define MPZMOD_THRESHOLD 54 #define REDC_THRESHOLD 512 #define MPN_MUL_LO_THRESHOLD_TABLE {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 15, 1, 1, 15, 18, 20} #define NTT_GFP_TWIDDLE_DIF_BREAKOVER 17 #define NTT_GFP_TWIDDLE_DIT_BREAKOVER 17 #define MUL_NTT_THRESHOLD 32768 #define PREREVERTDIVISION_NTT_THRESHOLD 32 #define POLYINVERT_NTT_THRESHOLD 512 #define POLYEVALT_NTT_THRESHOLD 256 #define MPZSPV_NORMALISE_STRIDE 64 Last fiddled with by ATH on 2012-01-12 at 13:26 |
![]() |
![]() |
![]() |
#2 |
"Nancy"
Aug 2002
Alexandria
9A316 Posts |
![]()
The non-NTT and NTT variants of the convolution product have essentially the same asymptotic complexity, so the graphs of their time as function of input size intersect at a very acute angle. Hence small variations in the timings can disturb the resulting threshold a lot.
|
![]() |
![]() |
![]() |
#3 |
Einyen
Dec 2003
Denmark
2·17·101 Posts |
![]()
So these "large" variations will not affect performance of GMP-ECM ? Like one of the versions being slower.
|
![]() |
![]() |
![]() |
#4 |
Sep 2008
Kansas
1110110101102 Posts |
![]()
I thought ECM 6.4.2 addressed the speed regression problem? Appears to still be around for -powerpc64.
For ECM 6.3 I get. Code:
GMP-ECM 6.3 [configured with GMP 5.0.2 and --enable-asm-redc] [ECM] Input number is 1369...9 (114 digits) Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=3266242007 Step 1 took 71183ms Step 2 took 44681ms Code:
GMP-ECM 6.4.2 [configured with GMP 5.0.2, --enable-asm-redc] [ECM] Input number is 1369...9 (114 digits) Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=2279026585 Step 1 took 75026ms Step 2 took 61388ms |
![]() |
![]() |
![]() |
#5 |
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
![]()
I'm not very familiar with the changes that went into 6.4. I'll forward this to Paul, maybe they have a G5 system somewhere to test where the speed regression entered the code.
|
![]() |
![]() |
![]() |
#6 | |
Sep 2008
Kansas
2×32×211 Posts |
![]() Quote:
Code:
m4 -I../ -DOPERATION_mulredc1 `test -f mulredc1.asm || echo './'`mulredc1.asm >mulredc1.s /bin/sh ../libtool --mode=compile gcc-4.2 -m64 -c -o mulredc1.lo mulredc1.s libtool: compile: gcc-4.2 -m64 -c mulredc1.s -o mulredc1.o mulredc1.s:40:Invalid mnemonic 'tocbase,' mulredc1.s:41:Unknown pseudo-op: .size mulredc1.s:41:Rest of line ignored. 1st junk character valued 95 (_). mulredc1.s:58:Unknown pseudo-op: .size mulredc1.s:58:Rest of line ignored. 1st junk character valued 46 (.). make[2]: *** [mulredc1.lo] Error 1 Code:
GMP-ECM 6.4.2 [configured with GMP 5.1.1, --enable-asm-redc] [ECM] Input number is 15556590125084447640042979376106655611645478466484332304839633936078668267149399297288829856548038837496970338619173620375749 (125 digits) Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=3074875970 Step 1 took 86990ms Step 2 took 64229ms Code:
GMP-ECM 6.4.4 [configured with GMP 5.1.1] [ECM] Input number is 15556590125084447640042979376106655611645478466484332304839633936078668267149399297288829856548038837496970338619173620375749 (125 digits) Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=1609157141 Step 1 took 93428ms Step 2 took 48039ms |
|
![]() |
![]() |
![]() |
#7 |
Sep 2008
Kansas
2·32·211 Posts |
![]()
As a followup, 6.3 is still the fastest on a G5 (powerpc64).
Code:
GMP-ECM 6.3 [configured with GMP 5.1.1 and --enable-asm-redc] [ECM] Input number is 15556590125084447640042979376106655611645478466484332304839633936078668267149399297288829856548038837496970338619173620375749 (125 digits) Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=4239757077 Step 1 took 82115ms Step 2 took 46385ms |
![]() |
![]() |
![]() |
#8 |
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
![]()
RichD,
can you try compiling the asm code with a newer version of gcc than 4.2? It works on, e.g., gcc110.fsffrance.org with 4.7.2. The speed regression may be due to not using the asm mulredc; or maybe the distributed parameters are non-optimal. Getting the asm to work would be the first step, though. Alex |
![]() |
![]() |
![]() |
#9 | |
Mar 2013
3 Posts |
![]() Quote:
We certainly need more details to fix this, but you may just try configuring with --disable-shared (which should be slightly faster anyway), but still --enable-asm-redc. What does ./config.guess (and uname -a) give? Can you upload the output of a ./configure run, and (afterwards) the file config.log? (Btw., isn't MacOS X on PowerPC 32-bit only? AFAIK you may use some advanced features of 64-bit PowerPC CPUs on it, but the OS and the applications are still 32-bit.) |
|
![]() |
![]() |
![]() |
#10 | |
Sep 2008
Kansas
2×32×211 Posts |
![]() Quote:
I'll look around for a later Xcode (gcc) version that supports Apple PPC. It is a sunset system. I hope I'm not consuming too many resources on a dying system but I thought this problem might bleed over to other powerpc64 systems. BTW, the --enable-asm-redc was active in ECM 6.4.2. Oh, I see leif has a followup for me. |
|
![]() |
![]() |
![]() |
#11 | |
Mar 2013
3 Posts |
![]() Quote:
Even if Apple would change their mind and decided to provide such, it wouldn't help here (at least not with the assembler errors). AFAIK the latest Apple GCC for PPC is version 4.2.1 (Apple Inc. build 5577). And I'm pretty sure now --disable-shared --enable-asm-redc won't work for you either (with 6.4.4) on Darwin, as the PowerPC64 assembly code is ELF-only now, assuming Darwin on PowerPC was always 32-bit, hence not using it; sorry. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help needed compiling GMP-ECM | M0CZY | GMP-ECM | 76 | 2009-09-29 15:48 |
Compiling my first program by using GMP | Raman | Programming | 3 | 2009-02-14 02:17 |
Compiling Phrot | rogue | Sierpinski/Riesel Base 5 | 142 | 2009-01-09 03:42 |
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 |