mersenneforum.org  

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

Reply
 
Thread Tools
Old 2009-04-15, 08:19   #1
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

221608 Posts
Default gmp-4.3.0 is out

http://gmplib.org/#DOWNLOAD

mpir-1.1 is also out
http://mpir.org/

Choices, choices!
Batalov is offline   Reply With Quote
Old 2009-04-15, 08:35   #2
Yamato
 
Yamato's Avatar
 
Sep 2005
Berlin

2×3×11 Posts
Default

Nice. Does Gaudry's patch work with this?

Last fiddled with by Yamato on 2009-04-15 at 08:36
Yamato is offline   Reply With Quote
Old 2009-04-15, 15:25   #3
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

113028 Posts
Default BUG

I found a bug

While the macros

— Macro: __GNU_MP_VERSION
— Macro: __GNU_MP_VERSION_MINOR
— Macro: __GNU_MP_VERSION_PATCHLEVEL

work as should, the Global Constant

— Global Constant: const char * const gmp_version

still refers to 4.2.2

Luigi
ET_ is offline   Reply With Quote
Old 2009-04-15, 20:54   #4
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2×3×19×31 Posts
Default

Are you sure you don't have another version of GMP somewhere on your system? You can be using the new header files but an older precompiled library may be in your path...

(this has bitten me too, and is why GMP-ECM's configure script looks for conflicts)
jasonp is offline   Reply With Quote
Old 2009-04-15, 22:18   #5
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

175416 Posts
Default

Has anyone done a speed comparison?
CRGreathouse is online now   Reply With Quote
Old 2009-04-16, 02:30   #6
jrk
 
jrk's Avatar
 
May 2008

3·5·73 Posts
Default

This is a comparison between MPIR 0.9.0 and MPIR 1.1.0.

0.9.0:
Code:
$ time ( echo "4917400029751399370968199585848845965968509843013458776241467726948301116079944821945421874145871641363912960613047045854615665784286241"|gmp-ecm -c 1 1e6)
GMP-ECM 6.2.1 [powered by GMP 4.2.1] [ECM]
Input number is 4917400029751399370968199585848845965968509843013458776241467726948301116079944821945421874145871641363912960613047045854615665784286241 (136 digits)
Using B1=1000000, B2=1045563762, polynomial Dickson(6), sigma=2899847002
Step 1 took 5063ms
Step 2 took 2266ms

real    0m11.978s
user    0m7.331s
sys    0m0.016s
1.1.0:
Code:
$ time ( echo "4917400029751399370968199585848845965968509843013458776241467726948301116079944821945421874145871641363912960613047045854615665784286241"|gmp-ecm -c 1 1e6)
GMP-ECM 6.2.1 [powered by GMP 4.2.1] [ECM]
Input number is 4917400029751399370968199585848845965968509843013458776241467726948301116079944821945421874145871641363912960613047045854615665784286241 (136 digits)
Using B1=1000000, B2=1045563762, polynomial Dickson(6), sigma=1199160155
Step 1 took 4205ms
Step 2 took 2155ms

real    0m9.971s
user    0m6.361s
sys    0m0.031s
There is about a 15% speedup, judging by user time.
jrk is offline   Reply With Quote
Old 2009-04-16, 03:16   #7
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

22×1,493 Posts
Default

I was more interested in GMP vs MPIR, but that's good to know. 'Word on the street' was that the last versions of GMP and MPIR were about the same speed; will that still hold, or will GMP pull ahead?
CRGreathouse is online now   Reply With Quote
Old 2009-04-16, 08:11   #8
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·74 Posts
Default

Quote:
Originally Posted by jasonp View Post
Are you sure you don't have another version of GMP somewhere on your system? You can be using the new header files but an older precompiled library may be in your path...

(this has bitten me too, and is why GMP-ECM's configure script looks for conflicts)
I am sure. I reformatted my laptop last week and had no previous installation of GMP (in fact I was waiting for 4.3.0 to install)

Luigi
ET_ is offline   Reply With Quote
Old 2009-04-16, 11:17   #9
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

1001101000112 Posts
Default

Luigi,

I can't reproduce this. The file version.c in GMP refers to the macro VERSION which is defined as
#define VERSION "4.3.0"
in config.h. The definitions of __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, and __GNU_MP_VERSION_PATCHLEVEL in gmp.h also have 4, 3, and 0, repectively.

A test program
Code:
#include <stdio.h>
#include <gmp.h>

int main ()
{
  printf ("From header: version %d.%d.%d\n",
          __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR,
          __GNU_MP_VERSION_PATCHLEVEL);
  printf ("From library string: %s\n", gmp_version);
  return 0;
}
prints

Code:
From header: version 4.3.0
From library string: 4.3.0
Can you compile your (or my) test program with the -H flag for gcc? It'll show the full path of files that are included by the preprocessor, so you may be able to find a well-hidden (but not well enough for cpp!) stale header file. Similarly, giving the option -Wl,-t to gcc (so that gcc passes the option -t to ld) causes linking to show the full path of libraries that are used.

Alex

Last fiddled with by akruppa on 2009-04-16 at 11:28
akruppa is offline   Reply With Quote
Old 2009-04-16, 12:21   #10
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

12C216 Posts
Default

Strange enough, after having turned off and on again the laptop, everything seems to work fine.

Thanks anyway for the help.

Alex, I wrote the same sample program to test the version number before posting on the forum, and the results were different. Oh, well...

Luigi
ET_ is offline   Reply With Quote
Old 2009-04-16, 12:43   #11
M0CZY
 
M0CZY's Avatar
 
May 2005
Brutal Police State, UK

11110012 Posts
Default Compiling using GMP-4.3.0

I have been trying to compile GMP-ECM using the new GMP-4.3.0 under Linux, but I have hit a snag.

The GMP installs correctly, and passes 'make check', but in the ECM stage, when I get to './configure --with-gmp=/usr/local', it outputs some stuff then finishes with
Code:
checking if gmp.h version and libgmp version are the same... (4.3/4.3.0) no
configure: error: 'gmp.h' and 'libgmp' have different versions, you have to reinstall GMP properly.
user@user-desktop:~/ecm-6.2.2$
I received the same difference in versions when I compiled under Windows using MinGW/Msys, but the program ignored it and continued working.

Could this be a bug in the new version of GMP?
M0CZY is online now   Reply With Quote
Reply

Thread Tools


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

Tue Mar 2 19:19:00 UTC 2021 up 89 days, 15:30, 1 user, load averages: 1.85, 2.07, 1.98

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.