mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2018-04-24, 08:30   #1
lukerichards
 
lukerichards's Avatar
 
"Luke Richards"
Jan 2018
Birmingham, UK

1001000002 Posts
Default GMP-ECM help

Hi,

I'm having some difficulty installing GMP-ECM. Initially it could not located a GMP header, so I installed GMP from a binary downloaded from the GMP website.

Only now I think I have two versions of GMP on my computer. I get the following error message:

checking for gmp.h... yes
checking for recent GMP... yes
checking if GMP is MPIR... no
checking whether we can link against GMP... yes
checking if gmp.h version and libgmp version are the same... (6.1.2/6.1.0) no
configure: error: 'gmp.h' and 'libgmp' have different versions, you have to reinstall GMP properly, or use the --with-gmp parameter to tell configure the path to the GMP library and header you want to use


Can anyone offer any suggestions? I would use the --with-gmp parameter but I don't know how to find the location of the GMP library I want to use.
lukerichards is offline   Reply With Quote
Old 2018-04-24, 13:15   #2
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

I don't know what OS you are using, but I have some detailed instructions that may help you sort it out in the following threads:

How I Install GMP onto my Ubuntu Machines

How I Install GMP-ECM onto my Ubuntu Machines

In the last step, when you install GMP, the screen output will tell you where it is installed. On a linux system, this is commonly /usr/local/ so you would use:
Code:
./configure --with-gmp=/usr/local/
This is all described in the referenced threads.

Let me know if the threads are helpful.
EdH is offline   Reply With Quote
Old 2018-04-24, 16:18   #3
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 lukerichards View Post
checking if gmp.h version and libgmp version are the same... (6.1.2/6.1.0) no
configure: error: 'gmp.h' and 'libgmp' have different versions
Can you offer details of the binary you downloaded and installed? What was the binary's file name? It sounds like your computer already had a gmp installed, just not a development version, and if that is so, downloading a second version from the gmp website may have been a mistake.

Also what operating system? If this is some sort of Linux, please post the output of sudo updatedb; locate gmp.h; locate libgmp.so, in addition to the name of the file you downloaded.
Dubslow is offline   Reply With Quote
Old 2018-04-25, 14:58   #4
lukerichards
 
lukerichards's Avatar
 
"Luke Richards"
Jan 2018
Birmingham, UK

1001000002 Posts
Default

Code:
luke@lukes-amda8:~$ sudo updatedb; locate gmp.h; locate libgmp.so
/usr/include/linux/igmp.h
/usr/include/netinet/igmp.h
/usr/local/include/gmp.h
/usr/src/linux-headers-4.10.0-28/include/linux/igmp.h
/usr/src/linux-headers-4.10.0-28/include/uapi/linux/igmp.h
/usr/src/linux-headers-4.13.0-26/include/linux/igmp.h
/usr/src/linux-headers-4.13.0-26/include/uapi/linux/igmp.h
/usr/src/linux-headers-4.13.0-32/include/linux/igmp.h
/usr/src/linux-headers-4.13.0-32/include/uapi/linux/igmp.h
/usr/src/linux-headers-4.13.0-36/include/linux/igmp.h
/usr/src/linux-headers-4.13.0-36/include/uapi/linux/igmp.h
/usr/src/linux-headers-4.13.0-37/include/linux/igmp.h
/usr/src/linux-headers-4.13.0-37/include/uapi/linux/igmp.h
/usr/src/linux-headers-4.13.0-38/include/linux/igmp.h
/usr/src/linux-headers-4.13.0-38/include/uapi/linux/igmp.h
/usr/src/linux-headers-4.13.0-39/include/linux/igmp.h
/usr/src/linux-headers-4.13.0-39/include/uapi/linux/igmp.h
/usr/lib/x86_64-linux-gnu/libgmp.so.10
/usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/libgmp.so
/usr/local/lib/libgmp.so
/usr/local/lib/libgmp.so.10
/usr/local/lib/libgmp.so.10.3.2

File downloaded was gmp-6.1.2.tar.lz

Running Lubuntu 16.04.

Last fiddled with by Dubslow on 2018-04-25 at 19:18 Reason: add code tags
lukerichards is offline   Reply With Quote
Old 2018-04-25, 19:30   #5
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

160658 Posts
Default

Quote:
Originally Posted by lukerichards View Post
Code:
luke@lukes-amda8:~$ sudo updatedb; locate gmp.h; locate libgmp.so
...
/usr/local/include/gmp.h
...
/usr/lib/x86_64-linux-gnu/libgmp.so.10
/usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
...
/usr/local/lib/libgmp.so
/usr/local/lib/libgmp.so.10
/usr/local/lib/libgmp.so.10.3.2

