mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   YAFU (https://www.mersenneforum.org/forumdisplay.php?f=96)
-   -   YAFU 2.0 (https://www.mersenneforum.org/showthread.php?t=26681)

bsquared 2021-06-01 14:01

Thanks Charybdis for catching that silly sign error. Fixed now.
EdH: easy change; done.
Git updated, will re-upload windows binary when I get a chance.

EdH 2021-06-01 14:07

Excellent!

Thanks for all the work!

charybdis 2021-06-01 16:30

[QUOTE=bsquared;579662]Thanks Charybdis for catching that silly sign error. Fixed now.
EdH: easy change; done.
Git updated, will re-upload windows binary when I get a chance.[/QUOTE]

Thank you!

[QUOTE=charybdis;579480]
Also, I notice that the required ECM effort is not reduced when an SNFS special form is detected, necessitating a manual change to pretest_ratio.[/QUOTE]

Any chance you'll fix this soon? Or is it a feature rather than a bug?

bsquared 2021-06-01 16:49

[QUOTE=charybdis;579680]Thank you!



Any chance you'll fix this soon? Or is it a feature rather than a bug?[/QUOTE]

I think it still works, but a potential gotcha is if -plan is set to something other than normal. If -plan is custom or something else besides normal, then the autofactorer respects that choice and doesn't fiddle with ecm effort.

Does that seem reasonable, or should ecm effort always be reduced from its current setting if a snfs form is detected?

Example:
[CODE]./yafu "factor(2^523*1281979+1)" -v -v -plan normal -threads 32


YAFU Version 2.02
Built with Intel Compiler 1910
Using GMP-ECM 7.0.4, Powered by GMP 6.2.0
Detected Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz
Detected L1 = 32768 bytes, L2 = 28835840 bytes, CL = 64 bytes
Using 1 random witness for Rabin-Miller 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 =======
===============================================================

>> fac: check tune params contained invalid parameter(s), ignoring tune info.
fac: factoring 35202105758146315647211128818022261581127413586569658101720419483772893858835774832176107542302123395740957391925356955622286436215554973272799360858461559410655233
fac: using pretesting plan: normal
fac: check tune params contained invalid parameter(s), ignoring tune info.
fac: no tune info: using qs/gnfs crossover of 100 digits
fac: no tune info: using qs/snfs crossover of 75 digits
input from file = 587798871182819125651887557119241311895329541639294971678415636172181853499307568869458721586841379351
input to yafu = 35202105758146315647211128818022261581127413586569658101720419483772893858835774832176107542302123395740957391925356955622286436215554973272799360858461559410655233
div: primes less than 10000
div: found prime factor = 3
div: found prime factor = 491
div: found prime factor = 619
fmt: 1000000 iterations
98%fmt: performed 36 perfect square checks
rho: x^2 + 3, starting 1000 iterations on C158
rho: found prp9 factor = 812666563
rho: x^2 + 3, starting 1000 iterations on C149
rho: x^2 + 2, starting 1000 iterations on C149
rho: x^2 + 1, starting 1000 iterations on C149
fac: check tune params contained invalid parameter(s), ignoring tune info.
nfs: searching for brent special forms...
nfs: checking a*b^x +/- c for 32 <= x <= 1478
nfs: input divides 1281979*2^523 + 1
fac: ecm effort reduced from 45.85 to 35.66: input has snfs form
[/CODE]

Note I had to put -plan normal in the command line, as I usually run -plan deep (with AVXECM).

charybdis 2021-06-01 17:50

[QUOTE=bsquared;579685]Note I had to put -plan normal in the command line, as I usually run -plan deep (with AVXECM).[/QUOTE]

Ah, this must be it - the default yafu.ini has plan=deep. I think this is rather confusing, as I can't see anything in the documentation saying that I need to change this to plan=normal in order for the ECM effort to be reduced for SNFS numbers.

However the different plans behave in this situation, it ought to be clearly documented. Personally I'd have it so that each of the standard plans reduces the effort for SNFS, but plan=custom still uses the exact pretest ratio given, as someone may want to set their own for a specific SNFS number(s). Certainly there should be a reduction for whatever the default plan is.

bsquared 2021-06-01 17:54

[QUOTE=charybdis;579693]Ah, this must be it - the default yafu.ini has plan=deep. I think this is rather confusing, as I can't see anything in the documentation saying that I need to change this to plan=normal in order for the ECM effort to be reduced for SNFS numbers.

[/QUOTE]

You are correct, it is undocumented :redface:

[QUOTE=charybdis;579693]
However the different plans behave in this situation, it ought to be clearly documented. Personally I'd have it so that each of the standard plans reduces the effort for SNFS, but plan=custom still uses the exact pretest ratio given, as someone may want to set their own for a specific SNFS number(s). Certainly there should be a reduction for whatever the default plan is.[/QUOTE]

I like that idea.

kruoli 2021-06-02 13:30

[QUOTE=kruoli;577152]...[/QUOTE]

The current AVX2 build is not working on my AMD Ryzen 3800X. I guess it is likely the same problem as with the Threadripper. The non-AVX version works fine. I have not tested the current version on my Threadripper yet. I have not tested the old version on the 3800X. Would some of that help?

Instruction set of this CPU:
[CODE]For InfoType 0
CPUInfo[0] = 0xd
CPUInfo[1] = 0x68747541
CPUInfo[2] = 0x444d4163
CPUInfo[3] = 0x69746e65

For InfoType 1
CPUInfo[0] = 0x870f10
CPUInfo[1] = 0x8100800
CPUInfo[2] = 0xfed83203
CPUInfo[3] = 0x178bfbff

For InfoType 2
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 3
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 4
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 5
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 6
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x1
CPUInfo[3] = 0x0

For InfoType 7
CPUInfo[0] = 0x0
CPUInfo[1] = 0x219c91a9
CPUInfo[2] = 0x400004
CPUInfo[3] = 0x0

For InfoType 8
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 9
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 10
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 11
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 12
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 13
CPUInfo[0] = 0x7
CPUInfo[1] = 0x340
CPUInfo[2] = 0x340
CPUInfo[3] = 0x0

For InfoType 80000000
CPUInfo[0] = 0x8000001e
CPUInfo[1] = 0x68747541
CPUInfo[2] = 0x444d4163
CPUInfo[3] = 0x69746e65

For InfoType 80000001
CPUInfo[0] = 0x870f10
CPUInfo[1] = 0x20000000
CPUInfo[2] = 0x4023f3
CPUInfo[3] = 0x2fd3fbff

For InfoType 80000002
CPUInfo[0] = 0x20444d41
CPUInfo[1] = 0x657a7952
CPUInfo[2] = 0x2037206e
CPUInfo[3] = 0x30303833

For InfoType 80000003
CPUInfo[0] = 0x2d382058
CPUInfo[1] = 0x65726f43
CPUInfo[2] = 0x6f725020
CPUInfo[3] = 0x73736563

For InfoType 80000004
CPUInfo[0] = 0x2020726f
CPUInfo[1] = 0x20202020
CPUInfo[2] = 0x20202020
CPUInfo[3] = 0x202020

For InfoType 80000005
CPUInfo[0] = 0xff40ff40
CPUInfo[1] = 0xff40ff40
CPUInfo[2] = 0x20080140
CPUInfo[3] = 0x20080140

For InfoType 80000006
CPUInfo[0] = 0x48006400
CPUInfo[1] = 0x68006400
CPUInfo[2] = 0x2006140
CPUInfo[3] = 0x1009140

For InfoType 80000007
CPUInfo[0] = 0x0
CPUInfo[1] = 0x1b
CPUInfo[2] = 0x0
CPUInfo[3] = 0x789

For InfoType 80000008
CPUInfo[0] = 0x3030
CPUInfo[1] = 0x2009005
CPUInfo[2] = 0x700f
CPUInfo[3] = 0x0

For InfoType 80000009
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000000a
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000000b
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000000c
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000000d
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000000e
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000000f
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000010
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000011
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000012
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000013
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000014
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000015
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000016
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000017
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000018
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 80000019
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000001a
CPUInfo[0] = 0x2
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000001b
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000001c
CPUInfo[0] = 0x0
CPUInfo[1] = 0x0
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0

For InfoType 8000001d
CPUInfo[0] = 0x4121
CPUInfo[1] = 0x1c0003f
CPUInfo[2] = 0x3f
CPUInfo[3] = 0x0

For InfoType 8000001e
CPUInfo[0] = 0x0
CPUInfo[1] = 0x100
CPUInfo[2] = 0x0
CPUInfo[3] = 0x0


CPU String: AuthenticAMD
Model = 1
Family = 15
Extended model = 7
Extended family = 8
CLFLUSH cache line size = 64
Logical Processor Count = 16
APIC Physical ID = 8

The following features are supported:
SSE3
Supplemental Streaming SIMD Extensions 3
L1 Context ID
CMPXCHG16B Instruction
SSE4.1 Extensions
SSE4.2 Extensions
AVX Extensions
PPOPCNT Instruction
x87 FPU On Chip
Virtual-8086 Mode Enhancement
Debugging Extensions
Page Size Extensions
Time Stamp Counter
RDMSR and WRMSR Support
Physical Address Extensions
Machine Check Exception
CMPXCHG8B Instruction
APIC On Chip
SYSENTER and SYSEXIT
Memory Type Range Registers
PTE Global Bit
Machine Check Architecture
Conditional Move/Compare Instruction
Page Attribute Table
36-bit Page Size Extension
CFLUSH Extension
MMX Technology
FXSAVE/FXRSTOR
SSE Extensions
SSE2 Extensions
Multithreading Technology
LAHF/SAHF in 64-bit mode
Core multi-processing legacy mode
AltMovCr8
LZCNT instruction
SSE4A (EXTRQ, INSERTQ, MOVNTSD, MOVNTSS)
Misaligned SSE mode
PREFETCH and PREFETCHW Instructions
SYSCALL/SYSRET in 64-bit mode
Execute Disable Bit
1GB page support
RDTSCP instruction
64 bit Technology
MOVU Optimization

CPU Brand String: AMD Ryzen 7 3800X 8-Core Processor
Cache Line Size = 64
L2 Associativity = 6
Cache Size = 512K
EAX=7 CPUID feature bits:
EAX=00000000
EBX=219c91a9
ECX=00400004
EDX=00000000


AVX2 Extensions


BMI2 Extensions


YAFU Version 2.03
Built with Microsoft Visual Studio 1928
Using GMP-ECM 7.0.4, Powered by MPIR 3.0.0
Detected AMD Ryzen 7 3800X 8-Core Processor
Detected L1 = 32768 bytes, L2 = 33554432 bytes, CL = 64 bytes
Using 1 random witness for Rabin-Miller PRP checks
Cached 664579 primes; max prime is 9999991[/CODE]

Edit: There is no error message. Instead of the command prompt, yafu simply exits without writing anything to screen. If I remove the settings file, yafu informs me about that file missing, but is still exiting right after that.

bsquared 2021-06-02 13:47

[QUOTE=kruoli;579776]The current AVX2 build is not working on my AMD Ryzen 3800X. I guess it is likely the same problem as with the Threadripper. The non-AVX version works fine. I have not tested the current version on my Threadripper yet. I have not tested the old version on the 3800X. Would some of that help?
[/QUOTE]

Apologies, I will come back to look at this... had forgotten about it.

From your description of the problem I would guess that there is an illegal instruction somewhere in the sieve of Eratosthenes code, since that is one of the first things that runs. It should be only using AVX2 and BMI2, both of which the cpu supports. If you were on linux I would ask you to run under a debugger, but obviously can't do that here. I'll look closer and let you know if there is something else to try.

kruoli 2021-06-02 13:52

Thanks. :smile:

[QUOTE=bsquared;579780]If you were on linux I would ask you to run under a debugger, but obviously can't do that here.[/QUOTE]

Maybe running it in WSL2 would work? I have not yet compiled it there but maybe that would be a possibility. Otherwise, my 5950X has a Linux installed on it, currently. But I have not tested any YAFU executable on it yet.

richs 2021-06-08 04:12

When doing poly select, Yafu displays the following for all threads:

[CODE]**** finished poly work in thread 3
nfs: best score is currently 0.000e+00[/CODE]

The best score is always listed as 0.000 after each thread completes. Just noting this behavior since Yafu finds the highest score at the final conclusion of poly select.

bsquared 2021-06-08 13:39

[QUOTE=kruoli;579782]Thanks. :smile:



Maybe running it in WSL2 would work? I have not yet compiled it there but maybe that would be a possibility. Otherwise, my 5950X has a Linux installed on it, currently. But I have not tested any YAFU executable on it yet.[/QUOTE]

WSL2 would work, yes. I'm a huge fan of WSL. It can be a bit of a chore getting all of the build tools and building everything but it can be done.

I use Ubuntu on WSL2. For that distro to get a good build environment I believe it's:
sudo apt update
sudo apt upgrade
sudo apt install build-essential



[QUOTE=richs;580304]When doing poly select, Yafu displays the following for all threads:

[CODE]**** finished poly work in thread 3
nfs: best score is currently 0.000e+00[/CODE]

The best score is always listed as 0.000 after each thread completes. Just noting this behavior since Yafu finds the highest score at the final conclusion of poly select.[/QUOTE]

I've seen that also, yes. But as you said it seems to find the correct poly in the end so I think it's Mostly Harmless. Still, it's on the list to track down someday.


All times are UTC. The time now is 22:28.

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