Browse Source

api: report per thread cpu hash checks (ACC/REJ)

+ update all algos for that...
master
Tanguy Pruvot 8 years ago
parent
commit
c66e8622b3
  1. 2
      Algo256/blake256.cu
  2. 4
      Algo256/blake2s.cu
  3. 2
      Algo256/bmw.cu
  4. 4
      Algo256/decred.cu
  5. 2
      Algo256/keccak256.cu
  6. 2
      Algo256/vanilla.cu
  7. 2
      JHA/jackpotcoin.cu
  8. 10
      api.cpp
  9. 4
      ccminer.cpp
  10. 4
      crypto/cryptolight.cu
  11. 4
      crypto/cryptonight.cu
  12. 4
      crypto/wildkeccak.cu
  13. 17
      groestlcoin.cpp
  14. 2
      heavy/heavy.cu
  15. 2
      lbry/lbry.cu
  16. 2
      lyra2/lyra2RE.cu
  17. 2
      lyra2/lyra2REv2.cu
  18. 7
      miner.h
  19. 2
      myriadgroestl.cpp
  20. 2
      neoscrypt/neoscrypt.cpp
  21. 2
      pentablake.cu
  22. 2
      quark/nist5.cu
  23. 2
      quark/quarkcoin.cu
  24. 2
      qubit/deep.cu
  25. 2
      qubit/luffa.cu
  26. 2
      qubit/qubit.cu
  27. 4
      sia/sia.cu
  28. 2
      skein.cu
  29. 2
      skein2.cpp
  30. 6
      util.cpp
  31. 2
      x11/c11.cu
  32. 2
      x11/fresh.cu
  33. 2
      x11/s3.cu
  34. 1
      x11/sib.cu
  35. 1
      x11/veltor.cu
  36. 2
      x11/x11.cu
  37. 2
      x11/x11evo.cu
  38. 2
      x13/x13.cu
  39. 2
      x15/whirlpool.cu
  40. 2
      x15/x14.cu
  41. 2
      x15/x15.cu
  42. 2
      x17/x17.cu
  43. 2
      zr5.cu

2
Algo256/blake256.cu

@ -561,6 +561,8 @@ extern "C" int scanhash_blake256(int thr_id, struct work* work, uint32_t max_non
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhashcpu[6] > Htarg) { else if (vhashcpu[6] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

4
Algo256/blake2s.cu

@ -529,7 +529,9 @@ extern "C" int scanhash_blake2s(int thr_id, struct work *work, uint32_t max_nonc
} }
pdata[19] = max(work->nonces[0], work->nonces[1]); // next scan start pdata[19] = max(work->nonces[0], work->nonces[1]); // next scan start
return rc; return rc;
} else if (vhashcpu[7] > ptarget[7]) { } else if (vhashcpu[6] > ptarget[6]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", resNonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", resNonces[0]);
} }
} }

2
Algo256/bmw.cu

@ -100,6 +100,8 @@ extern "C" int scanhash_bmw(int thr_id, struct work* work, uint32_t max_nonce, u
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

4
Algo256/decred.cu

@ -435,12 +435,16 @@ extern "C" int scanhash_decred(int thr_id, struct work* work, uint32_t max_nonce
work->nonces[0], work->sharediff[0], n, work->nonces[1], work->sharediff[1]); work->nonces[0], work->sharediff[0], n, work->nonces[1], work->sharediff[1]);
} else if (vhash[6] > ptarget[6]) { } else if (vhash[6] > ptarget[6]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result %u for %08x does not validate on CPU!", n, resNonces[n]); gpulog(LOG_WARNING, thr_id, "result %u for %08x does not validate on CPU!", n, resNonces[n]);
} }
} }
return work->valid_nonces; return work->valid_nonces;
} else if (vhash[6] > ptarget[6]) { } else if (vhash[6] > ptarget[6]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", resNonces[1]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", resNonces[1]);
} }
} }

2
Algo256/keccak256.cu

