mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2021-06-01, 14:01   #122
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

DFB16 Posts
Default

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.
bsquared is offline   Reply With Quote
Old 2021-06-01, 14:07   #123
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

24·257 Posts
Default

Excellent!

Thanks for all the work!
EdH is offline   Reply With Quote
Old 2021-06-01, 16:30   #124
charybdis
 
charybdis's Avatar
 
Apr 2020

547 Posts
Default

Quote:
Originally Posted by bsquared View Post
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.
Thank you!

Quote:
Originally Posted by charybdis View Post
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.
Any chance you'll fix this soon? Or is it a feature rather than a bug?
charybdis is offline   Reply With Quote
Old 2021-06-01, 16:49   #125
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·1,193 Posts
Default

Quote:
Originally Posted by charybdis View Post
Thank you!



Any chance you'll fix this soon? Or is it a feature rather than a bug?
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
Note I had to put -plan normal in the command line, as I usually run -plan deep (with AVXECM).

Last fiddled with by bsquared on 2021-06-01 at 16:56
bsquared is offline   Reply With Quote
Old 2021-06-01, 17:50   #126
charybdis
 
charybdis's Avatar
 
Apr 2020

547 Posts
Default

Quote:
Originally Posted by bsquared View Post
Note I had to put -plan normal in the command line, as I usually run -plan deep (with AVXECM).
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.
charybdis is offline   Reply With Quote
Old 2021-06-01, 17:54   #127
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

1101111110112 Posts
Default

Quote:
Originally Posted by charybdis View Post
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.
You are correct, it is undocumented

Quote:
Originally Posted by charybdis View Post
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.
I like that idea.
bsquared is offline   Reply With Quote
Old 2021-06-02, 13:30   #128
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

28·3 Posts
Default

Quote:
Originally Posted by kruoli View Post
...
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
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.

Last fiddled with by kruoli on 2021-06-02 at 13:31 Reason: Additional information.
kruoli is online now   Reply With Quote
Old 2021-06-02, 13:47   #129
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,193 Posts
Default

Quote:
Originally Posted by kruoli View Post
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?
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.
bsquared is offline   Reply With Quote
Old 2021-06-02, 13:52   #130
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

11000000002 Posts
Default

Thanks.

Quote:
Originally Posted by bsquared View Post
If you were on linux I would ask you to run under a debugger, but obviously can't do that here.
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.
kruoli is online now   Reply With Quote
Old 2021-06-08, 04:12   #131
richs
 
richs's Avatar
 
"Rich"
Aug 2002
Benicia, California

23·173 Posts
Default

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
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.
richs is offline   Reply With Quote
Old 2021-06-08, 13:39   #132
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,193 Posts
Default

Quote:
Originally Posted by kruoli View Post
Thanks.



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.
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:
Originally Posted by richs View Post
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
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.
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.
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 21:32.


Sun Dec 5 21:32:27 UTC 2021 up 135 days, 16:01, 0 users, load averages: 1.20, 1.45, 1.47

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.