mersenneforum.org  

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

Reply
 
Thread Tools
Old 2012-06-06, 20:48   #1398
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default

Quote:
Originally Posted by Dubslow View Post
Regarding the C/C++ thing, kjaget is exactly right, and that's why #ifdef linux then all the functions are declared that way; the url in the comments of that section has basically the same explanation. I didn't realize that it only worked on Windows because it thought it was C++. Are there any dangers in our code where a C++ compiler would miscompile valid C? I know they're not entirely compatible, and that some incompatibilities exist, and therefore we should watch out for them.
I agree and that's why I plan to fix it.
flashjh is offline   Reply With Quote
Old 2012-06-06, 20:50   #1399
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

722110 Posts
Default

Quote:
Originally Posted by flashjh View Post
I agree and that's why I plan to fix it.
In that case, the simplest method would be to remove the function declarations from parse.h, and then remove the #ifs from around the 'extern "C"'s already there. I'll set up a SourceForge (It shouldn't change the binaries.)
Dubslow is offline   Reply With Quote
Old 2012-06-07, 02:37   #1400
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Exclamation

Does anyone know what license CUDALucas is under? I couldn't find any licensing on MacLucasFFTW.c, MacLucasUNIX.c or lucdwt.c, though the most latter has an "All Rights Reserved" in it. (In the process of looking through these, I also discovered that "George Woltman's lightning-fast Pentium program has its roots in this code [lucdwt.c]". ) I also didn't see anywhere that msft had put a particular license on it.

Strictly speaking, due to the mfaktc code I added, v2.02+ should be under the GPL, though I doubt TheJudger/Christenson would mind if it were under some other license. (Edit: Actually because of timeval.c even versions before 2.02 should be GPL. I'm not sure when timeval.c was added.)



Edit: About C/C++ and headers, I was able to move the 'extern "C" ..." declarations to parse.h, and this time I was able to link. (I thought I had tried this before, but I guess not.) There are no longer and #ifdefs in that regard. (I'll see about posting this on SourceForge soon.)

Last fiddled with by Dubslow on 2012-06-07 at 03:03
Dubslow is offline   Reply With Quote
Old 2012-06-07, 08:09   #1401
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

1C3516 Posts
Default

After much fighting with SF Beta and SVN, there is now a CUDALucas SourceForge page.

In addition, timeval.c is gone entirely, not to mention various changes to the defines and includes. Any binaries compiled should be identical, but flash should also test and make sure this newer stuff does actually compile.

Does anybody feel like writing a README?

(I've marked it as GPL, but that's certainly open to discussion.)

msft and flash, please report your SF usernames so I can add you. Anyone else is welcome to join as a "Member". (Or Developer if you ask nicely. )

Last fiddled with by Dubslow on 2012-06-07 at 08:11
Dubslow is offline   Reply With Quote
Old 2012-06-07, 08:31   #1402
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

72×197 Posts
Default

Well. I am nitpicking again. (I learned this word here on this forum :P)

Now the toy seems to work as expected. There is still a small BIG issue, which affects all users with more then one card and/or the users who want to run multiple copies of the software. Clearly they can't share the same worktodo, many conflicts could arise form it, the third world war, etc. when CL would write in the file with both instances. We can't specify two different files in the config, as there is only one config, and this raise the question how the instances of CL would discern which config is whose.

The only solution is to do it mfaktc's way: put them in separate folders.

But now we have a different headache, we have to surf through all those folders to find the result files to report them. God helps that is only "one time per day" output, and we have only 2 or 3 (max 4) folders like this, but what should we do if we have 20 gtx9980 cards (zefler architecture) and each of them runs 5 CL instances and each instance outputs one DC every 5 minutes... dream on!...

Well, short story: wouln't be nice if we can customize the output folder from the ini file? and use "ResultsFile=..\result", so all instances add their result lines to the same file, in the parent folder, where all folders are... Wait for open it, if busy (opened for write by another process), and we solved the access issue too.. and keep all results in one place...

For mfaktc I solve this with batches, anyhow I should create some batches for CL, just in case

Code:
copy /b allresults.txt+cl0\result.txt
del cl0\results.txt
copy /b allresults.txt+cl1\result.txt
del cl1\results.txt
copy /b allresults.txt+cl2\result.txt
del cl2\results.txt
etc
and launch it from time to time...

