![]() |
|
|
#1453 | |
|
"Jerry"
Nov 2011
Vancouver, WA
1,123 Posts |
Quote:
EDIT: When quoting the immediately previous message, including the whole thing is unnecessary and only makes thread hard to read. SB Last fiddled with by Batalov on 2012-07-01 at 11:40 Reason: (brief quote) |
|
|
|
|
|
|
#1454 |
|
Romulan Interpreter
Jun 2011
Thailand
72·197 Posts |
Version 2.04 beta, standard (this means I did not get yet any fix you are talking here about):
For me it is not really a crash, but it fails to delete the lck file. I used to delete them by hand, as a "routine clearing" process (I have multiple cudalucas folders, for each instance I run, I do all reports by hand and clear the folders after that, by deleting all checkpoints and files except the exe, ini, and worktodo in each folder, this is done by a batch file outside of the folder, in the parent). I will try to let it there to see what it will happen. Last fiddled with by LaurV on 2012-07-01 at 06:14 |
|
|
|
|
|
#1455 | |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3·29·83 Posts |
Quote:
And it doesn't crash, but just fails to delete the lock file? |
|
|
|
|
|
|
#1456 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2×47×101 Posts |
Regardless of what you are debugging, this line is up to no good:
Code:
if( AID[0] && strncasecmp(AID, "N/A", 3) ) { // If (AID is not null), AND (AID is NOT "N/A") (case insensitive)
|
|
|
|
|
|
#1457 | ||
|
"Jerry"
Nov 2011
Vancouver, WA
21438 Posts |
Quote:
Quote:
Last fiddled with by flashjh on 2012-07-01 at 14:15 |
||
|
|
|
|
|
#1458 | |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3×29×83 Posts |
This is from my phone, which is why the PS doesn't quote the mentioned post
![]() Quote:
I'll be sure to fix that and just initialize to null at declaration time.I'm not sure what else it could be, except perhaps reverse AID and "N/A"? Last fiddled with by Dubslow on 2012-07-01 at 19:20 |
|
|
|
|
|
|
#1459 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2×47×101 Posts |
If AID and AID[0] are initialized, then this check is useless because strncasecmp works fine with empty strings, and if AID isn't then you are crashing right away.
Writing a comment that simply repeats the content of the line (and contradicts what is actually written, in this case) is bad. Thinking that just because it (supposedly) doesn't crash (because today you think that you know exactly what is called and when) it is an acceptable code is worse. Last fiddled with by Batalov on 2012-07-01 at 21:39 |
|
|
|
|
|
#1460 |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
722110 Posts |
But I do need to check if it's empty. And as I explained before, the string is always properly initialized (though this isn't clear in the slightest by looking at the code, I admit, and it will be fixed).
If it is empty, yes strncasecmp will handle it fine, but it will compare empty to "N/A" as unequal. Thus just "if(strncasecmp(AID, "N/A", 3))" will end up taking the branch, which I don't want to do with an empty string. That would create "CUDALucas.... AID:" which is silly. If there's no AID, then don't needlessly print "AID:". Thus the comment is exactly what the code does. Perhaps that's not great practice, but I did it for anyone who's not off-handedly familiar with strncasecmp, which until this discussion, I wasn't. Edit: Perhaps I meant "if (AID is not EMPTY)", is that what you meant about incorrect comment? I think it's acceptable code because it's the simplest way to make the program do what I want it to do without causing errors. And as far as "you think that you know exactly what is called and when", isn't that the whole point of *procedural* programming? PS I've committed the changes. Last fiddled with by Dubslow on 2012-07-01 at 22:05 |
|
|
|
|
|
#1462 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
251616 Posts |
Quote:
...but even with "EMPTY" this piece of code sounds like Code:
if(2+3==5) { // if two plus three equals five, then
Code:
dump_interval = MAX(dump_interval,
DEFAULT_DUMP_INTERVAL + 1);
/* make the dump interval a multiple of
the check interval. If this is not done,
eventually we will perform a check and
then less than three iterations later
will get a dump, which performs another
check. The Lanczos recurrence only
guarantees that check vectors more than
three iterations back will be orthogonal
to the current x, so this will cause
spurious failures */
dump_interval += check_interval -
dump_interval %
check_interval;
Code:
dump_interval = MAX(dump_interval,
DEFAULT_DUMP_INTERVAL + 1);
// make dump_interval at least DEFAULT_DUMP_INTERVAL + 1
dump_interval += check_interval -
dump_interval %
check_interval;
// add check_interval - dump_interval modulo check_interval to dump_interval
That line needs no comment, but rather a preceding line Code:
assert(AID); #or, if you prefer assert(AID != NULL); Last fiddled with by Batalov on 2012-07-02 at 01:34 Reason: typos fixed. more typos inserted ;-) |
|
|
|
|
|
|
#1463 |
|
Romulan Interpreter
Jun 2011
Thailand
965310 Posts |
No idea. Right now I have no CL work. I started to TF the 332M range to 70, as per discussion in the gpu272 thread, with all the steam, but I had to stop that one too, as I temporarily need the cards for daily work. Like in the interrupt mode, the higher priority interrupt wins. When this is done I will return to mfaktc and 332M5 (already finished the range to 332M4 inclusive, before interruption) which will be done in few days too. Then back to CL-DC. I'll watch for this error and keep you informed if it pops up (I may be that I missed it in the past, as I said, I used to delete the lock file by hand anytime I saw it and that may be a reason why no error like failed to close/delete files). But now I will watch for it.
|
|
|
|
![]() |
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 |