mersenneforum.org  

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

Reply
 
Thread Tools
Old 2013-01-15, 09:00   #12
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

246710 Posts
Default

mpn_add_nc() was an internal function not meant for application use in GMP version < 5.1, but we used it anyway with our own function prototype because it produces a slight speedup. Looks like GMP 5.1 now exports the function, but it acts differently than it used to, so the way we use it is now wrong. I'll prepare a fix.
akruppa is offline   Reply With Quote
Old 2013-01-18, 13:24   #13
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

27·52 Posts
Default

Quote:
Originally Posted by ET_ View Post
IIRC, there had been a "duplicate definition" issue between ecm-gmp.h and gmp.h while making the source, after [auto]configurations ran ok.
I'm also getting this error with MPIR 2.6.0 and the latest svn 2341:

Output: gmpecm-output.txt
Config.log: gmpecm-configlog.txt


I'm getting no error with GMP 5.1.0+svn 2341 or with MPIR 2.6.0+GMP-ECM 6.4.3b.

Last fiddled with by ATH on 2013-01-18 at 13:24
ATH is offline   Reply With Quote
Old 2013-01-18, 16:42   #14
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

27·52 Posts
Default

The GMP 5.1.0 + latest svn also fails, but in the "make install" step with a different error. I didn't have time to run that step earlier:

Quote:
mpmod.c:629:35: error: 'TUNE_MULREDC_TABLE' undeclared here (not in a function)
mpmod.c:630:35: error: 'TUNE_SQRREDC_TABLE' undeclared here (not in a function)
mpmod.c:630:1: error: invalid initializer
make[1]: *** [libecm_la-mpmod.lo] Error 1
make[1]: Leaving directory `/home/gmpecm'
make: *** [install-recursive] Error 1
ATH is offline   Reply With Quote
Old 2013-01-19, 06:40   #15
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

11100001101012 Posts
Default

Hmm... I'm working with a fresh install of Mint Debian, and compiled GMP 5.1.0 earlier without a hitch, but when I just tried to configure ecm, well...
Code:
bill@Gravemind:~/ecm∰∂ ls
acinclude.m4  b1_ainc.c        ChangeLog              cudakernel.h   ecm-gpu.h      Fgw.c          listz.c        mips                       mul_lo.c                 pm1fs2.c        README.gpu       spm.c           test.pp1    x86_64
addlaws.c     batch.c          check.mpl              cudawrapper.c  ecm.h          generic        longlong.h     mpmod.c                    NEWS                     polyeval.c      README.lib       spv.c           TODO
addlaws.h     bench_mulredc.c  cmecm.c                ecm.1          ecm-impl.h     getprime.c     lucas.c        mpmod.h                    nodist                   powerpc32       resume.c         stage2.c        TODO.fat
arm           bestd.c          cmecm.h                ecm2.c         ecm_ntt.c      gpu            m4             mpzspm.c                   ntt_gfp.c                powerpc64       rho.c            techdocs        TODO.kunz
athlon        build.vc10       configure.in           ecmbench       ecm-params.h   hecm           main.c         mpzspv.c                   parametrizations.c       pp1.c           schoen_strass.c  test.ecm        TODO.sp
AUTHORS       c155             COPYING                ecm.c          ecmprob.magma  hppa           Makefile.am    mul_fft-params.h.athlon64  patch-config.guess.diff  random.c        sets_long.c      test.gpuecm     torsions.c
auxarith.c    c200             COPYING.LIB            ecm-ecm.h      ecm.xml        ia64           makesmooth.gp  mul_fft-params.h.default   pentium4                 README          sparc64          testlong.pp1    torsions.h
auxi.c        candi.c          cudakernel.cu          ecmfactor.c    eval.c         INSTALL-ecm    manyecm.c      mul_fft-params.h.pentium3  phiP.gp                  README.dev      sp.c             test_mulredc.c  tune.c
auxlib.c      champions.h      cudakernel_default.cu  ecm-gmp.h      factor.c       ks-multiply.c  median.c       mul_fft-params.h.pentium4  pm1.c                    README.dev.asm  sp.h             test.pm1        x86
bill@Gravemind:~/ecm∰∂ ./configure
bash: ./configure: No such file or directory
The only thing I can think of is that I checked out only trunk/,
Code:
bill@Gravemind:~/ecm∰∂ svn checkout svn://scm.gforge.inria.fr/svnroot/ecm/trunk/ .
but the SVN browse doesn't show any files above trunk...
Dubslow is offline   Reply With Quote
Old 2013-01-19, 10:30   #16
Ralf Recker
 
Ralf Recker's Avatar
 
Oct 2010

191 Posts
Default

Quote:
Originally Posted by Dubslow View Post
Hmm... I'm working with a fresh install of Mint Debian, and compiled GMP 5.1.0 earlier without a hitch, but when I just tried to configure ecm, well...
Code:
bill@Gravemind:~/ecm∰∂ ls
acinclude.m4  b1_ainc.c        ChangeLog              cudakernel.h   ecm-gpu.h      Fgw.c          listz.c        mips                       mul_lo.c                 pm1fs2.c        README.gpu       spm.c           test.pp1    x86_64
addlaws.c     batch.c          check.mpl              cudawrapper.c  ecm.h          generic        longlong.h     mpmod.c                    NEWS                     polyeval.c      README.lib       spv.c           TODO
addlaws.h     bench_mulredc.c  cmecm.c                ecm.1          ecm-impl.h     getprime.c     lucas.c        mpmod.h                    nodist                   powerpc32       resume.c         stage2.c        TODO.fat
arm           bestd.c          cmecm.h                ecm2.c         ecm_ntt.c      gpu            m4             mpzspm.c                   ntt_gfp.c                powerpc64       rho.c            techdocs        TODO.kunz
athlon        build.vc10       configure.in           ecmbench       ecm-params.h   hecm           main.c         mpzspv.c                   parametrizations.c       pp1.c           schoen_strass.c  test.ecm        TODO.sp
AUTHORS       c155             COPYING                ecm.c          ecmprob.magma  hppa           Makefile.am    mul_fft-params.h.athlon64  patch-config.guess.diff  random.c        sets_long.c      test.gpuecm     torsions.c
auxarith.c    c200             COPYING.LIB            ecm-ecm.h      ecm.xml        ia64           makesmooth.gp  mul_fft-params.h.default   pentium4                 README          sparc64          testlong.pp1    torsions.h
auxi.c        candi.c          cudakernel.cu          ecmfactor.c    eval.c         INSTALL-ecm    manyecm.c      mul_fft-params.h.pentium3  phiP.gp                  README.dev      sp.c             test_mulredc.c  tune.c
auxlib.c      champions.h      cudakernel_default.cu  ecm-gmp.h      factor.c       ks-multiply.c  median.c       mul_fft-params.h.pentium4  pm1.c                    README.dev.asm  sp.h             test.pm1        x86
bill@Gravemind:~/ecm∰∂ ./configure
bash: ./configure: No such file or directory
The only thing I can think of is that I checked out only trunk/,
Code:
bill@Gravemind:~/ecm∰∂ svn checkout svn://scm.gforge.inria.fr/svnroot/ecm/trunk/ .
but the SVN browse doesn't show any files above trunk...
autoreconf -i

(You might have to install automake/autoconf/libtool, etc.)

Last fiddled with by Ralf Recker on 2013-01-19 at 10:32
Ralf Recker is offline   Reply With Quote
Old 2013-01-19, 18:18   #17
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Quote:
Originally Posted by Ralf Recker View Post
autoreconf -i

(You might have to install automake/autoconf/libtool, etc.)
Hmm... I don't remember needing to do that with my old OS, but maybe I did. Thanks, in any case. GMP 5.1.0 and ECM r2343 compiled and passed `make check` out of the box (on x86_64 Mint Debian).

Edit: Here's a request for the devs. When running `make install`, can config.h be placed in /usr/local/include along with ecm.h?

Last fiddled with by Dubslow on 2013-01-19 at 18:22
Dubslow is offline   Reply With Quote
Old 2013-01-19, 18:25   #18
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

100111010000002 Posts
Default

Quote:
Originally Posted by Dubslow View Post
Edit: Here's a request for the devs. When running `make install`, can config.h be placed in /usr/local/include along with ecm.h?
High risk of name-space collisions with other packages....
chalsall is online now   Reply With Quote
Old 2013-01-19, 18:34   #19
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by chalsall View Post
High risk of name-space collisions with other packages....
Hmm... my inexperience rears its head.

In that case, would it be possible for `./configure` to append `#define VERSION "<blah?"` or `#define ECM_VERSION "<blah>"` or similar to ecm.h (that being the file that does get installed to /usr/local/include)?
Dubslow is offline   Reply With Quote
Old 2013-01-21, 02:24   #20
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3×1,181 Posts
Default

