Building ecmpi
mkdir builddir
cd builddir
cmake ..
make
Dependencies
To compile, ecmpi
needs
MPI,
GMP (gmp.h and libgmp) and
GMP-ECM (ecm.h and libecm).
The version of GMP-ECM must be at least 7.0.
The MPI library is detected with the CMake's module FindMPI.
By default, CMake will look for GMP and GMP-ECM in the system directories and then in the directories listed by the following environment variables:
- PATH and INCLUDE for header;
- PATH and LIB for library.
This behaviour can be overriden with the following environment variables:
- GMP_INCDIR (to specify a directory containing gmp.h), GMP_LIBDIR (to specify a directory containing the GMP library) and GMP (to specify a source or install directory of GMP);
- ECM_INCDIR (to specify a directory containing ecm.h), ECM_LIBDIR (to specify a directory containing the GMP-ECM library) and ECM (to specify a source or install directory of GMP-ECM).
For example, you can replace the cmake ..
line in the above instructions by
the following one:
GMP=$HOME ECM_INCDIR=/tmp/include ECM_LIBDIR=/tmp/lib cmake ..
Running ecmpi
Example:
mpiexec -H localhost,localhost ./ecmpi -N 221 -nb 16 -B1 10
This command line launches two MPI processes on localhost to try to factor 221 using 16 curves with B1=10.
The list of command-line parameters can be obtained by running the ecmpi
binary without argument.