mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2021-09-02, 19:36   #210
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

72×11 Posts
Default

Quote:
Originally Posted by bsquared View Post
I think CUDA_ERROR_FILE_NOT_FOUND refers to the stage1_core_sm**.ptx file; it is supposed to be next to the executable. The sort_engine.dll file should be in a directory called cub beneath the executable.
Here are my files from a working msieve (as a zip file):

https://drive.google.com/file/d/1055...ew?usp=sharing
Brian Gladman is offline   Reply With Quote
Old 2021-09-03, 01:57   #211
Plutie
 
"Evan"
Dec 2020
Montreal

7110 Posts
Default

Having issues building w/ AVX512 support.



This command, which seems like it should work by itself from a glance at the Makefile, is exiting with many errors.
Code:
make ICELAKE=1 -j72
Code:
./libysiqs.a(SIQS.o): In function `process_poly':
/root/yafu/factor/qs/SIQS.c:1282: undefined reference to `nextRoots_32k_avx2_small'
./libysiqs.a(SIQS.o): In function `siqs_static_init':
/root/yafu/factor/qs/SIQS.c:2153: undefined reference to `tdiv_medprimes_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2164: undefined reference to `resieve_medprimes_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2165: undefined reference to `med_sieveblock_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2209: undefined reference to `resieve_medprimes_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2210: undefined reference to `tdiv_medprimes_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2212: undefined reference to `med_sieveblock_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2241: undefined reference to `nextRoots_32k_avx2_intrin'
/root/yafu/factor/qs/SIQS.c:2256: undefined reference to `nextRoots_32k_sse41'
/root/yafu/factor/qs/SIQS.c:2257: undefined reference to `med_sieveblock_32k_sse41'
/root/yafu/factor/qs/SIQS.c:2164: undefined reference to `resieve_medprimes_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2165: undefined reference to `med_sieveblock_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2176: undefined reference to `resieve_medprimes_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2178: undefined reference to `med_sieveblock_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2249: undefined reference to `nextRoots_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2176: undefined reference to `resieve_medprimes_32k_avx2'
/root/yafu/factor/qs/SIQS.c:2178: undefined reference to `med_sieveblock_32k_avx2'
collect2: error: ld returned 1 exit status
Makefile:415: recipe for target 'yafu' failed
make: *** [yafu] Error 1
Running make with these arguments has fixed most of the undefined references, but some still remain.
Code:
make ICELAKE=1 SKYLAKEX=1 USE_AVX2=1 USE_BMI2=1 NFS=1 -j72
Code:
./libysiqs.a(SIQS.o): In function `siqs_static_init':
/root/yafu/factor/qs/SIQS.c:2164: undefined reference to `resieve_medprimes_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2165: undefined reference to `med_sieveblock_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2164: undefined reference to `resieve_medprimes_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2165: undefined reference to `med_sieveblock_32k_avx512bw'
collect2: error: ld returned 1 exit status
Makefile:415: recipe for target 'yafu' failed
make: *** [yafu] Error 1

Any help would be greatly appreciated, thank you!
Plutie is offline   Reply With Quote
Old 2021-09-03, 03:48   #212
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

357810 Posts
Default

Quote:
Originally Posted by Plutie View Post
Having issues building w/ AVX512 support.


