View Single Post
Old 2012-01-29, 13:03   #289
ATH's Avatar
Dec 2003

54218 Posts

If anyone else want to try compile gmpecm on your own machine (64 bit windows only), you need at least 650 Mb free on your c-drive. Thanks to Karl M Johnson for testing this. Thanks to WraithX for teaching me how to compile 64bit gmpecm.

1) Get the 82 Mb zip-file:
2) Extract with 7-zip ( to the root of your c-drive: c:\ This will extract 3 folders: Msys, Mingw64, Python27 and a batch file: msys.bat
3) Run the c:\msys.bat (or the C:\msys\1.0\msys.bat). This will open the msys command window.
4) type: "mpircompile.bat" to compile MPIR. Choose in the menu which processor you have by typing A,B,C,D,E,F,G,H,I or J.
5) type: "gmpecm-compile.bat" to compile GMP-ECM. It will tune parameters for your computer so it will be best to turn off other programs during this.
6) get your ecm.exe in "C:\msys\1.0\home\gmpecm64" or in "C:\msys\1.0\local\bin"

More detailed explanation of the batch files:
mpircompile.bat will run config.guess to get the suggested build, which MPIR does very well. Then it will run:
configure ABI=64 CC=gcc CFLAGS="-O3 -m64 -std=gnu99 -march=<processor> -mtune=<processor>" --enable-gmpcompat --build=<build> --host=<build>
where <processor> can be: corei7-avx, corei7, core2, atom, bdver1 (bulldozer), barcelona, opteron-sse3, opteron, athlon64-sse3, athlon64 and where <build> is the build from config.guess. For corei7-avx it adds the -mavx flag and for bulldozer it adds -mavx -mxop flags.
Then it will do:
make install
make check

gmpecm-compile.bat will first update the gmpecm64 folder to the latest svn, then it will run:
autoreconf -i
configure ABI=64 CC=gcc CFLAGS="-O3 -m64 -std=gnu99 -march=<processor> -mtune=<processor>" LDFLAGS="-Wl,--stack,16777216" --enable-asm-redc --build=x86_64-w64-mingw32 --disable-assert --with-gmp=/usr/local
make check
make ecm-params; make
make install
where <processor> is the same as in MPIR compiling, and again -mavx added for core7-avx and -mavx -mxop for bulldozer.

Last fiddled with by ATH on 2012-01-29 at 13:34
ATH is offline   Reply With Quote