20210811, 17:28  #156 
Apr 2010
10111000_{2} Posts 
I get a SIGSEGV with yafu 2.05 on a Ryzen 3950X under linux built with
Code:
make yafu NFS=1 USE_SSE41=1 USE_AVX2=1 USE_BMI2=1 Code:
yafu "siqs(1131941884204194473862586294639558925416454742463976786637412462462312690253602905547214801)" 
20210811, 17:41  #157 
"Ben"
Feb 2007
6772_{8} Posts 
Thanks for the report and testing, I'll look into it. I won't be able to get a revision out until Sunday.

20210811, 17:44  #158  
"Ben"
Feb 2007
2·1,789 Posts 
Quote:


20210811, 18:45  #159 
Apr 2020
111110110_{2} Posts 
In case it's helpful in diagnosing the issue, I couldn't reproduce this crash on an i58500 with the same build flags.

20210811, 19:05  #160  
"Evan"
Dec 2020
Montreal
71 Posts 
Quote:
P.S. YAFU 2.05 from the github repository's "yafux64.exe" was crashing upon starting a SIQS factorization. Unable to get logs for the next few days, but I am available to answer more questions if there are any regarding my setup. Last fiddled with by Plutie on 20210811 at 19:09 Reason: Added extra issue report 

20210812, 06:06  #161  
Apr 2010
2^{3}·23 Posts 
Quote:
Also note that yafu works if I omit USE_AVX2=1. I'm using gcc10 of debian bullseye. Here's a complete log: Code:
yafu "siqs(rsa(215))" YAFU Version 2.05 Built with GCC 10 Using GMPECM 7.0.5dev, Powered by GMP 6.2.1 Detected AMD Ryzen 9 3950X 16Core Processor Detected L1 = 32768 bytes, L2 = 67108864 bytes, CL = 64 bytes Using 1 random witness for RabinMiller PRP checks Cached 664579 primes; max prime is 9999991 =============================================================== ======= Welcome to YAFU (Yet Another Factoring Utility) ======= ======= bbuhrow@gmail.com ======= ======= Type help at any time, or quit to quit ======= =============================================================== >> starting SIQS on c65: 31635638050360383928410741313802727069876274264595430910292999519 ==== sieve params ==== n = 67 digits, 221 bits factor base: 6384 primes (max prime = 137117) single large prime cutoff: 10283775 (75 * pmax) allocating 3 large prime slices of factor base buckets hold 2048 elements large prime hashtables have 196608 bytes using AVX2 enabled 32k sieve core sieve interval: 4 blocks of size 32768 polynomial A has ~ 8 factors using multiplier of 71 using Q2(x) polynomials for kN mod 8 = 1 using SPV correction of 21 bits, starting at offset 32 trial factoring cutoff at 75 bits ==== sieving in progress (1 thread): 6448 relations needed ==== ==== Press ctrlc to abort and save state ==== Segmentation fault Code:
#0 0x000055555558aee1 in nextRoots_32k_avx2 (sconf=<optimized out>, dconf=0x555557fa3710) at factor/qs/update_poly_roots_32k_avx2.c:1506 #1 0x0000555555575da6 in process_poly (vptr=vptr@entry=0x5555578fed60) at factor/qs/SIQS.c:1292 #2 0x000055555557d368 in SIQS (fobj=fobj@entry=0x5555578f5ef0) at factor/qs/SIQS.c:828 #3 0x000055555556c414 in feval (funcnum=funcnum@entry=59, nargs=nargs@entry=1, metadata=metadata@entry=0x7fffffffd030) at top/cmdParser/calc.c:2559 #4 0x000055555556e0c6 in calc (in=in@entry=0x7fffffffce90, metadata=metadata@entry=0x7fffffffd030) at top/cmdParser/calc.c:1946 #5 0x000055555556e364 in calc_with_assignment (in=in@entry=0x5555578fce60, metadata=metadata@entry=0x7fffffffd030, force_quiet=force_quiet@entry=0) at top/cmdParser/calc.c:1526 #6 0x000055555556a421 in process_expression (input_exp=<optimized out>, metadata=metadata@entry=0x7fffffffd030, force_quiet=0, no_convert_result=no_convert_result@entry=0) at top/cmdParser/calc.c:1472 #7 0x000055555555a850 in main (argc=<optimized out>, argv=<optimized out>) at top/driver.c:366 Code:
β 0x55555558aed3 <nextRoots_32k_avx2+10563> mov 0x28(%rsi),%r14 β β 0x55555558aed7 <nextRoots_32k_avx2+10567> vmovdqa (%rdi,%r15,4),%ymm3 β β 0x55555558aedd <nextRoots_32k_avx2+10573> mov 0x30(%rsi),%r13 β β >0x55555558aee1 <nextRoots_32k_avx2+10577> vmovdqa (%r14,%r15,4),%ymm1 β β 0x55555558aee7 <nextRoots_32k_avx2+10583> vpaddd %ymm3,%ymm1,%ymm1 β β 0x55555558aeeb <nextRoots_32k_avx2+10587> vmovdqa 0x0(%r13,%r15,4),%ymm2 β β 0x55555558aef2 <nextRoots_32k_avx2+10594> mov 0x20(%rsi),%rdi β Last fiddled with by Gimarel on 20210812 at 06:25 Reason: gdb backtrace added 

20210816, 21:11  #162 
"Ben"
Feb 2007
2×1,789 Posts 
Thanks for the detailed info. Looks like gcc10 is having problems aligning some data, which comes into play once input numbers are big enough to start using avx2 inline assembly. There may be gcc options that force alignment, or you can not use avx2, as you discovered, which is probably the best option for now. I have not seen the same problems with icc or gcc11.1.0 or gcc7.3.0. Sorry I can't be of more help.

20210816, 21:15  #163  
"Ben"
Feb 2007
2×1,789 Posts 
Quote:


20210816, 21:53  #164  
Apr 2020
766_{8} Posts 
Quote:


20210817, 11:15  #165  
Apr 2010
2^{3}×23 Posts 
Quote:
I also tried clang11 but the build fails with: Code:
clang11 g DUSE_SSE2 mbmi2 mbmi DUSE_BMI2 DUSE_AVX2 DUSE_SSE41 mavx2 DUSE_SSE41 m64 msse4.1 DUSE_NFS O3 march=native mtune=native fomitframepointer Wall I. Iinclude Itop/aprcl Itop/cmdParser Itop/ I../../../msieve I../ysieve I../ytools I../../ecm I../gmp/include I../gmpecm/include/ c o factor/qs/msieve/lanczos.o factor/qs/msieve/lanczos.c In file included from factor/qs/msieve/lanczos.c:18: In file included from include/lanczos.h:21: In file included from include/qs_impl.h:20: include/monty.h:145:19: error: invalid input constraint '0ULL' in asm : "1"(c), "0ULL"(0), "r"(n)); ^ 1 error generated. make: *** [Makefile:450: factor/qs/msieve/lanczos.o] Fehler 1 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
yafu ignoring yafu.ini  chris2be8  YAFU  6  20191017 16:22 
Running YAFU via Aliqueit doesn't find yafu.ini  EdH  YAFU  8  20180314 17:22 
YAFU1.34  bsquared  YAFU  119  20151105 16:24 
Yafu bug.  storflyt32  YAFU  2  20150629 05:19 
yafu 1.32  bsquared  YAFU  28  20120720 16:17 