mersenneforum.org  

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

Reply
 
Thread Tools
Old 2011-09-07, 09:04   #1178
chris2be8
 
chris2be8's Avatar
 
Sep 2009

82C16 Posts
Default

The first thing to check is if the lines end with CRLF instead of just LF. Try running dos2unix against a copy of worktodo.txt and see if it changes size. If it does try running with the new file.

Chris K
chris2be8 is offline   Reply With Quote
Old 2011-09-07, 19:59   #1179
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Thanks, I've noticed that Windows doesn't separate lines written while in Linux, so I'll give it a shot (although you'd think opening it in nano or gedit would change it back to linux format). What are CRLF and LF? (I imagine they're part of the difference between dos and unix?)
Dubslow is offline   Reply With Quote
Old 2011-09-07, 20:53   #1180
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

11·311 Posts
Default

Quote:
Originally Posted by Dubslow View Post
What are CRLF and LF?
There is of course a whole Wikipedia article on the subject, but in short:

CR = Carriage Return = ASCII character 13, sometimes written as \r
LF = Line Feed = ASCII character 10, sometimes written as \n

Quoting the footnote of the Wikipedia article:
Quote:
The origin of the older computer term "CRLF" - which redirects to this Newline article - or "Carriage Return [and] Line Feed", derives from standard manual typewriter design, whereby at the end of a line of text the typist pushes a lever at the left end of the carriage to return it to position for beginning the next line. In so doing, a mechanism also rolls the typewriter's platen by one line, advancing ("feeding") the paper to the correct position.
Unix uses LF to separate lines.
Mac uses CR to separate lines.
Windows uses CR+LF to separate lines.

If you open a Unix or Mac file in Notepad, for example, it's looking for CR+LF characters to separate the lines, and doesn't find them, so assumes it's all one line. If you open a Windows file on a Mac or Unix machine, you'll get proper line separation, but with an extra (possibly invisible) character at the beginning or end of each line. Of course, any of the better text editors on any platform are aware of the various newline variants and will display all files properly, and also not break them when re-saving them.

Last fiddled with by James Heinrich on 2011-09-07 at 20:55
James Heinrich is offline   Reply With Quote
Old 2011-09-07, 20:56   #1181
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2·23·179 Posts
Default

"DOS"
Code:
$ cat test.txt | od -c
0000000   a  \r  \n   b  \r  \n   c
0000007
"Unix"
Code:
$ cat test.txt | tr -d '\r' | od -c
0000000   a  \n   b  \n   c
0000005
Attached Files
File Type: txt test.txt (7 Bytes, 104 views)
Xyzzy is offline   Reply With Quote
Old 2011-09-07, 22:36   #1182
Christenson
 
Christenson's Avatar
 
Dec 2010
Monticello

34038 Posts
Default

Oliver (the Judger) and I are discussing the parser right now, and we intend to make it ignore blank lines in the next version.
Christenson is offline   Reply With Quote
Old 2011-09-09, 05:10   #1183
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Speaking of which, is there any easy way to see what the latest release is? Also, thanks for all the tips, very useful, and also helps me understand why 1. I don't have this problem with M/Prime/95 and 2. Why all the read me files and such with mfaktc came out all wrong in notepad.
Thanks guys!
Dubslow is offline   Reply With Quote
Old 2011-09-09, 11:37   #1184
Christenson
 
Christenson's Avatar
 
Dec 2010
Monticello

70316 Posts
Default

Latest release is mfaktc0.17. Oliver is working on 0.18pre6.
Christenson is offline   Reply With Quote
Old 2011-09-09, 14:11   #1185
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2×23×179 Posts
Default

Quote:
Speaking of which, is there any easy way to see what the latest release is?
http://www.mersenneforum.org/mfaktc/
Xyzzy is offline   Reply With Quote
Old 2011-09-09, 15:28   #1186
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11·101 Posts
Default

Hello,

Quote:
Originally Posted by Dubslow View Post
2. Why all the read me files and such with mfaktc came out all wrong in notepad.
Thanks guys!
Again LF vs. CRLF. On Windows you can try wordpad instead of notepad.

http://www.mersennewiki.org/index.php/Mfaktc
http://www.mersenneforum.org/mfaktc/
TheJudger is offline   Reply With Quote
Old 2011-09-09, 18:09   #1187
Christenson
 
Christenson's Avatar
 
Dec 2010
Monticello

5×359 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
That link looks a bit hard to find...what page is it on?
Christenson is offline   Reply With Quote
Old 2011-09-10, 01:18   #1188
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

769210 Posts
Default

Quote:
Originally Posted by Christenson View Post
That link looks a bit hard to find...what page is it on?
http://www.mersenneforum.org/mfaktc/ is the page, on which are links to two .gz and two .zip files containing the four diffferent flavors of the latest release.
cheesehead is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mfakto: an OpenCL program for Mersenne prefactoring Bdot GPU Computing 1676 2021-06-30 21:23
The P-1 factoring CUDA program firejuggler GPU Computing 753 2020-12-12 18:07
gr-mfaktc: a CUDA program for generalized repunits prefactoring MrRepunit GPU Computing 32 2020-11-11 19:56
mfaktc 0.21 - CUDA runtime wrong keisentraut Software 2 2020-08-18 07:03
World's second-dumbest CUDA program fivemack Programming 112 2015-02-12 22:51

All times are UTC. The time now is 10:26.


Mon Aug 2 10:26:12 UTC 2021 up 10 days, 4:55, 0 users, load averages: 2.40, 1.49, 1.26

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