Go Back > Factoring Projects > GMP-ECM

Thread Tools
Old 2017-01-06, 04:12   #1
ThomRuley's Avatar
May 2003

13·19 Posts
Default GMP-ECM - installation - how to compile - Ubuntu 15

I've downloaded the tar.gz for GMP 7.0.4

Ran the recommended command ./configure && make & make install

Installation appeared to go well, as I now have a directory full of files, mostly of the form .c and .h

My question is, now what? What am I supposed to run from here? Do I need to compile one or more of the C files?
ThomRuley is offline   Reply With Quote
Old 2017-01-06, 14:53   #2
EdH's Avatar
"Ed Hall"
Dec 2009
Adirondack Mtns

22×3×5×59 Posts

If all is compiled, you should be able to type in a terminal (in any folder):
ecm --help
and, get a list of options. If the options are shown, at this point you can test ECM from the command prompt by first saving a number in a workfile:
echo 123456789876543212345678987654321 >ecmIn
and, then entering the following:
ecm -v 3000000 <ecmIn
You should get something similar to:
GMP-ECM 7.0.3 [configured with GMP 6.1.1, --enable-asm-redc] [ECM]
Tuned for x86_64/k8/params.h
Running on localhost.localdomain
Input number is 123456789876543212345678987654321 (33 digits)
Using MODMULN [mulredc:0, sqrredc:0]
Computing batch product (of 4328086 bits) of primes up to B1=3000000 took 179ms
Using B1=3000000, B2=5706890290, polynomial Dickson(6), sigma=1:4165654196
dF=16384, k=2, d=158340, d2=11, i0=8
Expected number of curves to find a factor of n digits:
35    40    45    50    55    60    65    70    75    80
374    2753    24017    241048    2713723    3.4e+07    4.8e+08    7.4e+09    1.6e+11    1.8e+16
Step 1 took 1571ms
********** Factor found in step 1: 7201
Found composite factor of 4 digits: 7201
Prime cofactor 17144395205741315420869183121 has 29 digits
Peak memory usage: 15MB
If this didn't work, try:
whereis ecm
It should return:
ecm: /usr/local/bin/ecm /usr/include/ecm.h
If not, then something from the install didn't work and we can provide further thoughts.

OTOH, if everything worked, you can use the above example on other numbers and study the options to see different things like -c, which will tell ECM how many curves to run, etc.
EdH is offline   Reply With Quote
Old 2017-01-06, 16:54   #3
EdH's Avatar
"Ed Hall"
Dec 2009
Adirondack Mtns

67248 Posts

In thinking over my previous response, I'm wondering if I misinterpreted your post. Are you saying you have no ecm program installed, even though all seemed to compile correctly?

For all my compilations of ECM, I compiled GMP first and then ECM, doing each step individually and using the suggested 'make check" for both gmp and ECM.

I do have a page you might find of interest, that steps through gmp and gmp-ecm installations on an Ubuntu machine, on the way toward installing and running Aliqueit:

Steps to install and set up Aliqueit on an Ubuntu* computer
EdH is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation of GGNFS LegionMammal978 Msieve 17 2017-01-20 19:49
GGNFS won't compile? pakaran Factoring 14 2015-09-05 23:36
Compile v26 on Windows Brain Software 1 2010-11-24 00:34
Anyone want to compile an OS X ecm for yoyo? jasong GMP-ECM 1 2009-03-14 11:22
help to compile.... em99010pepe Programming 8 2006-12-06 17:11

All times are UTC. The time now is 10:53.

Tue Jan 19 10:53:59 UTC 2021 up 47 days, 7:05, 0 users, load averages: 1.96, 1.46, 1.31

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.