File downloaded was gmp-6.1.2.tar.lz

Running Lubuntu 16.04.
I believe this confirms my hypothesis. You have the 6.1.0 gmp libraries in your /usr/lib/x86_64-linux-gnu/, installed by the system package, as well as the 6.1.2 libraries and development files installed by the package you downloaded.

If you compiled the downloaded tar yourself, it might be better optimized for your system. At any rate, since you have already done the legwork there, you may as well use that for GMP-ECM; as the above lines indicate, --with-gmp=/usr/local in your configure command ought to do the trick, as suggested by EdH. Try it and let us know.
Dubslow is offline   Reply With Quote
Old 2018-05-07, 17:47   #6
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

101101001012 Posts
Default

How to output factors found with GMP-ECM to text file?
I was following help, and got that GPM-ECM record something on file, but it record all except factors ( and that is most important to me)
syntax I use is

ecm -one -savea factors.txt -c 100 4000 6000 < test.txt

In as factor is found I got this on screen

********** Factor found in step 2: 7977946786400951
Found prime factor of 16 digits: 7977946786400951
Composite cofactor (285601*2^216+1)/7977946786400951 has 55 digits

But it is never recorded to output text.
pepi37 is online now   Reply With Quote
Old 2018-05-07, 18:39   #7
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

4,861 Posts
Default

Redirect the output to a file: add ">output.txt" or similar to the end of your invocation.
VBCurtis is offline   Reply With Quote
Old 2018-05-07, 18:53   #8
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

5·172 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Redirect the output to a file: add ">output.txt" or similar to the end of your invocation.
Thanks!
Works perfect!
pepi37 is online now   Reply With Quote
Old 2018-05-19, 16:35   #9
kosta
 
Jan 2013

1110002 Posts
Default

Or add a pipe like this
ecm ...... | tee -a foo.log
You will have both the file and on screen.
kosta is offline   Reply With Quote
Old 2018-07-20, 14:51   #10
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

31·173 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Redirect the output to a file: add ">output.txt" or similar to the end of your invocation.
It's safer to use >> which appends (creating the output file if it doesn't yet exist), rather than blowing away what might be there from a previous run with >.
kriesel is offline   Reply With Quote
Old 2018-07-20, 17:22   #11
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

31×173 Posts
Default gmp-ecm scaling

Hi, very new to gmp-ecm here. Is this right? Prime95 is orders of magnitude faster than gmp-ecm for P-1 on 2^~88E6 -1 on the same i3 hardware? Or what am I doing wrong, other than running the Core 2 code that I could find, on an i3?
The difference in gmp-ecm between -v -v and -v is about 12% more time for more verbosity per a spot check I made at p=99991.

-v put the following in the output file, versus -v -v including some rather large integer decimal expansions.
Code:
GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [P-1]
Input number is 2^99991-1 (30101 digits)
Using special division for factor of 2^99991-1
Using lmax = 813 without NTT which takes about 181MB of memory
Using B1=10000, B2=773118, polynomial x^1, x0=271186255
P = 1155, l = 813, s_1 = 480, k = s_2 = 1, m_1 = 3
Probability of finding a factor of n digits:
20    25    30    35    40    45    50    55    60    65
0.0052    0.0002    5.3e-006    9.9e-008    1.4e-009    2.1e-011    0    0    0    0
Writing checkpoint to m99991.ckp at p = 10000
Step 1 took 9828ms
Computing F from factored S_1 took 7956ms
Computing h took 686ms
Multi-point evaluation 1 of 1:
Computing g_i took 1654ms
TMulGen of g and h took 4087ms
Computing product of F(g_i) took 359ms
Step 2 took 14805ms
********** Factor found in step 2: 1799839
Found prime factor of 7 digits: 1799839
Composite cofactor (2^99991-1)/1799839 has 30095 digits
Peak memory usage: 187MB
gmpecm returned errorlevel 6
Total observed runtime was about 275. seconds, much larger than the ~39 second total of the program's timing values in the output above.

Running several widely spaced smallish exponents in gmp-ecm, and extrapolating significantly, I get an estimate of several years for p~88M on gmp-ecm, compared to about a week on prime95, same cpu. (476 weeks, 9+ years)

See the attachment for more info.
Attached Files
File Type: pdf gmp-ecm scaling.pdf (16.2 KB, 172 views)
kriesel is offline   Reply With Quote
Reply



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


Sat Jul 17 11:58:55 UTC 2021 up 50 days, 9:46, 1 user, load averages: 1.21, 1.19, 1.23

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.