@ -91,6 +91,8 @@ extern "C" int scanhash_keccak256(int thr_id, struct work* work, uint32_t max_no
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
Algo256/vanilla.cu

@ -451,6 +451,8 @@ extern "C" int scanhash_vanilla(int thr_id, struct work* work, uint32_t max_nonc
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhashcpu[6] > Htarg) { else if (vhashcpu[6] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", h_resNonce[thr_id][0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", h_resNonce[thr_id][0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
JHA/jackpotcoin.cu

@ -245,6 +245,8 @@ extern "C" int scanhash_jackpot(int thr_id, struct work *work, uint32_t max_nonc
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

10
api.cpp

@ -129,11 +129,6 @@ static void gpustatus(int thr_id)
cgpu->gpu_power = gpu_power(cgpu); // mWatts cgpu->gpu_power = gpu_power(cgpu); // mWatts
cgpu->gpu_plimit = gpu_plimit(cgpu); // mW or % cgpu->gpu_plimit = gpu_plimit(cgpu); // mW or %
#endif #endif
// todo: per gpu
cgpu->accepted = p->accepted_count;
cgpu->rejected = p->rejected_count;
cgpu->khashes = stats_get_speed(thr_id, 0.0) / 1000.0; cgpu->khashes = stats_get_speed(thr_id, 0.0) / 1000.0;
if (cgpu->monitor.gpu_power) { if (cgpu->monitor.gpu_power) {
cgpu->gpu_power = cgpu->monitor.gpu_power; cgpu->gpu_power = cgpu->monitor.gpu_power;
@ -148,13 +143,14 @@ static void gpustatus(int thr_id)
"POWER=%u;FAN=%hu;RPM=%hu;" "POWER=%u;FAN=%hu;RPM=%hu;"
"FREQ=%u;MEMFREQ=%u;GPUF=%u;MEMF=%u;" "FREQ=%u;MEMFREQ=%u;GPUF=%u;MEMF=%u;"
"KHS=%.2f;KHW=%.5f;PLIM=%u;" "KHS=%.2f;KHW=%.5f;PLIM=%u;"
"HWF=%d;I=%.1f;THR=%u|", "ACC=%u;REJ=%u;HWF=%u;I=%.1f;THR=%u|",
gpuid, cgpu->gpu_bus, card, cgpu->gpu_temp, gpuid, cgpu->gpu_bus, card, cgpu->gpu_temp,
cgpu->gpu_power, cgpu->gpu_fan, cgpu->gpu_fan_rpm, cgpu->gpu_power, cgpu->gpu_fan, cgpu->gpu_fan_rpm,
cgpu->gpu_clock/1000, cgpu->gpu_memclock/1000, // base freqs in MHz cgpu->gpu_clock/1000, cgpu->gpu_memclock/1000, // base freqs in MHz
cgpu->monitor.gpu_clock, cgpu->monitor.gpu_memclock, // current cgpu->monitor.gpu_clock, cgpu->monitor.gpu_memclock, // current
cgpu->khashes, khashes_per_watt, cgpu->gpu_plimit, cgpu->khashes, khashes_per_watt, cgpu->gpu_plimit,
cgpu->hw_errors, cgpu->intensity, cgpu->throughput); cgpu->accepted, (unsigned) cgpu->rejected, (unsigned) cgpu->hw_errors,
cgpu->intensity, cgpu->throughput);
// append to buffer for multi gpus // append to buffer for multi gpus
strcat(buffer, buf); strcat(buffer, buf);

4
ccminer.cpp

@ -2183,6 +2183,8 @@ static void *miner_thread(void *userdata)
if (err != cudaSuccess && !opt_quiet) if (err != cudaSuccess && !opt_quiet)
gpulog(LOG_WARNING, thr_id, "%s", cudaGetErrorString(err)); gpulog(LOG_WARNING, thr_id, "%s", cudaGetErrorString(err));
work.valid_nonces = 0;
/* scan nonces for a proof-of-work hash */ /* scan nonces for a proof-of-work hash */
switch (opt_algo) { switch (opt_algo) {
@ -2447,6 +2449,8 @@ static void *miner_thread(void *userdata)
if (firstwork_time == 0) if (firstwork_time == 0)
firstwork_time = time(NULL); firstwork_time = time(NULL);
if (cgpu) cgpu->accepted += work.valid_nonces;
/* if nonce found, submit work */ /* if nonce found, submit work */
if (rc > 0 && !opt_benchmark) { if (rc > 0 && !opt_benchmark) {
uint32_t curnonce = nonceptr[0]; // current scan position uint32_t curnonce = nonceptr[0]; // current scan position

4
crypto/cryptolight.cu

@ -119,11 +119,13 @@ extern "C" int scanhash_cryptolight(int thr_id, struct work* work, uint32_t max_
res++; res++;
work->nonces[1] = resNonces[1]; work->nonces[1] = resNonces[1];
} else if (vhash[7] > Htarg) { } else if (vhash[7] > Htarg) {
gpulog(LOG_WARNING, thr_id, "result for second nonce %08x does not validate on CPU!", resNonces[1]); gpu_increment_reject(thr_id);
} }
} }
goto done; goto done;
} else if (vhash[7] > Htarg) { } else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for nonce %08x does not validate on CPU!", resNonces[0]); gpulog(LOG_WARNING, thr_id, "result for nonce %08x does not validate on CPU!", resNonces[0]);
} }
} }

4
crypto/cryptonight.cu

@ -135,10 +135,14 @@ extern "C" int scanhash_cryptonight(int thr_id, struct work* work, uint32_t max_
if(vhash[7] <= Htarg && fulltest(vhash, ptarget)) { if(vhash[7] <= Htarg && fulltest(vhash, ptarget)) {
res++; res++;
work->nonces[1] = resNonces[1]; work->nonces[1] = resNonces[1];
} else {
gpu_increment_reject(thr_id);
} }
} }
goto done; goto done;
} else if (vhash[7] > Htarg) { } else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for nonce %08x does not validate on CPU!", resNonces[0]); gpulog(LOG_WARNING, thr_id, "result for nonce %08x does not validate on CPU!", resNonces[0]);
} }
} }

