mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2023-01-23, 18:05   #23
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

101001111112 Posts
Default

Unfortunately, neither YAFU not GMP-ECM has inter-stage progress reporting. But beside lengthy P-1 runs, this is barely needed.

And yes, this is a multi-day effort, but this should not be a surprise if you recall how much ECM needs to be done, additionally.
kruoli is online now   Reply With Quote
Old 2023-01-24, 20:48   #24
Tyler Busby
 
Tyler Busby's Avatar
 
Jan 2023

2510 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
For p-1 stage 1 do something like
Code:
ecm -save pm1_save.txt -v -pm1 1000000 1 <input.txt
That tells ecm to run stage 1 with B1 1000000 and B2 1 (ie don't do stage 2 because B2 <= B1) against whatever number is in input.txt.

Then
Code:
ecm -resume pm1_save.txt -v -pm1 10000000 10000000-1e9 &
ecm -resume pm1_save.txt -v -pm1 10000000 1e9-2e9 &
That runs two threads to do stage 2, each over a range of 1e9. You can split them over more than 1 system by copying the save file to all the systems.

Change 10000000 to whatever B1 you want to use in *all* the above code. Or stage 2 will get confused.

And adjust B2 ranges to suit available memory on each system. Look up the maxmem parameter as well.
Seems like there is an assertion that doesn't like this. After running a large (but not B1=1e12) P-1 test, it seems it cancels out before stage 1 completes.

Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 1 < fib1801.txt
GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [P-1]
Input number is 10895698772851801631427021406438425189751366510941542322578646382019072795121093722703724280239777032739227656218393712820414789732296637546673522102683861477159788715056432686413559864339148935849000824792389951156982879378723635424946395688038035557306484470174330998312225243154735081495240180520574310352932024140384561828278851568905987902116485927546851422937774936538801 (377 digits)
Using mpz_mod
Using lmax = 0 with NTT which takes about 0MB of memory
Using B1=100000000000, B2=0, polynomial x^1, x0=2040217917
P = 26804968, l = 0, s_1 = 0, k = s_2 = 26835552, m_1 = 0
Probability of finding a factor of n digits:
20      25      30      35      40      45      50      55      60      65
0.44    0.22    0.097   0.038   0.014   0.0047  0.0015  0.00043 0.00012 3.2e-005
Step 1 took 29346031ms
x=3476101875119668249655013125702678614074694708895437040187302707998307173315990035521674753420946247679246460392779848021400648980141262275782863909080617104765079218569214211582648700472270372746112137228351594731971522947221794697182702894113879675867928478991281639828871499038166886049987070598022558971980425670508593185472689941598797936254142245943818623549400294596587
Assertion failed!

Program: C:\Users\Tyler\Downloads\gmp-ecm\bin\x64\Release\ecm.exe
File: pm1fs2.c, Line 2906

Expression: __ecm_eulerphi (params->P) == params->s_1 * params->s_2
And fib1801_pm1_save.txt is empty. I suppose I will try this now:
Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 < fib1801.txt
Glad I didn't try the 6.5 day run first
Tyler Busby is offline   Reply With Quote
Old 2023-01-25, 15:11   #25
Tyler Busby
 
Tyler Busby's Avatar
 
Jan 2023

52 Posts
Default

This also ended up with a blank save file... not sure what's going wrong.

Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 < fib1801.txt
GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [P-1]
Input number is 10895698772851801631427021406438425189751366510941542322578646382019072795121093722703724280239777032739227656218393712820414789732296637546673522102683861477159788715056432686413559864339148935849000824792389951156982879378723635424946395688038035557306484470174330998312225243154735081495240180520574310352932024140384561828278851568905987902116485927546851422937774936538801 (377 digits)
Using mpz_mod
Using lmax = 536870912 with NTT which takes about 270336MB of memory
Using B1=100000000000, B2=763398732806919196, polynomial x^1, x0=1256424407
P = 1052416365, l = 536870912, s_1 = 174182400, k = s_2 = 2, m_1 = 43
Probability of finding a factor of n digits:
20      25      30      35      40      45      50      55      60      65
0.93    0.69    0.44    0.24    0.11    0.048   0.019   0.0067  0.0022  0.00069
Step 1 took 15332203ms
x=2754861385661253572259076173465636093153757340672185248395259220900974098736589460794950052473327331695189412367368412708155269758834665131906442605963871510051613816873830499145457764620951507928891627421820652314484426028396863521224365322036977681146333079000364809246157733919678105047342387535635298609354742231133049365828423178046769383282662475567551075530526077700577
Computing F from factored S_1 took 906750ms
Computing h took 46031ms
Computing DCT-I of h
Tyler Busby is offline   Reply With Quote
Old 2023-01-25, 16:52   #26
chris2be8
 
chris2be8's Avatar
 
Sep 2009

22·607 Posts
Default

I can't help, I use ecm (on Linux) but don't know how it works internally.

Unless someone jumps in try contacting the authors. See the bottom of INSTALL.ecm.

Also read the README and TODO files shipped with ecm.
chris2be8 is offline   Reply With Quote
Old 2023-01-25, 17:25   #27
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

24·281 Posts
Default

Quote:
Originally Posted by Tyler Busby View Post
This also ended up with a blank save file... not sure what's going wrong.

Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 < fib1801.txt
Why double -v?
paulunderwood is offline   Reply With Quote
Old 2023-01-25, 17:35   #28
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

134310 Posts
Default

Extra verbosity for a higher chance to find a solution to the problem. It is more verbose than -v.
kruoli is online now   Reply With Quote
Old 2023-01-25, 17:43   #29
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

119016 Posts
Default

Quote:
Originally Posted by Tyler Busby View Post

And fib1801_pm1_save.txt is empty. I suppose I will try this now:
Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 < fib1801.txt
Glad I didn't try the 6.5 day run first
That might work because:

Code:
SYNOPSIS
       ecm [options] B1 [B2min-B2max | B2]
Putting "1" as B2 might cause the error you experienced.
paulunderwood is offline   Reply With Quote
Old 2023-01-25, 19:28   #30
WraithX
 
WraithX's Avatar
 
Mar 2006

2×3×89 Posts
Default

Quote:
Originally Posted by Tyler Busby View Post
Seems like there is an assertion that doesn't like this. After running a large (but not B1=1e12) P-1 test, it seems it cancels out before stage 1 completes.

Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 1 < fib1801.txt
GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [P-1]
Input number is 10895698772851801631427021406438425189751366510941542322578646382019072795121093722703724280239777032739227656218393712820414789732296637546673522102683861477159788715056432686413559864339148935849000824792389951156982879378723635424946395688038035557306484470174330998312225243154735081495240180520574310352932024140384561828278851568905987902116485927546851422937774936538801 (377 digits)
Using mpz_mod
Using lmax = 0 with NTT which takes about 0MB of memory
Using B1=100000000000, B2=0, polynomial x^1, x0=2040217917
P = 26804968, l = 0, s_1 = 0, k = s_2 = 26835552, m_1 = 0
Probability of finding a factor of n digits:
20      25      30      35      40      45      50      55      60      65
0.44    0.22    0.097   0.038   0.014   0.0047  0.0015  0.00043 0.00012 3.2e-005
Step 1 took 29346031ms
x=3476101875119668249655013125702678614074694708895437040187302707998307173315990035521674753420946247679246460392779848021400648980141262275782863909080617104765079218569214211582648700472270372746112137228351594731971522947221794697182702894113879675867928478991281639828871499038166886049987070598022558971980425670508593185472689941598797936254142245943818623549400294596587
Assertion failed!

Program: C:\Users\Tyler\Downloads\gmp-ecm\bin\x64\Release\ecm.exe
File: pm1fs2.c, Line 2906

Expression: __ecm_eulerphi (params->P) == params->s_1 * params->s_2
And fib1801_pm1_save.txt is empty. I suppose I will try this now:
Code:
ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 < fib1801.txt
Glad I didn't try the 6.5 day run first
There may either be an issue with the executable you have, or there may be a patch to GMP-ECM that is not in your binary. When I ran your command, with a gmp-ecm executable I compiled myself (on Windows) of the latest version from git, it completes successfully. Here is my output:
Code:
D:\gmp-ecm>ecm -save fib1801_pm1_save.txt -v -v -pm1 100000000000 1 < fib1801.txt
GMP-ECM 7.0.6-dev [configured with GMP 6.2.1, --enable-asm-redc, --enable-assert] [P-1]
Tuned for x86_64/k8/params.h
Input number is 1089569877285180163142702140643842518975136651094154232257864638
20190727951210937227037242802397770327392276562183937128204147897322966375466735
22102683861477159788715056432686413559864339148935849000824792389951156982879378
72363542494639568803803555730648447017433099831222524315473508149524018052057431
0352932024140384561828278851568905987902116485927546851422937774936538801 (377 d
igits)
Using mpz_mod
Using lmax = 0 with NTT which takes about 0MB of memory
Using B1=100000000000, B2=1, polynomial x^1, x0=3251100022
Probability of finding a factor of n digits (assuming one exists):
20      25      30      35      40      45      50      55      60      65
0.44    0.22    0.097   0.038   0.014   0.0047  0.0015  0.00043 0.00012 3.2e-005

Step 1 took 78155752ms
x=155285938052281359457010604164760948902045998468862655046272050222864510288367
43242882615269486560094962507466394677092255933360196986469400748148084615015554
96090494274540255724330009513518714527616151183564139320332413944210287498789974
11173029034186909735734503805155708578319533522132114475994965279117420756908270
1713686141971888040833787589641289747959136356878512566573
Peak memory usage: 10MB
And I have attached the save file. Feel free to use it as I do not plan to do any more work on this. I was really just testing to see if GMP-ECM had a problem.

I'm not sure what the issue is with your gmp-ecm executable, but you may want to compile your own from the latest source, or download a different exe that someone else has compiled.

P.S. Using B2 = 1 is fine, this is the recommended way to complete X amount of B1 work and save it for later. If you don't specify B2 then gmp-ecm assumes you want to do a full run of work and will choose its own B2 value.
Attached Files
File Type: txt fib1801_pm1_save.txt (850 Bytes, 5 views)

Last fiddled with by WraithX on 2023-01-25 at 19:32
WraithX is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling YAFU for Windows using mingw bsquared YAFU 87 2022-11-21 22:31
Compiling YAFU with ICX kruoli YAFU 8 2022-10-16 23:02
Guide to compiling YAFU Mr. Odd YAFU 4 2017-04-24 15:40
Compiling YAFU under MinGW wombatman YAFU 10 2016-01-21 19:48
Need help compiling YAFU from SVN. Stargate38 YAFU 14 2016-01-20 21:46

All times are UTC. The time now is 13:51.


Wed Feb 8 13:51:49 UTC 2023 up 174 days, 11:20, 1 user, load averages: 1.13, 0.89, 0.86

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.

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