Another nitpicking: put back the "CTRL+C" in the string. It will look better with "^C CTRL+C detected. Bla bla" (on your computer where ^c is printed when is caught) then "caught. Bla bla", (in mine, where is not). I have the feeling I did something wrong and he caught me... And anyhow, some people don't have any idea what ^C is. Something raised at the power of a complex set? (nerd!!)

And a third nitpicking: Write the times somewhere, on the screen, on the result file, whatever. If it is complicate to compute them, it could be a plain separate line: "Time=21:30:17.125" and write the wall clock, it is not really necessary to write "this test took hh:mm:ss.lll" as mfaktc is doing. Just printing the wall clock at the beginning and at the end of each expo would be enough to have one idea how much the task REALLY took. The ETA is just an estimation, and not always accurate, he can't know how busy my computer will be tonight if my boss gave me homework, or if I am going to play puzzlepirates or to trade forex. Didn't say nothing about watching sexy movies with Mrs LaurV in the same time...

Last fiddled with by LaurV on 2012-06-07 at 08:36
LaurV is offline   Reply With Quote
Old 2012-06-07, 14:11   #1403
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by LaurV View Post
Well. I am nitpicking again. (I learned this word here on this forum :P)

Now the toy seems to work as expected. There is still a small BIG issue, which affects all users with more then one card and/or the users who want to run multiple copies of the software. Clearly they can't share the same worktodo, many conflicts could arise form it, the third world war, etc. when CL would write in the file with both instances. We can't specify two different files in the config, as there is only one config, and this raise the question how the instances of CL would discern which config is whose.

The only solution is to do it mfaktc's way: put them in separate folders.

But now we have a different headache, we have to surf through all those folders to find the result files to report them. God helps that is only "one time per day" output, and we have only 2 or 3 (max 4) folders like this, but what should we do if we have 20 gtx9980 cards (zefler architecture) and each of them runs 5 CL instances and each instance outputs one DC every 5 minutes... dream on!...

Well, short story: wouln't be nice if we can customize the output folder from the ini file? and use "ResultsFile=..\result", so all instances add their result lines to the same file, in the parent folder, where all folders are... Wait for open it, if busy (opened for write by another process), and we solved the access issue too.. and keep all results in one place...

For mfaktc I solve this with batches, anyhow I should create some batches for CL, just in case

Code:
copy /b allresults.txt+cl0\result.txt
del cl0\results.txt
copy /b allresults.txt+cl1\result.txt
del cl1\results.txt
copy /b allresults.txt+cl2\result.txt
del cl2\results.txt
etc
and launch it from time to time...
The idea that occurred to me turned out to be the same as the idea that occurred to Bdot, so I'll move PrintDeviceInfo off of '-i' and use that option to specify an ini file instead; ResultsFile will be a new option. (Does anyone need a command line switch for that as well?)
Quote:
Originally Posted by LaurV View Post
Another nitpicking: put back the "CTRL+C" in the string. It will look better with "^C CTRL+C detected. Bla bla" (on your computer where ^c is printed when is caught) then "caught. Bla bla", (in mine, where is not). I have the feeling I did something wrong and he caught me... And anyhow, some people don't have any idea what ^C is. Something raised at the power of a complex set? (nerd!!)
What I mean is that when I press CTRL+C, those two characters '^C' literally appear on my screen, just like 'a' appears when I press the a key. Regardless though, I'll change the message.
Quote:
Originally Posted by LaurV View Post
And a third nitpicking: Write the times somewhere, on the screen, on the result file, whatever. If it is complicate to compute them, it could be a plain separate line: "Time=21:30:17.125" and write the wall clock, it is not really necessary to write "this test took hh:mm:ss.lll" as mfaktc is doing. Just printing the wall clock at the beginning and at the end of each expo would be enough to have one idea how much the task REALLY took. The ETA is just an estimation, and not always accurate, he can't know how busy my computer will be tonight if my boss gave me homework, or if I am going to play puzzlepirates or to trade forex. Didn't say nothing about watching sexy movies with Mrs LaurV in the same time...
This would be harder; I think I'll eventually incorporate Bdot's additions to mfakto 0.11 to allow customizable checkpoint lines. Changes won't be immediate.


PS Can somebody post any and all .dll's they use to run CUDALucas?

Also, flash, we should really pick one or two archs/CUDA versions. You can compile any arch against any version that supports it -- there's not much difference between (for example) 3.2|1.3 and 4.0|1.3, etc. mfaktc 0.18 as far as I can tell was only compiled against CUDA 4.0 libs; it's probably best if we just use the latest CUDA version. Apparently, judging from mfaktc's make files, you can compile code for more than one arch/compatibility into one executable; like I've said before though, msft's makefile only used arch=1.3. I'll look into nvcc options.

