From e9b88b45e4888ed3bdd02ddd8af22fb1da470999 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Mon, 2 Nov 2015 17:51:56 +0100 Subject: [PATCH] prepare the 1.7 release --- README.txt | 10 ++++++---- bench.cpp | 4 +--- ccminer.cpp | 2 ++ configure.ac | 2 +- cpuminer-config.h | 6 +++--- cuda.cpp | 6 ++++++ miner.h | 1 + qubit/qubit.cu | 15 ++++++++++----- 8 files changed, 30 insertions(+), 16 deletions(-) diff --git a/README.txt b/README.txt index 4c1c0b7..107248e 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ -ccMiner release 1.6.6 (Aug 2015) "Lyra2REv2, BMW And Vanilla" +ccMiner release 1.7.0 (Nov 2015) "Mining Diff & basic MultiAlgo" --------------------------------------------------------------- *************************************************************** @@ -228,11 +228,13 @@ features. >>> RELEASE HISTORY <<< - Under Dev... v1.7 + Nov. 02nd 2015 v1.7 + Improve old devices compatibility (x11, lyra2, qubit...) Add windows support for SM 2.1 and drop SM 3.5 (x86) - Improve lyra2 (v1/v2) cuda implementation + Improve lyra2 (v1/v2) cuda implementations + Improve most common algos on SM5+ with sp blake kernel Restore whirlpool algo (and whirlcoin variant) - Prepare algo switch ability + Prepare algo/pool switch ability, trivial method Add --benchmark alone to run a benchmark for all algos Add --cuda-schedule parameter Add --show-diff parameter, which display shares diff, diff --git a/bench.cpp b/bench.cpp index 0a3fdf3..0256151 100644 --- a/bench.cpp +++ b/bench.cpp @@ -77,9 +77,6 @@ void algo_free_all(int thr_id) //free_sha256d(thr_id); free_scrypt(thr_id); free_scrypt_jane(thr_id); - - // warn on cuda error - CUDA_LOG_ERROR(); } // benchmark all algos (called once per mining thread) @@ -118,6 +115,7 @@ bool bench_algo_switch_next(int thr_id) // free current algo memory and track mem usage mused = cuda_available_memory(thr_id); algo_free_all(thr_id); + CUDA_LOG_ERROR(); // device can take some time to free mfree = cuda_available_memory(thr_id); diff --git a/ccminer.cpp b/ccminer.cpp index 84bf772..08d67bf 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -1636,6 +1636,8 @@ static void *miner_thread(void *userdata) // free gpu resources algo_free_all(thr_id); + // clear any free error (algo switch) + cuda_clear_lasterror(); // conditional pool switch if (num_pools > 1 && conditional_pool_rotate) { diff --git a/configure.ac b/configure.ac index 8370b3e..8001fdf 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([ccminer], [1.7-dev]) +AC_INIT([ccminer], [1.7]) AC_PREREQ([2.59c]) AC_CANONICAL_SYSTEM diff --git a/cpuminer-config.h b/cpuminer-config.h index 230750b..ce9cced 100644 --- a/cpuminer-config.h +++ b/cpuminer-config.h @@ -162,7 +162,7 @@ #define PACKAGE_NAME "ccminer" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "ccminer 1.7-dev" +#define PACKAGE_STRING "ccminer 1.7" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "ccminer" @@ -171,7 +171,7 @@ #define PACKAGE_URL "http://github.com/tpruvot/ccminer" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.7-dev" +#define PACKAGE_VERSION "1.7" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -185,7 +185,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.7-dev" +#define VERSION "1.7" /* Define curl_free() as free() if our version of curl lacks curl_free. */ /* #undef curl_free */ diff --git a/cuda.cpp b/cuda.cpp index a9ba63b..ffbec5b 100644 --- a/cuda.cpp +++ b/cuda.cpp @@ -201,6 +201,12 @@ void cuda_log_lasterror(int thr_id, const char* func, int line) gpulog(LOG_WARNING, thr_id, "%s:%d %s", func, line, cudaGetErrorString(err)); } +// Clear any cuda error in non-cuda unit (.c/.cpp) +void cuda_clear_lasterror() +{ + cudaGetLastError(); +} + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/miner.h b/miner.h index 8f57126..4c4e367 100644 --- a/miner.h +++ b/miner.h @@ -494,6 +494,7 @@ uint32_t cuda_default_throughput(int thr_id, uint32_t defcount); #define device_intensity(t,f,d) cuda_default_throughput(t,d) void cuda_log_lasterror(int thr_id, const char* func, int line); +void cuda_clear_lasterror(); #define CUDA_LOG_ERROR() cuda_log_lasterror(thr_id, __func__, __LINE__) #define CL_N "\x1B[0m" diff --git a/qubit/qubit.cu b/qubit/qubit.cu index 075bc88..de72f51 100644 --- a/qubit/qubit.cu +++ b/qubit/qubit.cu @@ -23,6 +23,8 @@ extern void qubit_luffa512_cpu_hash_80(int thr_id, uint32_t threads, uint32_t st extern "C" void qubithash(void *state, const void *input) { + uint8_t _ALIGN(128) hash[64]; + // luffa1-cubehash2-shavite3-simd4-echo5 sph_luffa512_context ctx_luffa; @@ -31,8 +33,6 @@ extern "C" void qubithash(void *state, const void *input) sph_simd512_context ctx_simd; sph_echo512_context ctx_echo; - uint8_t hash[64]; - sph_luffa512_init(&ctx_luffa); sph_luffa512 (&ctx_luffa, input, 80); sph_luffa512_close(&ctx_luffa, (void*) hash); @@ -68,7 +68,7 @@ extern "C" int scanhash_qubit(int thr_id, struct work* work, uint32_t max_nonce, if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce); if (opt_benchmark) - ((uint32_t*)ptarget)[7] = 0x0000ff; + ptarget[7] = 0x007f; if (!init[thr_id]) { @@ -133,11 +133,16 @@ extern "C" int scanhash_qubit(int thr_id, struct work* work, uint32_t max_nonce, } } + if ((uint64_t) throughput + pdata[19] >= max_nonce) { + pdata[19] = max_nonce; + break; + } + pdata[19] += throughput; - } while (pdata[19] < max_nonce && !work_restart[thr_id].restart); + } while (!work_restart[thr_id].restart); - *hashes_done = pdata[19] - first_nonce + 1; + *hashes_done = pdata[19] - first_nonce; return 0; }