mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2023-02-12, 23:26   #111
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

102178 Posts
Default

I tried building YAFU under WSL2/Ubuntu22.04 in Win11 on my Ryzen 7950X using EdH's instructions.

make yafu NFS=1 USE_SSE41=1 USE_AVX2=1 USE_BMI2=1 ICELAKE=1
make: *** [Makefile:399: factor/gmp-ecm/tinyecm.o] Error 1

make yafu NFS=1 USE_SSE41=1 USE_AVX2=1 USE_BMI2=1 SKYLAKE=1
success

lscpu tells me (bold is all AVX-512, green is the ones mentioned further below):
Quote:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzeroxsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm
Quote:
Originally Posted by README
SKYLAKEX will add support for AVX512F and AVX512BW.
ICELAKE will add support for AVX512F, AVX512BW, and AVX512IFMA.
To me it looks like I have AVX512IFMA? Should I be make'ing YAFU with different flags?

Last fiddled with by James Heinrich on 2023-02-13 at 00:47
James Heinrich is offline   Reply With Quote
Old 2023-02-13, 00:47   #112
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

33×157 Posts
Default

But the AVX512 issue aside, the Linux build I now have seems perfectly happy to through the -batchfile list of assignments, no crashing on P-1 like the Windows binary does.

Case #1:
edit: Well, it worked nicely for the first 236 inputs, then started spamming the screen with this kind of thing in infinite loop (for about 35 minutes before I noticed it):
Code:
**** finished poly work in thread 6
nfs: thread 15 commencing polynomial search over range: 57829442 - 57829692
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 15
nfs: thread 4 commencing polynomial search over range: 57829692 - 57829942
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 4
nfs: thread 1 commencing polynomial search over range: 57829942 - 57830192
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 1
nfs: thread 10 commencing polynomial search over range: 57830192 - 57830442
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 10
^Z
[1]+  Stopped
Seemed to get stuck (including on restart) on 4883304788759377425832442960351366921415998012385829279000071261453377754486259


Case #2:
Stuck on 6064229034709002472262972268188545203995543889159050770751775303656682657114151
or 7037143403475036214202972850064341177702412654627932222322186191725165912592743
Code:
...
total yield: 35448, q=530017 (0.00037 sec/rel)
nfs: commencing msieve filtering
6064229034709002472262972268188545203995543889159050770751775303656682657114151
checking relations array at location 1
checking relations array at location 1
checking relations array at location 1
checking relations array at location 1
error: number of relsets too large

Last fiddled with by James Heinrich on 2023-02-13 at 01:31
James Heinrich is offline   Reply With Quote
Old 2023-02-13, 13:36   #113
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

22·941 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
But the AVX512 issue aside, the Linux build I now have seems perfectly happy to through the -batchfile list of assignments, no crashing on P-1 like the Windows binary does.

Case #1:
edit: Well, it worked nicely for the first 236 inputs, then started spamming the screen with this kind of thing in infinite loop (for about 35 minutes before I noticed it):
Code:
**** finished poly work in thread 6
nfs: thread 15 commencing polynomial search over range: 57829442 - 57829692
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 15
nfs: thread 4 commencing polynomial search over range: 57829692 - 57829942
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 4
nfs: thread 1 commencing polynomial search over range: 57829942 - 57830192
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 1
nfs: thread 10 commencing polynomial search over range: 57830192 - 57830442
deadline: 8640000 CPU-seconds per coefficient
error generating or reading NFS polynomials
**** finished poly work in thread 10
^Z
[1]+  Stopped
Seemed to get stuck (including on restart) on 4883304788759377425832442960351366921415998012385829279000071261453377754486259


Case #2:
Stuck on 6064229034709002472262972268188545203995543889159050770751775303656682657114151
or 7037143403475036214202972850064341177702412654627932222322186191725165912592743
Code:
...
total yield: 35448, q=530017 (0.00037 sec/rel)
nfs: commencing msieve filtering
6064229034709002472262972268188545203995543889159050770751775303656682657114151
checking relations array at location 1
checking relations array at location 1
checking relations array at location 1
checking relations array at location 1
error: number of relsets too large
Thank you for those. At first I was wondering why in the world it is running nfs on C79's but then realized YAFU detects they are cofactors of SNFS forms: 10^92 + 584669, 10^94 - 169754, and 10^92 + 650179 respectively.

Some numbers in that range may be competitive with SIQS, but definitely not these. I would raise snfs_xover in yafu.ini to something like 95 or 100 to avoid this problem.

That said, both the 2nd and 3rd of your example finish fine for me with snfs, just 4 times slower than siqs would have finished. The first example does go into an infinite loop because it detects the SNFS form, then decides that gnfs would actually be better, but there are no good preconfigured parameters for poly selection on a gnfs 79. So it never finds one. It does not occur to the nfs poly selection routine to consider siqs instead of gnfs... that is something I can fix. I don't think it is worth figuring out gnfs parameters for less than c85.

Continue building with SKYLAKEX on the Zen 4 machine. IFMA as of now only helps with AVX-ECM, but there is something wrong with the IFMA code there; it is not finding factors that it should be finding. So until I can fix that don't use the ICELAKE build option. Edit: Also make sure you are using SKYLAKEX, not just SKYLAKE. It will just ignore the latter. I guess I should teach the makefile to accept either one.

Thanks again for all of the use/testing!

Last fiddled with by bsquared on 2023-02-13 at 13:47
bsquared is offline   Reply With Quote
Old 2023-02-13, 14:33   #114
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

33×227 Posts
Default

