mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > EdH

Reply
 
Thread Tools
Old 2018-02-22, 03:09   #1
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22×7×112 Posts
Default How I Install GMP-ECM onto my Ubuntu Machines

(Note: I expect to keep the first post of each of these "How I Install..." threads up-to-date with the latest version. Please read the rest of each thread to see what may have led to the current set of instructions.)

This thread will explain the steps I use to install GMP-ECM onto a computer which is already running Ubuntu. This procedure should work for other linux distributions as well but the only other one I've currently tested is Debain.

Ubuntu does contain GMP-ECM in its repositories and it can be installed from the Software Installer provided. I will be describing here, how to acquire, compile and install the latest version of the package.

I will expect the user of these steps to be able to use the sudo command.

I will use a directory called Math for these installations. You may elect to replace "Math" with your own choice.

These instructions can be used as a reference only, if you want, but I will provide specifics that work for me. If you follow these steps as I provide them, you should end up with a working installation.

First, follow the procedure in:

How I Install GMP onto my Ubuntu Machines

or, install GMP from the repository.

Open a terminal and Enter:
Code:
sudo apt-get update
You should be prompted for your password. This prompt should only appear once for your terminal session, unless you leave it idle for a long time.

After the update completes and the user prompt reappears, type the following. (If you have already installed any of these, you may omit them here, but if you don't omit them, all will still be fine):
Code:
sudo apt-get install g++ m4 zlib1g-dev make p7zip subversion libtool autoconf
Accept the prompt.

Use subversion to acquire the latest GMP-ECM and place it in ~/Math/ecm:
Code:
svn co svn://scm.gforge.inria.fr/svn/ecm/trunk $HOME/Math/ecm
Move into the ecm folder:
Code:
cd Math/ecm
Type the following:
Code:
libtoolize
Type:
Code:
autoreconf -i
Type:
Code:
./configure --with-gmp=/usr/local/
When the configuration script ends, type:
Code:
make
When make ends, type:
Code:
make check
If all checked out, type:
Code:
sudo make install
Return to your home directory:
Code:
cd ~
You can check your installation by running a test factor instance:
Code:
echo 115367564564210182766242534110944507919869313713243756429 | ecm 1000000
You should see something like:
Code:
GMP-ECM 7.0.5-dev [configured with GMP 6.1.1, --enable-asm-redc, --enable-assert] [ECM]
Input number is 115367564564210182766242534110944507919869313713243756429 (57 digits)
Using B1=1000000, B2=1045563762, polynomial Dickson(6), sigma=1:280903524
Step 1 took 744ms
********** Factor found in step 1: 3387679
Found prime factor of 7 digits: 3387679
Prime cofactor 34055046113935288073705488067477617542827792631251 has 50 digits

Last fiddled with by EdH on 2019-09-12 at 00:50 Reason: Keep procedure up to latest steps
EdH is offline   Reply With Quote
Old 2018-02-22, 09:58   #2
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

1011100110012 Posts
Default

Quote:
Originally Posted by EdH View Post
Open your browser and go to the following link:

Project Filelist for GMP-ECM (Elliptic Curve Method)

Download the latest archive and place it in the Math folder.

Using your files program, extract the ecm-x.x.x files into the Math folder. Rename the ecm-x.x.x folder to ecm.
Another option is to get the latest svn, and then you need 2 other commands before ./configure and you will probably need to get the packages: subversion, libtool and m4:

cd Math
svn checkout svn://scm.gforge.inria.fr/svn/ecm/trunk
rename trunk to ecm
cd ecm
libtoolize
autoreconf -i

then continue with ./configure

Last fiddled with by ATH on 2018-02-22 at 09:59
ATH is offline   Reply With Quote
Old 2018-02-22, 15:40   #3
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22×7×112 Posts
Default

Thanks!

m4 is already listed in my apt-get install and subversion would have been listed in the msieve and yafu installs. I've not yet used libtool for anything.

If this gets the very latest GMP-ECM, then it's what I'm really striving for and I will change over to your suggestion and rewrite my procedure. I need to play with it just a bit, first.

I think I'll opt for sending it directly to an ecm folder:
Code:
svn co svn://scm.gforge.inria.fr/svn/ecm/trunk $HOME/Math/ecm
That way a simple cut and paste can be used by anyone wanting to do this on their own.

I appreciate the help.

Last fiddled with by EdH on 2019-09-15 at 15:22
EdH is offline   Reply With Quote
Old 2018-02-22, 16:09   #4
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22·7·112 Posts
Default

I also needed to install autoconf.
EdH is offline   Reply With Quote
Old 2018-02-22, 22:56   #5
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

13·593 Posts
Default

Quote:
Originally Posted by EdH View Post
I also needed to install autoconf.
apt-get install build-essential
Xyzzy is offline   Reply With Quote
Old 2018-02-23, 03:45   #6
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22×7×112 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
apt-get install build-essential
I'm not sure I understand the need?
EdH is offline   Reply With Quote
Old 2018-02-23, 14:58   #7
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

13×593 Posts
Default

Rather than install individual packages this meta-package installs (via dependencies) everything you need to build programs.
Xyzzy is offline   Reply With Quote
Old 2018-02-23, 22:58   #8
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

D3C16 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Rather than install individual packages this meta-package installs (via dependencies) everything you need to build programs.
But, the list of packages for build-essential that I've seen only has g++, gcc and make of the things I use. gcc is handled by g++ in my install line (or, it's installed in the basic Ubuntu OS), so build-essential, according to its list would only replace g++ and make. I still need autoconf, libtools and m4. Are they included in build-essential? (I do intend to test later.) Is there a more complete list?

Thanks for any and all help in my education...
EdH is offline   Reply With Quote
Old 2018-05-13, 23:10   #9
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2·587 Posts
Default

I just want to thank you for taking the time to write these excellent guides, quality stuff!
VictordeHolland is offline   Reply With Quote
Old 2018-05-14, 03:04   #10
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22·7·112 Posts
Default

You're welcome! Thanks for the feedback.
EdH is offline   Reply With Quote
Old 2018-07-18, 22:01   #11
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2·587 Posts
Default

You might want to run
Code:
make ecm-params
after you've done 'make' to tune the ecm parameters for your specific CPU.
Be sure to stop any other processes using CPU time (it takes a couple of minutes)
VictordeHolland is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How I install YAFU onto my Ubuntu Machines EdH EdH 97 2020-09-28 18:11
How I Install CADO-NFS onto my Ubuntu Machines EdH EdH 3 2019-06-24 03:42
How I Install msieve onto my Ubuntu Machines EdH EdH 0 2018-02-23 14:43
How I Install ggnfs onto my Ubuntu Machines EdH EdH 0 2018-02-22 03:31
How I Install GMP onto my Ubuntu Machines EdH EdH 0 2018-02-21 23:48

All times are UTC. The time now is 05:46.

Fri Oct 30 05:46:00 UTC 2020 up 50 days, 2:56, 1 user, load averages: 1.72, 1.81, 1.78

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.