cbuchner1 / CudaMiner

a CUDA accelerated litecoin mining application based on pooler's CPU miner
Other
687 stars 304 forks source link

CUDAminer crashes when Ctrl-C in auto mode #125

Open utahman opened 10 years ago

utahman commented 10 years ago
  1. Start CUDAminer in auto mode (-l auto)
  2. After 8-10 seconds try to stop it (by pressing Ctrl-C)
  3. CUDAminer crashes
cbuchner1 commented 10 years ago

what version was tested? a tagged release or the current master?

2014-04-11 6:45 GMT+02:00 utahman notifications@github.com:

  1. Start CUDAminer in auto mode (-l auto)
  2. After 8-10 seconds try to stop it (by pressing Ctrl-C)
  3. CUDAminer crashes

— Reply to this email directly or view it on GitHubhttps://github.com/cbuchner1/CudaMiner/issues/125 .

utahman commented 10 years ago

It was master from couple of weeks ago. The problem is in salsa_kurnel.cu In cuda_scrypt_core(int thr_id, int stream, unsigned int N) Line:     dim3  grid(WU_PER_LAUNCH/WU_PER_BLOCK, 1, 1);

That WU_PER_BLOCK is zero.

Adding if(!WU_PER_BLOCK) return; helps to avoid the crash but more solid solution would be to notify "auto" cycles to return immediately. What happens now is that after Ctrl-C it takes cudaminer some 10-30 seconds to actually stop (or crash). The reason is that "auto" is still searching for best configuration. A global flag like "exiting" checked periodically could make exiting faster.