Running make with these arguments has fixed most of the undefined references, but some still remain.
Code:
make ICELAKE=1 SKYLAKEX=1 USE_AVX2=1 USE_BMI2=1 NFS=1 -j72
Code:
./libysiqs.a(SIQS.o): In function `siqs_static_init':
/root/yafu/factor/qs/SIQS.c:2164: undefined reference to `resieve_medprimes_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2165: undefined reference to `med_sieveblock_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2164: undefined reference to `resieve_medprimes_32k_avx512bw'
/root/yafu/factor/qs/SIQS.c:2165: undefined reference to `med_sieveblock_32k_avx512bw'
collect2: error: ld returned 1 exit status
Makefile:415: recipe for target 'yafu' failed
make: *** [yafu] Error 1

Any help would be greatly appreciated, thank you!
Can you verify that when building files and linking you actually see these flags being passed:

gcc -g -DUSE_SSE2 -DUSE_BMI2 -DUSE_AVX2 -DUSE_AVX512F -DUSE_AVX512BW -DSKYLAKEX -DIFMA -march=icelake-client ...

Particularly, the -DUSE_AVX512BW flag.

Actually, I think you just have to do a clean with the flags specified:

make clean ICELAKE=1 SKYLAKEX=1 USE_AVX2=1 USE_BMI2=1 NFS=1

then remake. If the relevant file (med_sieve_32k_avx2.c) was compiled before without -DUSE_AVX512BW then make won't re-build it just because a new flag is specified, the old object file first has to be removed (or source file touched).

Last fiddled with by bsquared on 2021-09-03 at 03:52
bsquared is offline   Reply With Quote
Old 2021-09-04, 15:44   #213
Plutie
 
"Evan"
Dec 2020
Montreal

4716 Posts
Default

Quote:
Originally Posted by bsquared View Post
Can you verify that when building files and linking you actually see these flags being passed:

gcc -g -DUSE_SSE2 -DUSE_BMI2 -DUSE_AVX2 -DUSE_AVX512F -DUSE_AVX512BW -DSKYLAKEX -DIFMA -march=icelake-client ...

Particularly, the -DUSE_AVX512BW flag.

Actually, I think you just have to do a clean with the flags specified:

make clean ICELAKE=1 SKYLAKEX=1 USE_AVX2=1 USE_BMI2=1 NFS=1

then remake. If the relevant file (med_sieve_32k_avx2.c) was compiled before without -DUSE_AVX512BW then make won't re-build it just because a new flag is specified, the old object file first has to be removed (or source file touched).

Sorry for the delay. Tried that, still isn't working. (also realized that the CPU in this system isn't actually ice lake, but skylake-x). Tried rebuilding after the clean with
Code:
make SKYLAKEX=1 NFS=1
This didn't work either, and here are the flags being passed to gcc.

Code:
gcc-8 -g -DUSE_SSE2 -DUSE_BMI2 -DUSE_AVX2 -DUSE_AVX512F -DUSE_AVX512BW -DSKYLAKEX
Plutie is offline   Reply With Quote
Old 2021-09-04, 15:48   #214
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2×1,789 Posts
Default

Quote:
Originally Posted by Plutie View Post
Sorry for the delay. Tried that, still isn't working. (also realized that the CPU in this system isn't actually ice lake, but skylake-x). Tried rebuilding after the clean with
Code:
make SKYLAKEX=1 NFS=1
This didn't work either, and here are the flags being passed to gcc.

Code:
gcc-8 -g -DUSE_SSE2 -DUSE_BMI2 -DUSE_AVX2 -DUSE_AVX512F -DUSE_AVX512BW -DSKYLAKEX
It may seem redundant, but after a clean try this:

make SKYLAKEX=1 USE_AVX2=1 USE_BMI2=1 NFS=1

That is the build line I use all the time; if it doesn't work you can post or PM me the errors. I am working to make builds easier, thanks for your patience.
bsquared is offline   Reply With Quote
Old 2021-09-04, 15:57   #215
Plutie
 
"Evan"
Dec 2020
Montreal

1078 Posts
Default

That worked, thank you!
Plutie is offline   Reply With Quote
Old 2021-09-05, 15:49   #216
chris2be8
 
chris2be8's Avatar
 
Sep 2009

42008 Posts
Default

Quote:
Originally Posted by bsquared View Post
I think CUDA_ERROR_FILE_NOT_FOUND refers to the stage1_core_sm**.ptx file; it is supposed to be next to the executable. The sort_engine.dll file should be in a directory called cub beneath the executable.
See https://mersenneforum.org/showpost.p...8&postcount=50 for details of what I found out about the latest msieve version.
chris2be8 is offline   Reply With Quote
Old 2021-09-11, 12:40   #217
stream
 
May 2015

1012 Posts
Default

Pure AVX2 build is broken:

make yafu COMPILER=gcc USE_AVX2=1 USE_BMI2=1

(NFS is intentionally disabled)

Linking fails with bunch of references to AVX-512 code.

Code:
./libyecm.a(avx_ecm_main.o): In function `vec_ecm_main':
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:585: undefined reference to `vecmulmod52_fixed832_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:586: undefined reference to `vecsqrmod52_fixed832_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:587: undefined reference to `vec_simul_addsub52_fixed1040'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:578: undefined reference to `vecmulmod52_fixed624_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:579: undefined reference to `vecsqrmod52_fixed624_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:580: undefined reference to `vec_simul_addsub52_fixed1040'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:571: undefined reference to `vecmulmod52_fixed416_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:572: undefined reference to `vecsqrmod52_fixed416_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:573: undefined reference to `vec_simul_addsub52_fixed1040'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:592: undefined reference to `vecmulmod52_fixed1040_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:593: undefined reference to `vecsqrmod52_fixed1040_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:594: undefined reference to `vec_simul_addsub52_fixed1040'
stream is offline   Reply With Quote
Old 2021-09-12, 10:49   #218
johnadam74
 
"John A Burroughs"
Jan 2016
Warwick, RI

2510 Posts
Default

Revision 536 will compile but something must have changed in Revision 537 to break the code?
johnadam74 is offline   Reply With Quote
Old 2021-09-12, 13:37   #219
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

2·17·103 Posts
Default

I'm back home now and able to test v2.06 on my Win10/i8-8100 machine.
It works, but I've noticed a couple things (which entirely could be me doing something wrong).

1) ECM runs as a single thread of yafu-x64.exe
I don't care if ECM runs within yafu or spawns external ecm.exe as long as it uses the appropriate number of threads.
Relevant yafu.ini entries:
threads=4
ecm_path=c:\users\user\desktop\yafu2\ecm\ecm.exe
If I specify an invalid path for ecm.exe then it appropriately tells me "ecm: ECM executable does not exist at c:\invalid\path\ecm.exe" and "using internal single threaded ECM...", but even when the path to ecm.exe is valid it appears to be using the internal, single-threaded ECM (with no warning).

2) Number of witnesses for PRP is always "1" no even if I set something like nprp=20 in yafu.ini

3) Increased verbosity doesn't seem to work (at least in yafu.ini). The description says "Note that more v's increase the verbosity" but if I specify v v it tells me "invalid option v v" and spews the list of valid options and exits

Last fiddled with by James Heinrich on 2021-09-12 at 14:25
James Heinrich is offline   Reply With Quote
Old 2021-09-12, 14:07   #220
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

DFA16 Posts
Default

Quote:
Originally Posted by stream View Post
Pure AVX2 build is broken:

make yafu COMPILER=gcc USE_AVX2=1 USE_BMI2=1

(NFS is intentionally disabled)

Linking fails with bunch of references to AVX-512 code.

Code:
./libyecm.a(avx_ecm_main.o): In function `vec_ecm_main':
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:585: undefined reference to `vecmulmod52_fixed832_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:586: undefined reference to `vecsqrmod52_fixed832_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:587: undefined reference to `vec_simul_addsub52_fixed1040'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:578: undefined reference to `vecmulmod52_fixed624_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:579: undefined reference to `vecsqrmod52_fixed624_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:580: undefined reference to `vec_simul_addsub52_fixed1040'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:571: undefined reference to `vecmulmod52_fixed416_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:572: undefined reference to `vecsqrmod52_fixed416_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:573: undefined reference to `vec_simul_addsub52_fixed1040'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:592: undefined reference to `vecmulmod52_fixed1040_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:593: undefined reference to `vecsqrmod52_fixed1040_bfips'
/home/stream/work/yafu/yafu/factor/avx-ecm/avx_ecm_main.c:594: undefined reference to `vec_simul_addsub52_fixed1040'
Thanks, it's fixed now.

Those new function make avx-ecm about 10% faster below 1040 bits, but I had forgotten to add stubs for non-avx-512 builds.
bsquared is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
yafu ignoring yafu.ini chris2be8 YAFU 6 2019-10-17 16:22
Running YAFU via Aliqueit doesn't find yafu.ini EdH YAFU 8 2018-03-14 17:22
YAFU-1.34 bsquared YAFU 119 2015-11-05 16:24
Yafu bug. storflyt32 YAFU 2 2015-06-29 05:19
yafu 1.32 bsquared YAFU 28 2012-07-20 16:17

All times are UTC. The time now is 12:01.


Mon Oct 18 12:01:27 UTC 2021 up 87 days, 6:30, 0 users, load averages: 0.95, 1.14, 1.22

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.