mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing > GpuOwl

Reply
 
Thread Tools
Old 2020-10-24, 11:28   #23
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

23·11·67 Posts
Default

Quote:
Originally Posted by preda View Post
BTW, it is normally accepted that the defition of a line in a file is text that ends with a line separator. This can be seen in the output of "wc -l" which counts the lines in a file, which does not count as a line text that's not line-ended.
I wouldn't trust wc to be the sole definer of a line.

But, OMG, you are correct:
Code:
~ echo -n "hi" | wc -l
0
Now I hate wc
retina is offline   Reply With Quote
Old 2020-10-24, 12:11   #24
aheeffer
 
Aug 2020

2·17 Posts
Default

Quote:
Originally Posted by preda View Post
It's not clear what you mean by "will stop".

If it throws an exception telling you to add a newline, that's fine.

OTOH what you seem to have reported earlier was an exponent that was ran twice. That's not consistent with "will stop", and that's what I can't reproduce.

In other words: do you see a problem with the current behavior? if so, what is the problem you see, exactly?
Here is an example:

Code:
2020-06-17 14:55:50 gfx906-0 worktodo.txt : line "PRP=320AC8B64330ED58CBAB02B3947C8D59,1,2,104980517,-1,77,0" does not end with a newline2020-06-17 14:55:50 gfx906-0 Exiting because "lines must end with newline"
2020-06-17 14:55:50 gfx906-0 waiting for background GCDs..
2020-06-17 14:55:50 gfx906-0 Bye
Well 'stop' means the program stops running and tells me 'Bye'. Then I know I simply have to add a CR/LF at the end of the worktodo.txt file. The problem is that I notice 12 to 24 hours later which is a waste of precious Radeon VII compute time. It happened to me several times because it is a natural thing to do with manual assignments: cut - past - save.
aheeffer is offline   Reply With Quote
Old 2020-10-24, 12:37   #25
aheeffer
 
Aug 2020

2×17 Posts
Default

The above case was a standalone instance of gpuowl. In case the pool option is used, the program does not to exit but seems to look for a 'worktodo.txt' in the local directory. It found an old one (from before using the pool option) and started with an exponent which apparently had expired and its result submitted.

Code:
2020-10-21 21:15:09 Rig-RadeonVII-01 worktodo.txt line ignored: ""
2020-10-21 21:15:09 Rig-RadeonVII-01 108980089 FFT: 6M 1K:12:256 (17.32 bpw)
2020-10-21 21:15:09 Rig-RadeonVII-01 Expected maximum carry32: 2E340000
2020-10-21 21:15:10 Rig-RadeonVII-01 OpenCL args "-DEXP=108980089u -DWIDTH=1024u -DSMALL_HEIGHT=256u -DMIDDLE=12u -DPM1=0 -DAMDGPU=1 -DWEIGHT_STEP_MINUS_1=0x9.99a4967011bap-4 -DIWEIGHT_STEP_MINUS_1=-0xc.00089583deaa8p-5  -cl-unsafe-math-optimizations -cl-std=CL2.0 -cl-finite-math-only "
2020-10-21 21:15:10 Rig-RadeonVII-01 ASM compilation failed, retrying compilation using NO_ASM
2020-10-21 21:15:12 Rig-RadeonVII-01 OpenCL compilation in 2.08 s
2020-10-21 21:15:13 Rig-RadeonVII-01 108980089 OK        0 loaded: blockSize 400, 0000000000000003
I hope I made myself clear now.
aheeffer is offline   Reply With Quote
Old 2020-10-24, 13:16   #26
Nick
 
Nick's Avatar
 
Dec 2012
The Netherlands

52·61 Posts
Default

Quote:
Originally Posted by retina View Post
Now I hate wc
It's logical because it respects concatenation:
if "wc -l a" gives m and "wc -l b" gives n then "cat a b|wc -l" gives m+n.
Nick is offline   Reply With Quote
Old 2020-10-24, 13:24   #27
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

134108 Posts
Default

Quote:
Originally Posted by Nick View Post
It's logical because it respects concatenation:
if "wc -l a" gives m and "wc -l b" gives n then "cat a b|wc -l" gives m+n.
Nope. wc is still wrong.

"A" has zero lines according to wc, and "B" has zero lines according to wc. But both of those have 1 line each. If I concatenate them then "AB" also has 1 line, it isn't zero lines.

Why should I care about m+n? I only care about the final result, not the parts that make it up.

How many lines are in the following text?

I am one line.
retina is offline   Reply With Quote
Old 2020-10-24, 13:34   #28
PhilF
 
PhilF's Avatar
 
Feb 2005
Colorado

13×43 Posts
Default

Quote:
Originally Posted by retina View Post
How many lines are in the following text?

I am one line.
Depends on if there is a newline at the end.

I like the behavior. As long as you realize the behavior is there, it makes wc more versatile. For example, in this case Preda could use it to determine whether a text file uses newlines or not, then add them if necessary.
PhilF is online now   Reply With Quote
Old 2020-10-24, 13:47   #29
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

23×11×67 Posts
Default

My conversation with wc:

Me: Hey wc, how many lines were returned from this command?
wc: Zero
Me: So the output was nothing?
wc: No. I said there are zero lines.
Me: How can there be no lines, but still have something there?
wc: Because I said so, that's why.
Me: So if I write out this one line on a piece of paper and ask you to count the lines what will you say?
wc: There are zero lines.
Me: I hate you!
retina is offline   Reply With Quote
Old 2020-10-24, 14:34   #30
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

17×463 Posts
Default

Maybe it is using zero indexing?

Xyzzy is offline   Reply With Quote
Old 2020-10-24, 17:56   #31
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

22×1,193 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Maybe it is using zero indexing?

There's always at least one 0 wiseacre in every crowd.
kriesel is offline   Reply With Quote
Old 2020-10-25, 03:55   #32
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

134108 Posts
Default

wc can go jump in a lake. grep has it correct:
Code:
~ echo -n "hi" | grep -c ""
1
retina is offline   Reply With Quote
Old 2020-10-25, 04:15   #33
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

25×7×41 Posts
wc -l doesn't count "lines", it counts line breaks. If there are none, it will return 0.
If you take a short binary file then it will also likely have 0 'lines' (so one can assume that was what wc's author thought a good thing.)

If you wc -l on a "mac-produced" text file you will typically get a 0. (because mac uses \r for a line break.)
Batalov is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors kriesel kriesel 4 2019-05-21 20:51
Prime95 errors ( 29.4 v8) under Win 10 x64 pepi37 Software 0 2018-11-29 08:17
ERRORS Unregistered Information & Answers 2 2013-04-01 04:14
Prime 95 errors Wychi Hardware 9 2004-10-09 16:01
heat and errors crash893 Hardware 37 2002-11-12 16:33

All times are UTC. The time now is 01:21.

Sun Dec 6 01:21:50 UTC 2020 up 2 days, 21:33, 0 users, load averages: 3.07, 3.11, 2.85

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