![]() |
|
|
#1464 |
|
Jun 2011
100000112 Posts |
Crashed again. Looks like it's 100% reproducible.
|
|
|
|
|
|
#1465 |
|
Jun 2011
13110 Posts |
Guys, do you close the lock file before trying to delete it?
I didn't look at the code but I think you are forgetting to close the file and then do something uncosher when you try to create it again. Last fiddled with by apsen on 2012-07-03 at 03:55 |
|
|
|
|
|
#1466 | |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3×29×83 Posts |
Quote:
Code:
//parse.c, line 86 #include <winsock2.h> #include <io.h> #include <share.h> //used for _sopen_s #undef close #define close _close #define sched_yield SwitchToThread #define MODE _S_IREAD | _S_IWRITE #define strncasecmp _strnicmp /* Everything from here to the next include is to make MSVS happy. */ #define sscanf sscanf_s /* This only works for scanning numbers, or strings with a defined length (e.g. "%131s") */ void strcopy(char* dest, char* src, size_t n) { strncpy_s(dest, MAX_LINE_LENGTH+1, src, n); } FILE* _fopen(const char* path, const char* mode) { FILE* stream; errno_t err = fopen_s(&stream, path, mode); if(err) return NULL; else return stream; } void _sprintf(char* buf, char* frmt, const char* string) { // only used in filelocking code sprintf_s(buf, 251, frmt, string); } int open_s(const char *filename, int oflag, int pmode) { int file_handle; errno_t err = _sopen_s( &file_handle, filename, oflag, _SH_DENYNO, pmode); if (err) { close (file_handle); return -1; } else return 0; } void _strcpy(char *dest, const char *src) { strcpy_s (dest, _countof(dest), src); } Code:
//parse.c line 728 /*****************************************************************************/ /* mfakto's file locking code */ #define MAX_LOCKED_FILES 3 typedef struct _lockinfo { int lockfd; FILE * open_file; char lock_filename[256]; } lockinfo; static unsigned int num_locked_files = 0; static lockinfo locked_files[MAX_LOCKED_FILES]; int unlock_and_fclose(FILE *f) { unsigned int i, j; int ret = 0; #ifdef EBUG printf("unlock() called\n"); #endif if (f == NULL) return -1; for (i=0; i<num_locked_files; i++) { if (locked_files[i].open_file == f) { ret = fclose(f); f = NULL; if (close(locked_files[i].lockfd) != 0) perror("Failed to close lockfile"); if (remove(locked_files[i].lock_filename)!= 0) perror("Failed to delete lockfile"); for (j=i+1; j<num_locked_files; j++) { locked_files[j-1].lockfd = locked_files[j].lockfd; locked_files[j-1].open_file = locked_files[j].open_file; _strcpy(locked_files[j-1].lock_filename, locked_files[j].lock_filename); } num_locked_files--; break; } } if (f) { fprintf(stderr, "File was not locked!\n"); ret = fclose(f); } #ifdef EBUG printf("successfully unlocked\n"); #endif return ret; } |
|
|
|
|
|
|
#1467 |
|
"Jerry"
Nov 2011
Vancouver, WA
1,123 Posts |
To eliminate code change problems, if we can get a set of code without the changes to make MSVS happy, I can get it to compile so we can test the original code.
|
|
|
|
|
|
#1468 | |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3·29·83 Posts |
Quote:
Alternately, try checking out r32, my initial Beta commit. svn checkout svn://svn.code.sf.net/p/cudalucas/code/trunk -r 32 Last fiddled with by Dubslow on 2012-07-04 at 04:33 |
|
|
|
|
|
|
#1469 |
|
Nov 2010
Germany
25516 Posts |
If it is reproducible, could you attach a debugger to it before it crashes? Or start it right out of a debugger? A stacktrace would certainly be of great help. If you can get the debug symbols for your build, then you can even look at the data / variables ...
|
|
|
|
|
|
#1472 | |
|
Nov 2010
Germany
3×199 Posts |
Quote:
The "debug" binary, unfortunately, contains no debug information that any of my debuggers could identify. I tried downloading the source, but my svn client fails to pass the firewall for svn:// links, only http[s] works (via proxy). However, for all http requests to SF, all I get is "200 OK" instead of any file ... |
|
|
|
|
|
|
#1473 | |
|
"Jerry"
Nov 2011
Vancouver, WA
100011000112 Posts |
Quote:
I've been trying to move the projects to the full MSVS, but I haven't spent a lot of time getting it to work yet. |
|
|
|
|
|
|
#1474 |
|
"Jerry"
Nov 2011
Vancouver, WA
21438 Posts |
I posted a new version I compiled with /Zi for cl.exe. I'm using this page for the examples. Let me know if that one has debugging info.
I found that the original debugging info I incuded is for CUDA-GDB (and it's still there for now). Last fiddled with by flashjh on 2012-07-04 at 16:09 |
|
|
|
![]() |
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 |