I suggested to Alex that GMP-ECM can have an API function that retrieves a version string, with the string provided from config.h; this way applications wouldn't need to include a header file that is needed only by the GMP-ECM configure scripts.
jasonp is offline   Reply With Quote
Old 2013-01-21, 16:01   #21
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

The "$" in "$HAVE___GMPN_ADD_NC = 1" is a typo in main.c:184. It is harmless except for the stray "$" in the output.

Luigi: your config.log contains
Code:
configure:14122: checking for __gmpn_add_nc
configure:14122: gcc -std=gnu99 -o conftest -W -Wall -Wundef -pedantic -O2 -m64 -march=core2 -mtune=core2    conftest.c -lm -lm -lm -lm -lm  -lgmp >&5
/tmp/ccWHZdew.o: In function `main':
conftest.c:(.text.startup+0x7): undefined reference to `__gmpn_add_nc'
collect2: ld returned 1 exit status
configure:14122: $? = 1
configure: failed program was:
....
configure:14122: result: no
so the configure script should not set HAVE___GMPN_ADD_NC to 1. Edit: question already asked by WraithX. What happens when you explicitly link to a specific GMP library with the configure --with=gmp=/path/to/library option?

Last fiddled with by akruppa on 2013-01-21 at 16:03
akruppa is offline   Reply With Quote
Old 2013-01-21, 17:00   #22
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

Quote:
Originally Posted by jasonp View Post
I suggested to Alex that GMP-ECM can have an API function that retrieves a version string, with the string provided from config.h; this way applications wouldn't need to include a header file that is needed only by the GMP-ECM configure scripts.
The GMP-ECM version definitely must be given in the header file, and should be also available via a function so someone calling ecmlib can check that header and lib agree. I guess the autotool way is to make ecm.h an .in file and to let configure substitute the version string.
akruppa is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Prone Machines PageFault Data 17 2012-04-10 01:40
Scalability of Glucas on large machines: A future //ed prime 95 ? T.Rex Software 29 2006-12-13 21:40
Start and Stop Prime 95 on Large Groups of Windows XP Machines MarcGetty Software 3 2006-03-07 07:54
Putting prime 95 on a large number of machines moo Software 10 2004-12-15 13:25
Team_Prime_Rib error-prone machines GP2 Data 10 2003-10-05 18:34

All times are UTC. The time now is 21:11.


Sun Dec 5 21:11:24 UTC 2021 up 135 days, 15:40, 0 users, load averages: 1.29, 1.35, 1.37

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.