mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-03-08, 15:10   #1
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default GMP-ECM 6.3 release candidate

A release candidate for 6.3 is at http://www.loria.fr/~kruppaal/ecm-6.3-rc2.tar.gz

From the NEWS file:

Changes between ecm-6.2.3 and ecm-6.3:
* New assembly code for 64-bit PowerPC (thanks to Philip McLaughlin)
* Allow several processes to write to the same -save file
* More routines in new P+-1 stage 2 use multi-threading in OpenMP build
* Fixed incompatibility with GMP 5.0.0
* Fixed several bugs, and now check return value from malloc() calls
* Fixed linking of GMP which prevented successful builds under Darwin
(and presumably other systems)

I've test built it successfully on Linux x86_64 and powerpc64, and on Darwin x86_64. Test build reports are welcome! The new assembly code for powerpc64 (enabled by default) seems to perform about the same as GMP 4.3.x and 5.0.x on a PPC970 1.8 GHz, timings on other PowerPC 64 bit chips would be interesting.

Thanks,
Alex
akruppa is offline   Reply With Quote
Old 2010-03-09, 04:21   #2
WraithX
 
WraithX's Avatar
 
Mar 2006

11·43 Posts
Default

I'm happy to report a successful build on Windows 64-bit, in an Msys shell, with GMP 5.0.1, using Mingw64 as the compiler. The steps I ran for the build:

./configure CC=gcc CFLAGS="-O2 -pedantic -m64 -std=gnu99 -mtune=k8 -march=k8"
make
make check
make ecm-params; make

The configure options were set so that they matched what was used to compile GMP. There were a couple of warning during compiling, but 'make check' said all ECM tests passed. Would you like to see what those warning were?

Also, I noticed that ecm 6.3-rc2 stage 1 seems to be from 3-5% slower than ecm-6.2.3. I know that is a small amount, but I was wondering if I might have configured or compiled incorrectly? I configured both 6.3 and 6.2.3 the same way, and they were both powered by GMP 5.0.1. If you'd like any additional info about my system or setup, please let me know. Here are the timings for a "random" number at different B1 values.

Code:
GMP-ECM 6.3-rc2 [configured with GMP 5.0.1] [ECM]
GMP-ECM 6.2.3 [powered by GMP 5.0.1] [ECM]

echo 10^101+3231 | ecm -c 2 1000000
gmp-ecm 6.3-rc2
Step 1 took 7047ms
Step 2 took 3469ms
Step 1 took 7031ms
Step 2 took 3516ms
gmp-ecm 6.2.3
Step 1 took 6719ms
Step 2 took 3453ms
Step 1 took 6828ms
Step 2 took 3469ms

echo 10^101+3231 | ecm -c 2 3000000
gmp-ecm 6.3-rc2
Step 1 took 21188ms
Step 2 took 7890ms
Step 1 took 21407ms
Step 2 took 7859ms
gmp-ecm 6.2.3
Step 1 took 20281ms
Step 2 took 7891ms
Step 1 took 20594ms
Step 2 took 7781ms

echo 10^101+3231 | ecm -c 2 11000000
gmp-ecm 6.3-rc2
Step 1 took 77953ms
Step 2 took 26453ms
Step 1 took 77860ms
Step 2 took 26187ms
gmp-ecm 6.2.3
Step 1 took 75328ms
Step 2 took 25860ms
Step 1 took 74640ms
Step 2 took 26125ms
WraithX is offline   Reply With Quote
Old 2010-03-09, 06:03   #3
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·7·11·61 Posts
Default

Seconded. I've found the same on x86_64 (Phenom/Opteron, SUSE is it matters): a few percent slower (6.3+GMP 5.0 vs 6.2.3+GMP 4.3.0). However, the older ecm was all tuned. The new binary and GMP 5 were not.
Attached Thumbnails
Click image for larger version

Name:	my-son-he-has-a-flavor2.JPG
Views:	1602
Size:	5.4 KB
ID:	4827  
Batalov is offline   Reply With Quote
Old 2010-03-09, 08:36   #4
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2·17·73 Posts
Default

Compiling under 32-bit MinGW/Msys worked smoothly, but in this environment ecm-6.3-rc2 with GMP-5.0.1 seems to be slower than ecm-6.2.3 with GMP-4.3.1:

Code:
GMP-ECM 6.2.3 [powered by GMP 4.3.1] [ECM]
Input number is 7697965562235071080146894266187742061373611050088218785901815194731255580083856950577371947531398134889789342805715603682570745833656049440232111949793108909207499508865559739953421824814393825917900810041 (205 digits)
Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=1959985850
Step 1 took 267266ms
Step 2 took 88703ms

GMP-ECM 6.3-rc2 [configured with GMP 5.0.1 and --enable-asm-redc] [ECM]
Input number is 7697965562235071080146894266187742061373611050088218785901815194731255580083856950577371947531398134889789342805715603682570745833656049440232111949793108909207499508865559739953421824814393825917900810041 (205 digits)
Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=2093482881
Step 1 took 392047ms
Step 2 took 105438ms
I will try to make clean and re-compile without the --enable-asm-redc flag.

Edit: Without --enable-asm-redc, stage 1 is slightly faster and stage 2 ist yet slower. I think I will stick with ecm-6.2.3 on my 32-bit-system.

