mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2022-09-24, 17:00   #45
kotenok2000
 
Mar 2018

2×52 Posts
Default

Try to change
Code:
% crossover to use the external ECM executable over the internally linked
% ECM (or avx-ecm)
ext_ecm=1000000000
to
Code:
% crossover to use the external ECM executable over the internally linked
% ECM (or avx-ecm)
ext_ecm=10000
And uncomment prefer_gmpecm
in yafu.ini

Last fiddled with by kotenok2000 on 2022-09-24 at 17:31
kotenok2000 is offline   Reply With Quote
Old 2022-09-24, 20:08   #46
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

F5F16 Posts
Default

I spent the last 2 hours trying to track down an off-by-one error in my own code, only to find there's a bug in YAFU v2.10 (and probably other versions) handling of batchfile inputs.

bug: YAFU ignores the last line in a batchfile input file if the last line doesn't have a linebreak at the end. What makes this bad is that it not only doesn't do the last assignment, but it thinks it's done everything and erases the batchfile input file, deleting the last assignment line:
eof; done processing batchfile

Adding a linebreak after the last assignment fixes the problem for now, but this is unexpected behavior.
James Heinrich is offline   Reply With Quote
Old 2022-09-24, 23:43   #47
slandrum
 
Jan 2021
California

23×61 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
I spent the last 2 hours trying to track down an off-by-one error in my own code, only to find there's a bug in YAFU v2.10 (and probably other versions) handling of batchfile inputs.

bug: YAFU ignores the last line in a batchfile input file if the last line doesn't have a linebreak at the end. What makes this bad is that it not only doesn't do the last assignment, but it thinks it's done everything and erases the batchfile input file, deleting the last assignment line:
eof; done processing batchfile

Adding a linebreak after the last assignment fixes the problem for now, but this is unexpected behavior.
While this is unexpected behavior, it's not uncommon behavior. I've run across many programs that require a line break at the end of the last line of an input file to function properly.

It's happened to me often enough that it makes me uncomfortable whenever I see the last line in a text file not terminated by a line break.

Last fiddled with by slandrum on 2022-09-24 at 23:46
slandrum is offline   Reply With Quote
Old 2022-09-25, 11:39   #48
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

101000000001102 Posts
Default

Quote:
Originally Posted by slandrum View Post
it makes me uncomfortable whenever I see the last line in a text file not terminated by a line break.
same here
LaurV is offline   Reply With Quote
Old 2022-09-25, 11:49   #49
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

23238 Posts
Default

It's definitely not "not uncommon" to simply delete whatever is on the last line only because it does not have a line feed at the end. Usually, the file then is handled as being empty and the last line will stay there.

To chime in, I feel uncomfortable whenever I see files that end in a new line, why should it be there? It is literally wasted space. So I am thankful e.g. vim does not show it by default.

If programs would handle files without a line break at the end normally, this would not cause problems for those that like to have the newline in the end. The opposite is not true, though.
kruoli is offline   Reply With Quote
Old 2022-09-25, 17:42   #50
BudgieJane
 
BudgieJane's Avatar
 
"Jane Sullivan"
Jan 2011
Beckenham, UK

11×29 Posts
Default

Quote:
Originally Posted by kruoli View Post
It's definitely not "not uncommon" to simply delete whatever is on the last line only because it does not have a line feed at the end. Usually, the file then is handled as being empty and the last line will stay there.

To chime in, I feel uncomfortable whenever I see files that end in a new line, why should it be there? It is literally wasted space. So I am thankful e.g. vim does not show it by default.

If programs would handle files without a line break at the end normally, this would not cause problems for those that like to have the newline in the end. The opposite is not true, though.
I think the purpose of that line feed on the last line is to signify that the last line is complete and nothing is missing.
BudgieJane is offline   Reply With Quote
Old 2022-09-25, 17:57   #51
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

5×787 Posts
Default

If YAFU would process lines with \n as assignments, but leave anything in the file that it doesn't understand I wouldn't have a problem with it, it's the silent ignore-and-delete that bothers me.
James Heinrich is offline   Reply With Quote
Old 2022-09-25, 18:03   #52
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

5×13×19 Posts
Default

Quote:
Originally Posted by bsquared View Post
No, that's not right. Thanks, I'll take a look.
This happens to my Ivy Bridgy, too, even with the most recent tune fix.
kruoli is offline   Reply With Quote
Old 2022-09-26, 02:19   #53
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×17×73 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
If YAFU would process lines with \n as assignments, but leave anything in the file that it doesn't understand I wouldn't have a problem with it, it's the silent ignore-and-delete that bothers me.
When there is no final newline then feof() returns true regardless of if the previous fgets() read anything or not. So there has to be an extra check if the fgets() has meaningful data in it in addition to the feof(). That's why having a final newline is always the recommended practice.

Anyway, I added the additional check and it should work now. Hopefully the -gc and normal builds continue to work on the various systems.

The very slow siqs issue for the -gc build should now be fixed. At some point I will have to re-visit siqs performance when built with MSVC to see if anything can be improved... C90 siqs factorizations are twice as fast when using WSL!

The issue with threads=1 when using gpu-ecm I attempted to fix but didn't test; hopefully it is better

As always, thanks for the testing and reports!
bsquared is offline   Reply With Quote
Old 2022-09-26, 03:26   #54
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

5·787 Posts
Default

Quote:
Originally Posted by bsquared View Post
The very slow siqs issue for the -gc build should now be fixed.
tune completes for me in a reasonable time now on my i7-3930K:
tune_info= Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz,WIN64,1.66327e-05,0.199702,14.3661,0.0722507,107.249,42

And thanks for the \n fix.
James Heinrich is offline   Reply With Quote
Old 2022-09-26, 09:58   #55
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

123510 Posts
Default

In the "normal" (non-gc) version, it hangs when doing LA:
Code:
nfs: commencing msieve linear algebra
line 225 - Failed to obtain a task from the jobs queue.
line 274 - Warning an error has occurred when trying to obtain a worker task.
line 275 - The worker thread has exited.
This is outputted multiple times. PC is Windows 10, Zen 2.

Is it using the improved msieve by Greg Childers?
kruoli is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
yafu ignoring yafu.ini chris2be8 YAFU 9 2022-02-17 17:52
YAFU Version Differences nivek000 YAFU 2 2021-12-21 16:21
How I install YAFU version 2 onto my Ubuntu Machines EdH EdH 4 2021-09-26 22:39
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 09:05.


Fri Dec 9 09:05:24 UTC 2022 up 113 days, 6:33, 0 users, load averages: 0.78, 0.73, 0.81

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

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