mersenneforum.org > YAFU YAFU Version 2.10
 Register FAQ Search Today's Posts Mark Forums Read

 2022-09-24, 17:00 #45 kotenok2000   Mar 2018 2×52 Posts 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
 2022-09-24, 20:08 #46 James Heinrich     "James Heinrich" May 2004 ex-Northern Ontario F5F16 Posts 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.
2022-09-24, 23:43   #47
slandrum

Jan 2021
California

23×61 Posts

Quote:
 Originally Posted by James Heinrich 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

2022-09-25, 11:39   #48
LaurV
Romulan Interpreter

"name field"
Jun 2011
Thailand

101000000001102 Posts

Quote:
 Originally Posted by slandrum it makes me uncomfortable whenever I see the last line in a text file not terminated by a line break.
same here

 2022-09-25, 11:49 #49 kruoli     "Oliver" Sep 2017 Porta Westfalica, DE 23238 Posts 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.
2022-09-25, 17:42   #50
BudgieJane

"Jane Sullivan"
Jan 2011
Beckenham, UK

11×29 Posts

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

 2022-09-25, 17:57 #51 James Heinrich     "James Heinrich" May 2004 ex-Northern Ontario 5×787 Posts 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.
2022-09-25, 18:03   #52
kruoli

"Oliver"
Sep 2017
Porta Westfalica, DE

5×13×19 Posts

Quote:
 Originally Posted by bsquared 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.

2022-09-26, 02:19   #53
bsquared

"Ben"
Feb 2007

3×17×73 Posts

Quote:
 Originally Posted by James Heinrich 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!

2022-09-26, 03:26   #54
James Heinrich

"James Heinrich"
May 2004
ex-Northern Ontario

5·787 Posts

Quote:
 Originally Posted by bsquared 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.

 2022-09-26, 09:58 #55 kruoli     "Oliver" Sep 2017 Porta Westfalica, DE 123510 Posts 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?

 Similar Threads Thread Thread Starter Forum Replies Last Post chris2be8 YAFU 9 2022-02-17 17:52 nivek000 YAFU 2 2021-12-21 16:21 EdH EdH 4 2021-09-26 22:39 EdH YAFU 8 2018-03-14 17:22 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