![]() |
![]() |
#78 | |
"Ben"
Feb 2007
3,371 Posts |
![]() Quote:
edit: nevermind - this is not valid. Have to check that the chain actually works! conclusion is unchanged - finding cheaper pairs doesn't seem worthwhile. Code:
prime 9769 * 9781 cost = 103.5 prime 9769 cost = 109.0 prime 9781 cost = 103.5 (sum 212.5, savings 109.0 @ prac v=0.620181980807) Last fiddled with by bsquared on 2020-11-30 at 19:31 Reason: further analysis |
|
![]() |
![]() |
![]() |
#79 |
Mar 2019
24×32 Posts |
![]()
If I do a "git pull" on the latest code, and then "make COMPILER=gcc SKYLAKEX=1", I'm getting a bunch of linker errors:
Code:
gcc -g -O3 -mavx -march=skylake-avx512 -DSKYLAKEX -Wall -I. -I../../gmp-6.2.1 -c -o vec_common.o vec_common.c gcc -g -O3 -mavx -march=skylake-avx512 -DSKYLAKEX -Wall -I. -I../../gmp-6.2.1 -c -o calc.o calc.c gcc -g -O3 -mavx -march=skylake-avx512 -DSKYLAKEX -Wall -I. -I../../gmp-6.2.1 -c -o queue.o queue.c rm -f libavxecm.a ar r libavxecm.a eratosthenes/presieve.o eratosthenes/count.o eratosthenes/offsets.o eratosthenes/primes.o eratosthenes/roots.o eratosthenes/linesieve.o eratosthenes/soe.o eratosthenes/tiny.o eratosthenes/worker.o eratosthenes/soe_util.o eratosthenes/wrapper.o threadpool.o main.o ecm.o util.o vecarith.o vecarith52.o vec_common.o calc.o queue.o ar: creating libavxecm.a ranlib libavxecm.a gcc -g -O3 -mavx -march=skylake-avx512 -DSKYLAKEX -Wall -I. -I../../gmp-6.2.1 eratosthenes/presieve.o eratosthenes/count.o eratosthenes/offsets.o eratosthenes/primes.o eratosthenes/roots.o eratosthenes/linesieve.o eratosthenes/soe.o eratosthenes/tiny.o eratosthenes/worker.o eratosthenes/soe_util.o eratosthenes/wrapper.o threadpool.o main.o ecm.o util.o vecarith.o vecarith52.o vec_common.o calc.o queue.o -o avx-ecm libavxecm.a -L../../gmp-6.2.1/.libs -lm -lgmp -lpthread /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:323: multiple definition of `nmasks'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:323: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:341: multiple definition of `szSOEp'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:341: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:340: multiple definition of `spSOEprimes'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:340: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:337: multiple definition of `P_MAX'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:337: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:336: multiple definition of `P_MIN'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:336: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:335: multiple definition of `NUM_P'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:335: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:334: multiple definition of `PRIMES'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:334: first defined here /usr/bin/ld: eratosthenes/count.o:/tmp/avx-ecm/eratosthenes/soe.h:330: multiple definition of `SOE_VFLAG'; eratosthenes/presieve.o:/tmp/avx-ecm/eratosthenes/soe.h:330: first defined here |
![]() |
![]() |
![]() |
#80 | |
"Ben"
Feb 2007
3,371 Posts |
![]() Quote:
As with yafu, I see no problems with gcc 7.3.0 or icc 18.0.3. [edit] I know that defining globals in header files is frowned upon, but I didn't know it was an error as long as the header is only included once. That is why they are protected with the #ifndef X #define X macros. Could that have changed with the latest gcc? Maybe putting a -std=c11 in the make would help? Last fiddled with by bsquared on 2020-12-08 at 17:02 |
|
![]() |
![]() |
![]() |
#81 |
"Ed Hall"
Dec 2009
Adirondack Mtns
32×13×31 Posts |
![]()
Just to note, gcc 8.3.0 (Debian) and 9.3.0 (Ubuntu) worked fine for YAFU (wip), last time I upgraded all my machines.
Note: I will probably move this to the other thread later, since it's not really about AVX-ECM. Last fiddled with by EdH on 2020-12-08 at 17:19 |
![]() |
![]() |
![]() |
#82 |
Mar 2019
24×32 Posts |
![]()
Indeed, using gcc-8 instead of my default (gcc-10) appears to work fine.
|
![]() |
![]() |
![]() |
#83 | |
"Ben"
Feb 2007
3,371 Posts |
![]() Quote:
I've asked a question about this over in the programming thread; maybe more people read that and someone might know what's going on. I've browsed the gcc changelog but nothing jumps out at me as a possible cause of this behavior. No time at the moment to dig deeper... hoping that someone smarter than me can bail me out here. |
|
![]() |
![]() |