4
crypto/wildkeccak.cu

@ -318,6 +318,10 @@ extern "C" int scanhash_wildkeccak(int thr_id, struct work* work, uint32_t max_n
} }
work->valid_nonces = 1; work->valid_nonces = 1;
return 1; return 1;
} else if (vhash[7] > ptarget[7]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for nonce %08x does not validate on CPU!", h_retnonce[0]);
} }
} }

17
groestlcoin.cpp

@ -61,25 +61,28 @@ int scanhash_groestlcoin(int thr_id, struct work *work, uint32_t max_nonce, unsi
groestlcoin_cpu_setBlock(thr_id, endiandata, (void*)ptarget); groestlcoin_cpu_setBlock(thr_id, endiandata, (void*)ptarget);
do { do {
uint32_t foundNounce = UINT32_MAX; memset(work->nonces, 0xff, sizeof(work->nonces));
*hashes_done = pdata[19] - start_nonce + throughput; *hashes_done = pdata[19] - start_nonce + throughput;
// GPU hash // GPU hash
groestlcoin_cpu_hash(thr_id, throughput, pdata[19], &foundNounce); groestlcoin_cpu_hash(thr_id, throughput, pdata[19], &work->nonces[0]);
if (foundNounce < UINT32_MAX && bench_algo < 0) if (work->nonces[0] < UINT32_MAX && bench_algo < 0)
{ {
uint32_t _ALIGN(64) vhash[8]; uint32_t _ALIGN(64) vhash[8];
endiandata[19] = swab32(foundNounce); endiandata[19] = swab32(work->nonces[0]);
groestlhash(vhash, endiandata); groestlhash(vhash, endiandata);
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) { if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) {
work->valid_nonces = 1;
work_set_target_ratio(work, vhash); work_set_target_ratio(work, vhash);
pdata[19] = foundNounce; pdata[19] = work->nonces[0] + 1; // cursor
return true; return work->valid_nonces;
} else if (vhash[7] > ptarget[7]) { } else if (vhash[7] > ptarget[7]) {
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", foundNounce); gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
} }
} }

2
heavy/heavy.cu

@ -296,6 +296,8 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
pdata[19] += nonce - pdata[19]; pdata[19] += nonce - pdata[19];
heavycoin_hash((uchar*)vhash, (uchar*)pdata, blocklen); heavycoin_hash((uchar*)vhash, (uchar*)pdata, blocklen);
if (memcmp(vhash, foundhash, 32)) { if (memcmp(vhash, foundhash, 32)) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", nonce); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", nonce);
} else { } else {
work_set_target_ratio(work, vhash); work_set_target_ratio(work, vhash);

2
lbry/lbry.cu

@ -201,6 +201,8 @@ extern "C" int scanhash_lbry(int thr_id, struct work *work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", resNonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", resNonces[0]);
cudaMemset(d_resNonce[thr_id], 0xFF, 2 * sizeof(uint32_t)); cudaMemset(d_resNonce[thr_id], 0xFF, 2 * sizeof(uint32_t));
} }

