Skip to content

Commit

Permalink
replace thr_id with device_map[thr_id]
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausT committed Apr 21, 2015
1 parent 37e96d0 commit bad413e
Show file tree
Hide file tree
Showing 24 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Algo256/blake256.cu
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ extern "C" int scanhash_blake256(int thr_id, uint32_t *pdata, uint32_t *ptarget,
else if (opt_debug) {
applog_hash((uchar*)ptarget);
applog_compare_hash((uchar*)vhashcpu, (uchar*)ptarget);
applog(LOG_DEBUG, "GPU #%d: result for nonce %08x does not validate on CPU!", thr_id, foundNonce);
applog(LOG_DEBUG, "GPU #%d: result for nonce %08x does not validate on CPU!", device_map[thr_id], foundNonce);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Algo256/keccak256.cu
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ extern "C" int scanhash_keccak256(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_nounce[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_nounce[thr_id][1]);
}
}
}
Expand All @@ -118,7 +118,7 @@ extern "C" int scanhash_keccak256(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_nounce[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_nounce[thr_id][0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions bitcoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int scanhash_bitcoin(int thr_id, uint32_t *pdata,
{
if (vhash64[7] > 0)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_nounce[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_nounce[thr_id][1]);
}
}
}
Expand All @@ -188,7 +188,7 @@ int scanhash_bitcoin(int thr_id, uint32_t *pdata,
{
if (vhash64[7] > 0)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_nounce[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_nounce[thr_id][0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cuda_nist5.cu
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ extern "C" int scanhash_nist5(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -161,7 +161,7 @@ extern "C" int scanhash_nist5(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion fuguecoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ extern "C" int scanhash_fugue256(int thr_id, uint32_t *pdata, uint32_t *ptarget,
*hashes_done = foundNounce - start_nonce + 1;
return 1;
} else {
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, foundNounce);
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundNounce);
}
}

Expand Down
4 changes: 2 additions & 2 deletions groestlcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extern "C" int scanhash_groestlcoin(int thr_id, uint32_t *pdata, uint32_t *ptarg
{
if (tmpHash[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNounce[1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNounce[1]);
}
}
}
Expand All @@ -113,7 +113,7 @@ extern "C" int scanhash_groestlcoin(int thr_id, uint32_t *pdata, uint32_t *ptarg
{
if (tmpHash[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNounce[0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNounce[0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lyra2/lyra2RE.cu
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extern "C" int scanhash_lyra2(int thr_id, uint32_t *pdata,
else
{
if (vhash64[7] != Htarg) // don't show message if it is equal but fails fulltest
applog(LOG_WARNING, "GPU #%d: result %08x does not validate on CPU!", thr_id, foundNonce[1]);
applog(LOG_WARNING, "GPU #%d: result %08x does not validate on CPU!", device_map[thr_id], foundNonce[1]);
}
}
pdata[19] = foundNonce[0];
Expand All @@ -147,7 +147,7 @@ extern "C" int scanhash_lyra2(int thr_id, uint32_t *pdata,
else
{
if (vhash64[7] > Htarg) // don't show message if it is equal but fails fulltest
applog(LOG_WARNING, "GPU #%d: result %08x does not validate on CPU!", thr_id, foundNonce[0]);
applog(LOG_WARNING, "GPU #%d: result %08x does not validate on CPU!", device_map[thr_id], foundNonce[0]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions myriadgroestl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extern "C" int scanhash_myriad(int thr_id, uint32_t *pdata, uint32_t *ptarget,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -114,7 +114,7 @@ extern "C" int scanhash_myriad(int thr_id, uint32_t *pdata, uint32_t *ptarget,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pentablake.cu
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ extern "C" int scanhash_pentablake(int thr_id, uint32_t *pdata, uint32_t *ptarge
applog(LOG_WARNING, "GPU #%d: result for nounce %08x is not in range: %x > %x", thr_id, foundNonce, vhashcpu[7], Htarg);
}
else {
applog(LOG_WARNING, "GPU #%d: result for nounce %08x does not validate on CPU!", thr_id, foundNonce);
applog(LOG_WARNING, "GPU #%d: result for nounce %08x does not validate on CPU!", device_map[thr_id], foundNonce);
}
}

Expand Down
6 changes: 3 additions & 3 deletions quark/animecoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,17 @@ extern "C" int scanhash_anime(int thr_id, uint32_t *pdata,

pdata[21] = foundnonces[1];
res++;
if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found second nonce $%08X", thr_id, foundnonces[1]);
if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found second nonce $%08X", device_map[thr_id], foundnonces[1]);
}
}
pdata[19] = foundnonces[0];
if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found nonce $%08X", thr_id, foundnonces[0]);
if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found nonce $%08X", device_map[thr_id], foundnonces[0]);
return res;
}
else
{
if (vhash64[7] != Htarg) // don't show message if it is equal but fails fulltest
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, foundnonces[0]);
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundnonces[0]);
}
}
pdata[19] += throughput; CUDA_SAFE_CALL(cudaGetLastError());
Expand Down
6 changes: 3 additions & 3 deletions quark/quarkcoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata,
{
pdata[21] = foundnonces[1];
res++;
if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found second nonce $%08X", thr_id, foundnonces[1]);
if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found second nonce $%08X", device_map[thr_id], foundnonces[1]);
}
else
{
if (vhash64[7] != Htarg) // don't show message if it is equal but fails fulltest
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, foundnonces[1]);
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundnonces[1]);
}
}
pdata[19] = foundnonces[0];
Expand All @@ -269,7 +269,7 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata,
else
{
if (vhash64[7] != Htarg) // don't show message if it is equal but fails fulltest
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, foundnonces[0]);
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundnonces[0]);
}
}
pdata[19] += throughput; CUDA_SAFE_CALL(cudaGetLastError());
Expand Down
4 changes: 2 additions & 2 deletions qubit/deep.cu
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ extern "C" int scanhash_deep(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -139,7 +139,7 @@ extern "C" int scanhash_deep(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion qubit/doom.cu
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extern "C" int scanhash_doom(int thr_id, uint32_t *pdata,
return 1;
}
else {
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, foundNonce);
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundNonce);
}
}

Expand Down
4 changes: 2 additions & 2 deletions qubit/qubit.cu
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ extern "C" int scanhash_qubit(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -188,7 +188,7 @@ extern "C" int scanhash_qubit(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions skein.cu
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ int scanhash_skeincoin(int thr_id, uint32_t *pdata,
{
int res = 1;
if (opt_debug || opt_benchmark)
applog(LOG_INFO, "GPU #%d: found nonce $%08X", thr_id, foundNonce);
applog(LOG_INFO, "GPU #%d: found nonce $%08X", device_map[thr_id], foundNonce);
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], foundNonce);
if(secNonce != 0)
{
Expand All @@ -437,13 +437,13 @@ int scanhash_skeincoin(int thr_id, uint32_t *pdata,
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget))
{
if (opt_debug || opt_benchmark)
applog(LOG_INFO, "GPU #%d: found nonce $%08X", thr_id, secNonce);
applog(LOG_INFO, "GPU #%d: found nonce $%08X", device_map[thr_id], secNonce);
pdata[19 + res] = swab32_if(secNonce, !swap);
res++;
}
else
{
applog(LOG_WARNING, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, secNonce);
applog(LOG_WARNING, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], secNonce);
}
}
pdata[19] = swab32_if(foundNonce, !swap);
Expand All @@ -452,7 +452,7 @@ int scanhash_skeincoin(int thr_id, uint32_t *pdata,
}
else
{
applog(LOG_WARNING, "GPU #%d: result for nonce $%08X does not validate on CPU!", thr_id, foundNonce);
applog(LOG_WARNING, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundNonce);
pdata[19]++;
}
}
Expand Down
4 changes: 2 additions & 2 deletions x11/fresh.cu
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ extern "C" int scanhash_fresh(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -163,7 +163,7 @@ extern "C" int scanhash_fresh(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions x11/s3.cu
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -153,7 +153,7 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions x11/x11.cu
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ extern "C" int scanhash_x11(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -232,7 +232,7 @@ extern "C" int scanhash_x11(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions x13/x13.cu
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ extern "C" int scanhash_x13(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][1]);
}
}

Expand All @@ -255,7 +255,7 @@ extern "C" int scanhash_x13(int thr_id, uint32_t *pdata,
{
if (vhash64[7] != Htarg)
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, h_found[thr_id][0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], h_found[thr_id][0]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions x15/whirlpool.cu
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ extern "C" int scanhash_whc(int thr_id, uint32_t *pdata,
else
{
if (vhash64[7] != Htarg)
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNonce[1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNonce[1]);
}
}
pdata[19] = foundNonce[0];
Expand All @@ -125,7 +125,7 @@ extern "C" int scanhash_whc(int thr_id, uint32_t *pdata,
else
{
if (vhash64[7] != Htarg)
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNonce[0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNonce[0]);
}
}
pdata[19] += throughput; CUDA_SAFE_CALL(cudaGetLastError());
Expand Down
4 changes: 2 additions & 2 deletions x15/whirlpoolx.cu
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int scanhash_whirlpoolx(int thr_id, uint32_t *pdata, uint32_t *ptarget, uint32_t
else
{
if (vhash64[7] != Htarg)
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNonce[1]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNonce[1]);
}
}
if (opt_benchmark)
Expand All @@ -112,7 +112,7 @@ int scanhash_whirlpoolx(int thr_id, uint32_t *pdata, uint32_t *ptarget, uint32_t
else
{
if(vhash64[7] != Htarg)
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNonce[0]);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNonce[0]);
}
}
pdata[19] += throughput;
Expand Down
4 changes: 2 additions & 2 deletions x15/x14.cu
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ extern "C" int scanhash_x14(int thr_id, uint32_t *pdata,
}
else
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, secNonce);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], secNonce);
}
}
pdata[19] = foundNonce;
Expand All @@ -248,7 +248,7 @@ extern "C" int scanhash_x14(int thr_id, uint32_t *pdata,
}
else
{
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", thr_id, foundNonce);
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNonce);
}
}
pdata[19] += throughput; CUDA_SAFE_CALL(cudaGetLastError());
Expand Down
Loading

0 comments on commit bad413e

Please sign in to comment.