Last fiddled with by Dubslow on 2012-06-07 at 14:59
Dubslow is offline   Reply With Quote
Old 2012-06-07, 15:07   #1404
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

25B516 Posts
Default

Quote:
Originally Posted by Dubslow View Post
This would be harder; I think I'll eventually incorporate Bdot's additions to mfakto 0.11 to allow customizable checkpoint lines. Changes won't be immediate.
I wasn't talking about something so complicate. Checkpoint lines are perfect as they are. I'd just like to have printed a line "this test took xxx hours (from the last restart)." when a test is finished. This could be easy, read the clock when you start an exponent (or resume the program, it does not really matter) read it again when you finish, print the difference when you print the final "M( 859433 )P, n = 49152, CUDALucas v2.02" line. Print it on the screen and in the result file too. That is all.

edit:
About the different exe files, for my 580 the 40_20 is fastest. Double speed compared with 32_13. For other cards, people may need different versions. I remember the v1.3 used to be faster when compiled with 32_13, about 25% faster then 40_20. Also, 41_ was always slower for my card, but people having sm_21 may say differently.

And to end in a positive note: two residues matched with 2.03 (started last night, interrupted today and replaced 2.03-no-LF with 2.03-with-LF, resume. The result:
Code:
Processing result: M( 26306983 )C, 0xfd9d34cf4aa8db5d, n = 1474560, CUDALucas v2.03
LL test successfully completes double-check of M26306983
CPU credit is 26.1608 GHz-days.
Processing result: M( 26331029 )C, 0x06226c8e8e381896, n = 1474560, CUDALucas v2.03
LL test successfully completes double-check of M26331029
CPU credit is 26.1847 GHz-days.

Last fiddled with by LaurV on 2012-06-07 at 15:15
LaurV is offline   Reply With Quote
Old 2012-06-07, 15:19   #1405
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

160658 Posts
Default

Quote:
Originally Posted by LaurV View Post
I wasn't talking about something so complicate. Checkpoint lines are perfect as they are. I'd just like to have printed a line "this test took xxx hours (from the last restart)." when a test is finished. This could be easy, read the clock when you start an exponent (or resume the program, it does not really matter) read it again when you finish, print the difference when you print the final "M( 859433 )P, n = 49152, CUDALucas v2.02" line. Print it on the screen and in the result file too. That is all.
Misunderstood that, you're right, this should be simpler to do. I'll postpone the customizable-line thing until somebody asks for it.
Dubslow is offline   Reply With Quote
Old 2012-06-08, 04:08   #1406
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

One accidental side effect of having a SourceForge is that there's more publicity for it. 7 downloads in two days https://sourceforge.net/projects/cud...stats/timeline , though I'm pretty sure at least the Thailand download was LaurV . Is anybody on here from Austria or Trinidad and Tobago (or use such a proxy)?

Last fiddled with by Dubslow on 2012-06-08 at 04:09
Dubslow is offline   Reply With Quote
Old 2012-06-08, 05:27   #1407
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

72×197 Posts
Default

It was not me, I visited the page but only could see the ini file, so I did not dld anything.

edit: visited now again, some files appeared. Still could not see any source codes, and the libs are only for linux. If ye are going to put libs (not really necessary, but if) then better put all of them, windoze included. Or are they inside of (each) (packed self extract?) exe file? (I did not dld to check).

Last fiddled with by LaurV on 2012-06-08 at 05:34
LaurV is offline   Reply With Quote
Old 2012-06-08, 05:55   #1408
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

I' ve asked flash about the windows libs. As for code, it's one of the other tabs besides "Files".
Dubslow is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't DC/LL them with CudaLucas LaurV Data 131 2017-05-02 18:41
CUDALucas / cuFFT Performance on CUDA 7 / 7.5 / 8 Brain GPU Computing 13 2016-02-19 15:53
CUDALucas: which binary to use? Karl M Johnson GPU Computing 15 2015-10-13 04:44
settings for cudaLucas fairsky GPU Computing 11 2013-11-03 02:08
Trying to run CUDALucas on Windows 8 CP Rodrigo GPU Computing 12 2012-03-07 23:20

All times are UTC. The time now is 07:23.


Mon Aug 2 07:23:38 UTC 2021 up 10 days, 1:52, 0 users, load averages: 1.06, 1.23, 1.46

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.