View Single Post
2012-04-14, 09:05   #1231
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

722110 Posts
In the vein of other mostly useless projects...

I hacked some mfatkc code so that CUDALucas can read "standard" GIMPS assignment lines ("Test=AID,exponent" and "DoubleCheck=..."), and remove each one from worktodo.txt as they're completed. What this really means is that I copied Christenson's (?) code, modified it slightly, and pasted it into CUDALucas.cu. At any rate, it works for me

It's now a few hundred lines longer, but *in theory* (in the vaguest sense of the phrase) it means that CUDALucas will be easier to automate, if Christenson ever decides to put his precious efforts towards that task .
It also means that you can now copy and paste work straight from PrimeNet/GPU272 without having to delete all the information except the exponent.

On the other hand, it might require a re-licensing; mfaktc is under the GPL, though I'm not aware what the current CUDALucas license is (if any), or if anybody cares enough to bother . At the very least, I'm proud that it works, even if I hardly wrote anything (thank you Christenson!)

It is compatible with 2.00, meaning that you call it with exactly the same command, and it'll resume just the same as before. It (temporarily) renders cudalucas.ini useless; this was the first half of my project to hack even more mfaktc code () to get basic .ini functionality, and perhaps be able to specify FFT length in the worktodo line. (Note that the version string is "lol" at the moment )

I also modified some of the messages printed to be slightly more grammatically correct; that's the only liberty I took with the existing code, besides modifying main(). Fortunately for me, everything like resuming/writing checkpoints etc. was abstracted from main() (in check()) so I didn't mess with anything critical. The only change to main was the part the reads in assignments. I did add a few declarations above main() (but below the rest of the existing code); all other additions are below main(), which is to say below all previously existing code. For convenience of anybody checking my hacking (it hardly qualifies as coding) all my comments are preceded by hashes, e.g. "//#" or "/*#" so that a Ctrl+F should be sufficient to find all my comments, and therefore all my changes. New CUDALucas.cu is attached; it should compile just fine with the old Makefile. (I can't test Windows compiling, but g++/nvcc didn't complain at me.)

(I did test that resuming 2.00 stuff works, because I'm running my current expo with this new version, while it was started with 2.00.)

[/more useless spam]

Edit: Here's a copy/paste of my "production" terminal:
Code:
Iteration 16330000 M( 26273341 )C, 0x66b743a75bcbccea, n = 1474560, CUDALucas v2.00 err = 0.1162 (0:54 real, 5.4614 ms/iter, ETA 15:04:46)
Iteration 16340000 M( 26273341 )C, 0x780b400cb7e3ef0b, n = 1474560, CUDALucas v2.00 err = 0.1162 (0:56 real, 5.5237 ms/iter, ETA 15:14:10)
Iteration 16350000 M( 26273341 )C, 0xe1cba399ba32200e, n = 1474560, CUDALucas v2.00 err = 0.1162 (0:57 real, 5.7331 ms/iter, ETA 15:47:52)
^C^C caught.  Writing checkpoint.
bill@Gravemind:~/CUDALucas∰∂ CUDALucas -c 10000 -f 1474560 -polite 64 worktodo.txt
WARNING: ignoring line 1 in "worktodo.txt"! Reason: doesn't begin with Test= or DoubleCheck=
WARNING: ignoring line 2 in "worktodo.txt"! Reason: doesn't begin with Test= or DoubleCheck=
WARNING: ignoring line 3 in "worktodo.txt"! Reason: doesn't begin with Test= or DoubleCheck=
WARNING: ignoring line 4 in "worktodo.txt"! Reason: doesn't begin with Test= or DoubleCheck=
WARNING: ignoring line 5 in "worktodo.txt"! Reason: doesn't begin with Test= or DoubleCheck=
WARNING: ignoring line 6 in "worktodo.txt"! Reason: doesn't begin with Test= or DoubleCheck=
No valid assignment found.
bill@Gravemind:~/CUDALucas∰∂ nano worktodo.txt
bill@Gravemind:~/CUDALucas∰∂ CUDALucas -c 10000 -f 1474560 -polite 64 worktodo.txt

continuing work from a partial result M26273341 fft length = 1474560 iteration = 16358145
Iteration 16360000 M( 26273341 )C, 0x523ba68f8a9962ce, n = 1474560, CUDALucas vlol err = 0.09326 (0:12 real, 1.1720 ms/iter, ETA 3:13:34)
Iteration 16370000 M( 26273341 )C, 0x2e8afa1230a7ce30, n = 1474560, CUDALucas vlol err = 0.09766 (0:56 real, 5.6254 ms/iter, ETA 15:28:11)
Iteration 16380000 M( 26273341 )C, 0x22b7d6757e8729a1, n = 1474560, CUDALucas vlol err = 0.1016 (0:55 real, 5.4859 ms/iter, ETA 15:04:15)
Where is says "ignoring line..." is where I forgot to take the list of exponents and convert them to proper GIMPS format
Attached Files
 CUDALucas.cu.txt (52.6 KB, 140 views)

Last fiddled with by Dubslow on 2012-04-14 at 09:08