Code:
GMP-ECM 6.3-rc2 [configured with GMP 5.0.1] [ECM]
Input number is 7697965562235071080146894266187742061373611050088218785901815194731255580083856950577371947531398134889789342805715603682570745833656049440232111949793108909207499508865559739953421824814393825917900810041 (205 digits)
Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=1552426341
Step 1 took 266140ms
Step 2 took 120407ms
edit2: With --enable-sse2, it is approx. equally fast:

Code:
GMP-ECM 6.3-rc2 [configured with GMP 5.0.1] [ECM]
Input number is 7697965562235071080146894266187742061373611050088218785901815194731255580083856950577371947531398134889789342805715603682570745833656049440232111949793108909207499508865559739953421824814393825917900810041 (205 digits)
Using B1=11000000, B2=35133391030, polynomial Dickson(12), sigma=1589195901
Step 1 took 267297ms
Step 2 took 89109ms

Last fiddled with by Andi47 on 2010-03-09 at 09:30
Andi47 is offline   Reply With Quote
Old 2010-03-09, 10:24   #5
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

248210 Posts
Default

Installation in ubuntu 9.04 (64 bit) works too.

Is -asm-redc automatically enabled when I configure with openmp? This seems to make ECM stage 2 slower, at least for numbers in the c200+ range.

Last fiddled with by Andi47 on 2010-03-09 at 10:24
Andi47 is offline   Reply With Quote
Old 2010-03-09, 13:09   #6
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

33·131 Posts
Default

Maybe the next release should compile a fat binary of the NTT routines, and select the SSE2 NTT code at runtime for machines that support it.

This is straightforward for a plain makefile, but good luck converting the process (compiling the same file to multiple object files with different compile options) into a configure script.

Edit: actually, doing that would require separating out the NTT code much more than currently.

Last fiddled with by jasonp on 2010-03-09 at 14:57
jasonp is offline   Reply With Quote
Old 2010-03-09, 17:15   #7
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

20E16 Posts
Default

GMP-ECM 6.3 on Windows x64 using MPIR 1.3.x compiled with Visual Studio 2010

Input number is 10^101+3231 (102 digits)
Step 1 took 1919ms
Step 2 took 1794ms
Step 1 took 1966ms
Step 2 took 1778ms

Brian
Brian Gladman is offline   Reply With Quote
Old 2010-03-10, 00:33   #8
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

33·233 Posts
Default

On a G5 PPC with OS X 10.5.8, Xcode 3.1.4, and gcc version 4.2.1 (Apple Inc. build 5577) I get this error with configure:
checking if globals are prefixed by underscore... configure: error: Test program links neither with nor without underscore.

If I used this:
./configure CFLAGS="-m64"

it works.

With -m64, the build fails because of undefined symbols such as this:

Undefined symbols:
"_mulredc10", referenced from:
_mulredc in libecm.a(libecm_la-mpmod.o)

Something is amiss with the linking, but I'm uncertain what it could be right now.

Last fiddled with by rogue on 2010-03-10 at 00:39
rogue is offline   Reply With Quote
Old 2010-03-10, 02:20   #9
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

33·233 Posts
Default

Quote:
Originally Posted by rogue View Post
On a G5 PPC with OS X 10.5.8, Xcode 3.1.4, and gcc version 4.2.1 (Apple Inc. build 5577) I get this error with configure:
checking if globals are prefixed by underscore... configure: error: Test program links neither with nor without underscore.

If I used this:
./configure CFLAGS="-m64"

it works.

With -m64, the build fails because of undefined symbols such as this:

Undefined symbols:
"_mulredc10", referenced from:
_mulredc in libecm.a(libecm_la-mpmod.o)

Something is amiss with the linking, but I'm uncertain what it could be right now.
The entry point for the mulredc procedures in the library do not have underscores. I do see that when I included -m64 that I get this message from configure:

checking if globals are prefixed by underscore... yes
rogue is offline   Reply With Quote
Old 2010-03-10, 14:36   #10
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

246710 Posts
Default

I'm trying to find out what caused the slowdown between 6.2.3 and 6.3.

Rogue, what does the config.m4 file after running ./configure have in the line:

define(<GSYM_PREFIX>, what is here?)

As far as I can see, the code in powerpc64/ correctly prefixes global symbols with GSYM_PREFIX, so I wonder if that's defined correctly on config.m4. On my test system, underscores are not needed, so it's just defined to the empty string <>.

Alex
akruppa is offline   Reply With Quote
Old 2010-03-10, 15:40   #11
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22×5×373 Posts
Default

Quote:
Originally Posted by Brian Gladman View Post
GMP-ECM 6.3 on Windows x64 using MPIR 1.3.x compiled with Visual Studio 2010

Input number is 10^101+3231 (102 digits)
Step 1 took 1919ms
Step 2 took 1794ms
Step 1 took 1966ms
Step 2 took 1778ms

Brian
Hi Brian,

What is your opinion of VS2010??? I continue to have major problems
with VS2008 emitting incorrect code.
R.D. Silverman is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which candidate are you closest to rogue Soap Box 9 2008-01-05 07:10
v24.13 release candidate 1 Prime95 Software 13 2005-07-14 23:29
V24.12 release candidate 3 Prime95 Software 45 2005-07-02 19:13
Version 24.12 release candidate 2 Prime95 Software 14 2005-06-26 19:25
Version 24.12 release candidate 1 Prime95 Software 13 2005-06-21 15:44

All times are UTC. The time now is 01:50.

Wed Apr 21 01:50:52 UTC 2021 up 12 days, 20:31, 0 users, load averages: 1.36, 1.37, 1.40

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.