diff --git a/gpu/src/cricket-cr.c b/gpu/src/cricket-cr.c index fcbfd0d23a36982e1d56f9ffbad8f520fd354efe..9069bee3f899e4a858c5447bd95ba57b2324bd0d 100644 --- a/gpu/src/cricket-cr.c +++ b/gpu/src/cricket-cr.c @@ -1170,6 +1170,8 @@ bool cricket_cr_ckp_params(CUDBGAPI cudbgAPI, const char *ckp_dir, /* Parameters are the same for all warps so just use warp 0 * TODO: use first valid warp, because warp 0 may not be in use (is that * possible?) + * + * This seems to cause issues right now. Needs a solution. */ if ((param_mem = (uint8_t*)malloc(elf_info->param_size)) == NULL) return false; @@ -1482,6 +1484,7 @@ bool cricket_cr_ckp_globals(CUDBGAPI cudbgAPI, const char *ckp_dir) if (res != CUDBG_SUCCESS) { LOGE(LOG_ERROR, "cuda error: %s", cudbgGetErrorString(res)); + LOGE(LOG_DEBUG, "encountered in iteration %d of %d\n", i, globals_num); goto cleanup; } offset += globals[i].size; diff --git a/gpu/src/main.c b/gpu/src/main.c index b3dee57ab2bdb5829d3fe6c0921e1676aa84d21d..98b6b4ac19fdeed01b7bd00c407991314d67bf2f 100644 --- a/gpu/src/main.c +++ b/gpu/src/main.c @@ -836,10 +836,11 @@ int cricket_checkpoint(int argc, char *argv[]) return -1; } + printf("Initializing GDB!\n\n"); gdb_init(argc, argv, NULL, argv[2]); /* attach to process (both CPU and GPU) */ - // printf("attaching...\n"); + printf("attaching...\n"); // attach_command(argv[2], !batch_flag); if (cuda_api_get_state() != CUDA_API_STATE_INITIALIZED) { @@ -854,6 +855,9 @@ int cricket_checkpoint(int argc, char *argv[]) #ifdef CRICKET_PROFILE gettimeofday(&b, NULL); #endif + + printf("attached!\n\n"); + printf("trying to get CUDA debugger API\n"); /* get CUDA debugger API */ res = cudbgGetAPI(CUDBG_API_VERSION_MAJOR, CUDBG_API_VERSION_MINOR, @@ -863,7 +867,7 @@ int cricket_checkpoint(int argc, char *argv[]) goto cuda_error; } printf("got API\n"); - + printf("enumerating devices...\n"); if (!cricket_device_get_num(cudbgAPI, &numDev)) { printf("error getting device num\n"); @@ -1046,6 +1050,9 @@ int cricket_checkpoint(int argc, char *argv[]) //cricket_focus_kernel(!batch_flag); + /// TODO: Logic Error: first_warp might always be invalid! In line 889 first_warp is looped over + /// the number of available warps. As far as I can tell it is never reset afterwards. + /// That would explain why this line throws an invalid warp exception. Needs discussion. if (!cricket_cr_ckp_params(cudbgAPI, ckp_dir, &elf_info, 0, 0, first_warp)) { printf("cricket_cr_ckp_params unsuccessful\n");