Quote:
Originally Posted by bsquared View Post
Edit: Also make sure you are using SKYLAKEX, not just SKYLAKE. It will just ignore the latter. I guess I should teach the makefile to accept either one.
That's just going to confuse people with actual skylake cpus.
henryzz is offline   Reply With Quote
Old 2023-02-13, 16:15   #115
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

22·941 Posts
Default

Quote:
Originally Posted by henryzz View Post
That's just going to confuse people with actual skylake cpus.
You're right. Of course James doesn't have either one, he has a Zen 4. When I first starting writing AVX-512 code, skylakex was what I was using. I was lazy and just tied use of AVX-512 instructions to that processor architecture, not thinking that it may eventually be available in other architectures or even cpu brands. So, SKYLAKEX is really a codeword for "use AVX-512F and BW instruction sets". Just remember to put the X on there.
bsquared is offline   Reply With Quote
Old 2023-02-13, 16:18   #116
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

33×157 Posts
Default

Quote:
Originally Posted by bsquared View Post
I would raise snfs_xover in yafu.ini to something like 95 or 100 to avoid this problem.
Default yafu.ini:70 has % snfs_xover=85 (commented-out), I don't know what the fallback default is. I have now set it to 95.

Quote:
Originally Posted by bsquared View Post
Also make sure you are using SKYLAKEX, not just SKYLAKE. It will just ignore the latter. I guess I should teach the makefile to accept either one.
I totally missed the X
I rebuilt it with SKYLAKEX and it seemed to work. It finished the last hundred assignments without complain anyways.

Is there some way to see what features YAFU is built with? Maybe a line in the header would be interesting:
Quote:
YAFU Version 2.10
Built with GCC 11
Built with CPU features: SSE4.1 AVX2 AVX512
Using GMP-ECM 7.0.6-dev, Powered by GMP 6.2.1
Detected AMD Ryzen 9 7950X 16-Core Processor
James Heinrich is offline   Reply With Quote
Old 2023-02-13, 16:21   #117
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

137618 Posts
Default

Quote:
Originally Posted by bsquared View Post
You're right. Of course James doesn't have either one, he has a Zen 4. When I first starting writing AVX-512 code, skylakex was what I was using. I was lazy and just tied use of AVX-512 instructions to that processor architecture, not thinking that it may eventually be available in other architectures or even cpu brands. So, SKYLAKEX is really a codeword for "use AVX-512F and BW instruction sets". Just remember to put the X on there.
Maybe basing on cpu features would make more sense?
henryzz is offline   Reply With Quote
Old 2023-02-13, 16:21   #118
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

33×157 Posts
Default

I was mildly amused by this:
Quote:
===============================================================
======= Welcome to YAFU (Yet Another Factoring Utility) =======
======= bbuhrow@gmail.com =======
======= Type help at any time, or quit to quit =======
===============================================================

>> help
searching for help on 'help'
>>
Not particularly helpful help.
James Heinrich is offline   Reply With Quote
Old 2023-02-13, 16:31   #119
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

22·941 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
Default yafu.ini:70 has % snfs_xover=85 (commented-out), I don't know what the fallback default is. I have now set it to 95.

I totally missed the X
I rebuilt it with SKYLAKEX and it seemed to work. It finished the last hundred assignments without complain anyways.

Is there some way to see what features YAFU is built with? Maybe a line in the header would be interesting:
The built-in default was 75. I'll change that to 95 (same as gnfs/siqs crossover).

Quote:
Originally Posted by henryzz View Post
Maybe basing on cpu features would make more sense?
Yes it would.

Quote:
Originally Posted by James Heinrich View Post
I was mildly amused by this:Not particularly helpful help.


It is supposed to print the relevant portion of the help document. The help document is not up to date anyway, something else that needs work. Lately I have been trying to keep the .ini file up to date with what the various options do.
bsquared is offline   Reply With Quote
Old 2023-02-13, 16:35   #120
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

72648 Posts
Default

Quote:
Originally Posted by bsquared View Post
Lately I have been trying to keep the .ini file up to date with what the various options do.
An unfortunate side effect of this is that when I add an option and update the repository yafu.ini, then a user's yafu.ini file (maybe full of custom things) gets overwritten when they update versions. Or is there a merge feature when fetching/pulling from github? I'm still a relative noob with git/github.
bsquared is offline   Reply With Quote
Old 2023-02-13, 22:30   #121
BudgieJane
 
BudgieJane's Avatar
 
"Jane Sullivan"
Jan 2011
Beckenham, UK

15116 Posts
Default

Quote:
Originally Posted by bsquared View Post
An unfortunate side effect of this is that when I add an option and update the repository yafu.ini, then a user's yafu.ini file (maybe full of custom things) gets overwritten when they update versions. Or is there a merge feature when fetching/pulling from github? I'm still a relative noob with git/github.
You are implying that users don't back up their files when they update versions. I find that hard to believe. In my case, if I have made changes in yafu.ini, I will always compare my changed version with what I have just downloaded, and make any necessary changes to that one (after backing that up, too.)
BudgieJane is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How I install YAFU version 2 onto my Ubuntu Machines EdH EdH 7 2023-03-14 15:06
yafu ignoring yafu.ini chris2be8 YAFU 9 2022-02-17 17:52
YAFU Version Differences nivek000 YAFU 2 2021-12-21 16:21
Running YAFU via Aliqueit doesn't find yafu.ini EdH YAFU 8 2018-03-14 17:22
YAFU version 1.31 bsquared YAFU 26 2012-04-23 03:16

All times are UTC. The time now is 04:02.


Sun Jun 4 04:02:40 UTC 2023 up 290 days, 1:31, 0 users, load averages: 1.60, 1.25, 1.02

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