Instructions to install gmp-ecm:

0) you first need to install the GNU MP (GMP) library.
   GNU MP is available from <http://www.swox.com/gmp/>.

   Remark: GNU MP is already installed in most Linux distributions.
   However it is often an old version (3.1.1 for example), moreover
   without processor-specific optimizations. If you care about efficiency,
   be sure to install the latest version of GNU MP (4.1.2 on February 2003),
   and to compile it on your particular processor.

1) to create the binary file "ecm", type:

      $ make GMP=<gmpdir>

   where <gmpdir> is the directory where GMP is installed
   (default is /usr/local/gmp).

   By default, a static binary is made. If this fails, try adding
   LDFLAGS="-lgmp -lm" to the make command.

   On systems without alloca.h (for example 32-bit AIX, NetBSD,
   FreeBSD), you need to add -D__freebsd to the C flags, for example
   using make CC="gcc -D__freebsd".

   Warning: to compile gmp-ecm, it is better to use the same compiler and
   options than used to compile GMP, otherwise the compilation may
   fail, or you may get poor performance. In the GMP build directory,
   simply type:

   $ egrep '(CC|CFLAGS)' Makefile

   to see which compiler and options were used to build GMP. For example
   on a Sparc v9 you may want to type:
   
   $ make GMP=<gmpdir> CC=cc CFLAGS="-fast -fns=no -fsimple=1 -xarch=v9" 

2) (optional) to check that "ecm" works correctly, type:

      $ ./test.pm1 ./ecm # this checks P-1
      $ ./test.pp1 ./ecm # this checks P+1
      $ ./test.ecm ./ecm # this checks ECM

   On an Athlon 2000+ with GMP 4.1.2, the P+1 test takes about 5 seconds,
   the P-1 test about 37 seconds, and the ECM test about 2 minutes.

   We have succesfully tested this version on the following configurations.
   Here are some timings obtained with ECM (B1=3e6) on the c155 file, with
   the command "./ecm -power 1 3e6 < c155":

configuration          version   compiler       step 1      step 2
                       of gmp                  (seconds)   (seconds)
athlon-pc-linux-gnu   gmp-4.1.2 gcc-2.95.3       79.7       47.3 MP 2000+
alphaev6-dec-osf4.0f  gmp-4.1.2 gcc-2.95.3      106.0       84.4 EV6-500
powerpc630-ibm-aix5.1.0.0 4.1.2 xlc             337.5      155.0 Power3+ 375
pentium3-pc-linux-gnu gmp-4.1.2 gcc-2.95.3      411.2      214.4 PIII-500
mips64-sgi-irix6.5    gmp-4.1.2 gcc-3.0.1       401.3      251.0 R10K-250

3) If you like gmp-ecm, please help us factoring Cunningham numbers. First
   download "cunningham.in" on <http://www.loria.fr/~zimmerma/ecmnet/>, then
   perform one ecm test with B1=3e6 on each number of this file:

   $ ./ecm 3e6 < cunningham.in > cunningham.out &

   If you find any factor (grep found cunningham.out), please submit it
   using the report form on <http://www.loria.fr/~zimmerma/ecmnet/>.

The README file explains how to efficiently use P-1, P+1 and ECM.

In case of problem, report it to us, with:
- the versions of GMP-ECM and GMP used (first output line), for example:
  
  GMP-ECM 5.0.3 [powered by GMP 4.1.2] [P+1]

- the machine type and operating system (uname -a or config.guess from GMP)
- the detailed input enabling us to reproduce the problem, for example:

  $ echo 328006342451 | ./ecm -pp1 -x0 5 120 7043

- the output you get.

Then send you report to us:
Alexander Kruppa <alexander.kruppa@stud.tu-muenchen.de>
Paul Zimmermann <zimmerma@loria.fr>