2
lyra2/lyra2RE.cu

@ -155,6 +155,8 @@ extern "C" int scanhash_lyra2(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
lyra2/lyra2REv2.cu

@ -162,6 +162,8 @@ extern "C" int scanhash_lyra2v2(int thr_id, struct work* work, uint32_t max_nonc
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

7
miner.h

@ -360,6 +360,7 @@ extern void free_scrypt_jane(int thr_id);
/* api related */ /* api related */
void *api_thread(void *userdata); void *api_thread(void *userdata);
void api_set_throughput(int thr_id, uint32_t throughput); void api_set_throughput(int thr_id, uint32_t throughput);
void gpu_increment_reject(int thr_id);
struct monitor_info { struct monitor_info {
uint32_t gpu_temp; uint32_t gpu_temp;
@ -377,9 +378,9 @@ struct monitor_info {
struct cgpu_info { struct cgpu_info {
uint8_t gpu_id; uint8_t gpu_id;
uint8_t thr_id; uint8_t thr_id;
int accepted; uint16_t hw_errors;
int rejected; unsigned accepted;
int hw_errors; uint32_t rejected;
double khashes; double khashes;
int has_monitoring; int has_monitoring;
float gpu_temp; float gpu_temp;

2
myriadgroestl.cpp

@ -94,6 +94,8 @@ int scanhash_myriad(int thr_id, struct work *work, uint32_t max_nonce, unsigned
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > ptarget[7]) { else if (vhash[7] > ptarget[7]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
neoscrypt/neoscrypt.cpp

@ -86,6 +86,8 @@ int scanhash_neoscrypt(int thr_id, struct work* work, uint32_t max_nonce, unsign
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "nonce %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "nonce %08x does not validate on CPU!", work->nonces[0]);
} }
} }

2
pentablake.cu

@ -123,6 +123,8 @@ extern "C" int scanhash_pentablake(int thr_id, struct work *work, uint32_t max_n
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
quark/nist5.cu

@ -138,6 +138,8 @@ extern "C" int scanhash_nist5(int thr_id, struct work *work, uint32_t max_nonce,
goto out; goto out;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
quark/quarkcoin.cu

@ -289,6 +289,8 @@ extern "C" int scanhash_quark(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > ptarget[7]) { else if (vhash[7] > ptarget[7]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
qubit/deep.cu

@ -120,6 +120,8 @@ extern "C" int scanhash_deep(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
qubit/luffa.cu

@ -96,6 +96,8 @@ extern "C" int scanhash_luffa(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
qubit/qubit.cu

@ -136,6 +136,8 @@ extern "C" int scanhash_qubit(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

4
sia/sia.cu

@ -244,6 +244,8 @@ int scanhash_sia(int thr_id, struct work *work, uint32_t max_nonce, unsigned lon
work->valid_nonces++; work->valid_nonces++;
pdata[8] = work->nonces[0] + 1; pdata[8] = work->nonces[0] + 1;
} }
} else {
gpu_increment_reject(thr_id);
} }
if (work->nonces[1] != UINT32_MAX) { if (work->nonces[1] != UINT32_MAX) {
@ -263,6 +265,8 @@ int scanhash_sia(int thr_id, struct work *work, uint32_t max_nonce, unsigned lon
work->valid_nonces++; work->valid_nonces++;
pdata[8] = work->nonces[1] + 1; pdata[8] = work->nonces[1] + 1;
} }
} else {
gpu_increment_reject(thr_id);
} }
} }
if (work->valid_nonces) { if (work->valid_nonces) {

2
skein.cu

@ -439,6 +439,8 @@ extern "C" int scanhash_skeincoin(int thr_id, struct work* work, uint32_t max_no
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > ptarget[7]) { else if (vhash[7] > ptarget[7]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
skein2.cpp

@ -110,6 +110,8 @@ int scanhash_skein2(int thr_id, struct work* work, uint32_t max_nonce, unsigned
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > ptarget[7]) { else if (vhash[7] > ptarget[7]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

6
util.cpp

@ -1628,6 +1628,12 @@ static bool stratum_get_algo(struct stratum_ctx *sctx, json_t *id, json_t *param
extern char driver_version[32]; extern char driver_version[32];
extern int cuda_arch[MAX_GPUS]; extern int cuda_arch[MAX_GPUS];
void gpu_increment_reject(int thr_id)
{
struct cgpu_info *gpu = &thr_info[thr_id].gpu;
if (gpu) gpu->rejected++;
}
static bool json_object_set_error(json_t *result, int code, const char *msg) static bool json_object_set_error(json_t *result, int code, const char *msg)
{ {
json_t *val = json_object(); json_t *val = json_object();

2
x11/c11.cu

@ -204,6 +204,8 @@ extern "C" int scanhash_c11(int thr_id, struct work* work, uint32_t max_nonce, u
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x11/fresh.cu

@ -149,6 +149,8 @@ extern "C" int scanhash_fresh(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
} }
} }

2
x11/s3.cu

@ -142,6 +142,8 @@ extern "C" int scanhash_s3(int thr_id, struct work* work, uint32_t max_nonce, un
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

1
x11/sib.cu

@ -202,6 +202,7 @@ extern "C" int scanhash_sib(int thr_id, struct work* work, uint32_t max_nonce, u
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet) if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;

1
x11/veltor.cu

@ -143,6 +143,7 @@ extern "C" int scanhash_veltor(int thr_id, struct work* work, uint32_t max_nonce
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet) if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", h_resNonce[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", h_resNonce[0]);
cudaMemset(d_resNonce[thr_id], 0xff, NBN*sizeof(uint32_t)); cudaMemset(d_resNonce[thr_id], 0xff, NBN*sizeof(uint32_t));

2
x11/x11.cu

@ -192,6 +192,8 @@ extern "C" int scanhash_x11(int thr_id, struct work* work, uint32_t max_nonce, u
} }
return work->valid_nonces; return work->valid_nonces;
} else { } else {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x11/x11evo.cu

@ -373,6 +373,8 @@ extern "C" int scanhash_x11evo(int thr_id, struct work* work, uint32_t max_nonce
} }
return work->valid_nonces; return work->valid_nonces;
} else if (vhash[7] > Htarg) { } else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x13/x13.cu

@ -208,6 +208,8 @@ extern "C" int scanhash_x13(int thr_id, struct work* work, uint32_t max_nonce, u
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x15/whirlpool.cu

@ -127,6 +127,8 @@ extern "C" int scanhash_whirl(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x15/x14.cu

@ -224,6 +224,8 @@ extern "C" int scanhash_x14(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x15/x15.cu

@ -230,6 +230,8 @@ extern "C" int scanhash_x15(int thr_id, struct work* work, uint32_t max_nonce,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;

2
x17/x17.cu

@ -255,11 +255,13 @@ extern "C" int scanhash_x17(int thr_id, struct work* work, uint32_t max_nonce, u
} }
else if (vhash[7] > Htarg) { else if (vhash[7] > Htarg) {
// x11+ coins could do some random error, but not on retry // x11+ coins could do some random error, but not on retry
gpu_increment_reject(thr_id);
if (!warn) { if (!warn) {
warn++; warn++;
pdata[19] = work->nonces[0] + 1; pdata[19] = work->nonces[0] + 1;
continue; continue;
} else { } else {
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
warn = 0; warn = 0;
} }

2
zr5.cu

@ -468,6 +468,8 @@ extern "C" int scanhash_zr5(int thr_id, struct work *work,
return work->valid_nonces; return work->valid_nonces;
} }
else if (vhash[7] > ptarget[7]) { else if (vhash[7] > ptarget[7]) {
gpu_increment_reject(thr_id);
if (!opt_quiet)
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]); gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", work->nonces[0]);
pdata[0] = oldp0; pdata[0] = oldp0;
} }

Loading…
Cancel
Save