![]() |
![]() |
#23 |
Apr 2020
22×3×5×19 Posts |
![]()
ecm-7.0.4.tar.bz2 is not the "release tarball" that WraithX is referring to. There are four links on that page labelled "source code". Below them is one labelled "release tarball". That is the one that contains configure and install-sh. It compiles successfully for me.
|
![]() |
![]() |
![]() |
#24 | |
∂2ω=0
Sep 2002
República de Califo
22×2,939 Posts |
![]() Quote:
Update: Build/test/install completed successfully, but a timing-comparison for the same input and bounds shows a 10x performance hit vs 1 core of my old Haswell - Ugh. I expected "only" a 4-5x hit based on similar comparative timings for the GMP gcd on GIMPS-wavefront-sized inputs. Last fiddled with by ewmayer on 2022-04-02 at 02:18 |
|
![]() |
![]() |
![]() |
#25 |
Mar 2018
22×3×5 Posts |
![]()
I grabbed 7.0.4 release from https://members.loria.fr/PZimmermann...ecm/devel.html
|
![]() |
![]() |
![]() |
#26 |
Jan 2005
2×5×7 Posts |
![]()
I have managed to answer my own question from another thread.
Current sources are gmp-6.3.0, ecm-7.0.4, and p95v308b15.source. My systems are skylake/20.04 and Raptorlake/22.04. 0. Build GMP, if not already available. The following assumes it's installed in the /usr/local folder. 1. Build gwnum per the instructions in the p95v308b15.source/gwnum/readme.txt file. My 64-bit systems use the "make -f make64" Terminal command. 2. Switch to the ecm-7.0.4 folder and run ./configure to include gwnum. On my systems I use ./configure --with-gmp=/usr/local --with-gwnum=../p95v308b15.source/gwnum 3. (The tricky part it took me a while to figure out.) Open the (just created) makefile in the ecm-7.0.4 folder in a text editor. Search for "libgmp.a" and add the following to that line: "[gmp path]libgmp.so". On my systems the line GMPLIB = /usr/local/lib/libgmp.a changes to GMPLIB = /usr/local/lib/libgmp.a /usr/local/lib/libgmp.so Now search for "-lpthread". Where it appears on the LIBS line, add "-ldl" right after it. On my system the line becomes LIBS = -lrt -lm -lm -lm -lm -lm ../p95v308b15.source/gwnum/gwnum.a -lpthread -ldl Save and close the makefile. On the Terminal where you executed ./configure... for ecm-7.0.4, run 'make'. ecm-7.04 with gwnum should now compile and link without linker errors. (We hope!) For some reason known only to the linker gods, the libgmp.so file is only needed to resolve ONE reference, to mpz_import. Running "make check" reveals that there's still work to do. The group order option "-go n" is broken. |
![]() |
![]() |
![]() |
#27 |
Jan 2005
2×5×7 Posts |
![]()
Open /ecm-7.0.4/Fgw.c in a text editor.
Replace all of the lines from #346 to #368 (inclusive) Code:
346> mpz_t gw_x, gw_z, gw_A; ... 368> mpz_init2 (gw_z, (gw_n+1)*gw_log_2(gw_b)+64); Code:
mpz_t gw_x, gw_z, gw_A, tmp; int youpi; /* P->y must never be zero if/when calling ecm_mul */ if( P->y->_mp_size == 0 ) mpres_set_ui (P->y, 1, modulus); if (mpz_cmp_ui (go, 1) > 0) { mpres_t b; mpres_init (b, modulus); mpres_add_ui (b, P->A, 2, modulus); mpres_div_2exp (b, b, 2, modulus); /* b == (A+2)/4 */ ecm_mul (P->x, P->y, go, modulus, b); mpres_clear (b, modulus); } outputf (OUTPUT_VERBOSE, "Using gwnum_ecmStage1(%.0f, %d, %d, %d, %.0f, %ld)\n", gw_k, gw_b, gw_n, gw_c, B1, gw_B1done); /* reconstruct k*b^n+c to get true size */ mpz_init_set_ui (tmp, gw_b); mpz_pow_ui (tmp, tmp, gw_n); mpz_mul_ui (tmp, tmp, (unsigned long)gw_k); if (gw_c >= 0) mpz_add_ui (tmp, tmp, gw_c); else mpz_sub_ui (tmp, tmp, (gw_c * -1)); /* Allocate enough memory for any residue (mod k*b^n+c) for x, z */ mpz_init2 (gw_x, 8*sizeof(mp_size_t)*(tmp->_mp_size)); mpz_init2 (gw_z, 8*sizeof(mp_size_t)*(tmp->_mp_size)); Last fiddled with by kruoli on 2023-09-19 at 09:00 Reason: Done as requested. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling mfaktc on Mac OS X | dozba | GPU Computing | 23 | 2017-10-03 19:50 |
compiling GMP-ECM | ATH | GMP-ECM | 69 | 2017-01-04 12:03 |
Help needed compiling GMP-ECM | M0CZY | GMP-ECM | 76 | 2009-09-29 15:48 |
Compiling Phrot | rogue | Sierpinski/Riesel Base 5 | 142 | 2009-01-09 03:42 |
Compiling 24.14 | CBoland | Software | 6 | 2007-08-01 00:11 |