<<" --farm-recheck <n> Leave n ms between checks for changed work (default: 500)."<<endl
<<" --farm-recheck <n> Leave n ms between checks for changed work (default: 500)."<<endl
<<" --no-precompute Don't precompute the next epoch's DAG."<<endl
<<" --no-precompute Don't precompute the next epoch's DAG."<<endl
#endif
#endif
@ -525,12 +548,18 @@ public:
<<" --benchmark-trial <seconds> Set the duration for each trial for the benchmark tests (default: 3)."<<endl
<<" --benchmark-trial <seconds> Set the duration for each trial for the benchmark tests (default: 3)."<<endl
<<" --benchmark-trials <n> Set the duration of warmup for the benchmark tests (default: 5)."<<endl
<<" --benchmark-trials <n> Set the duration of warmup for the benchmark tests (default: 5)."<<endl
<<"Simulation mode:"<<endl
<<"Simulation mode:"<<endl
<<" -S [<n>],--simulation [<n>] Mining test mode. Used to validate kernel optimizations. Optionally specify block number."<<endl
<<" -Z [<n>],--simulation [<n>] Mining test mode. Used to validate kernel optimizations. Optionally specify block number."<<endl
#if ETH_JSONRPC || !ETH_TRUE
#if ETH_JSONRPC || !ETH_TRUE
<<" --phone-home <on/off> When benchmarking, publish results (default: off)"<<endl
<<" --phone-home <on/off> When benchmarking, publish results (default: off)"<<endl
#endif
#endif
<<"DAG creation mode:"<<endl
<<"DAG file management:"<<endl
<<" -D,--create-dag <number> Create the DAG in preparation for mining on given block and exit."<<endl
<<" -D,--create-dag <number> Create the DAG in preparation for mining on given block and exit."<<endl
<<" -R <s>, --dag-dir <s> Store/Load DAG files in/from the specified directory. Useful for running multiple instances with different configurations."<<endl
<<" -E <mode>, --erase-dags <mode> Erase unneeded DAG files. Default is 'none'. Possible values are:"<<endl
<<" none - don't erase DAG files (default)"<<endl
<<" old - erase all DAG files older than current epoch"<<endl
<<" bench - like old, but keep epoch 0 for benchmarking"<<endl
<<" all - erase all DAG files"<<endl
<<"Mining configuration:"<<endl
<<"Mining configuration:"<<endl
<<" -C,--cpu When mining, use the CPU."<<endl
<<" -C,--cpu When mining, use the CPU."<<endl
<<" -G,--opencl When mining use the GPU via OpenCL."<<endl
<<" -G,--opencl When mining use the GPU via OpenCL."<<endl
@ -542,7 +571,6 @@ public:
<<" --allow-opencl-cpu Allows CPU to be considered as an OpenCL device if the OpenCL platform supports it."<<endl
<<" --allow-opencl-cpu Allows CPU to be considered as an OpenCL device if the OpenCL platform supports it."<<endl
<<" --list-devices List the detected OpenCL/CUDA devices and exit."<<endl
<<" --list-devices List the detected OpenCL/CUDA devices and exit."<<endl
<<" --current-block Let the miner know the current block number at configuration time. Will help determine DAG size and required GPU memory."<<endl
<<" --current-block Let the miner know the current block number at configuration time. Will help determine DAG size and required GPU memory."<<endl
<<" -R <s>, --dag-dir <s> Store/Load DAG files in/from the specified directory. Useful for running multiple instances with different configurations."<<endl
#if ETH_ETHASHCL || !ETH_TRUE
#if ETH_ETHASHCL || !ETH_TRUE
<<" --cl-extragpu-mem Set the memory (in MB) you believe your GPU requires for stuff other than mining. Windows rendering e.t.c.."<<endl
<<" --cl-extragpu-mem Set the memory (in MB) you believe your GPU requires for stuff other than mining. Windows rendering e.t.c.."<<endl
<<" --cl-local-work Set the OpenCL local work size. Default is "<<toString(ethash_cl_miner::c_defaultLocalWorkSize)<<endl
<<" --cl-local-work Set the OpenCL local work size. Default is "<<toString(ethash_cl_miner::c_defaultLocalWorkSize)<<endl
@ -553,7 +581,7 @@ public:
<<" --cuda-block-size Set the CUDA block work size. Default is "<<toString(ethash_cuda_miner::c_defaultBlockSize)<<endl
<<" --cuda-block-size Set the CUDA block work size. Default is "<<toString(ethash_cuda_miner::c_defaultBlockSize)<<endl
<<" --cuda-grid-size Set the CUDA grid size. Default is "<<toString(ethash_cuda_miner::c_defaultGridSize)<<endl
<<" --cuda-grid-size Set the CUDA grid size. Default is "<<toString(ethash_cuda_miner::c_defaultGridSize)<<endl
<<" --cuda-streams Set the number of CUDA streams. Default is "<<toString(ethash_cuda_miner::c_defaultNumStreams)<<endl
<<" --cuda-streams Set the number of CUDA streams. Default is "<<toString(ethash_cuda_miner::c_defaultNumStreams)<<endl
<<" --cuda-schedule <mode> Set the schedule mode for CUDA threads waiting for CUDA devices to finish work. Default is sync. Possible values are:"<<endl
<<" --cuda-schedule <mode> Set the schedule mode for CUDA threads waiting for CUDA devices to finish work. Default is 'sync'. Possible values are:"<<endl
<<" auto - Uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. If C > P, then yield else spin."<<endl
<<" auto - Uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. If C > P, then yield else spin."<<endl
<<" spin - Instruct CUDA to actively spin when waiting for results from the device."<<endl
<<" spin - Instruct CUDA to actively spin when waiting for results from the device."<<endl
<<" yield - Instruct CUDA to yield its thread when waiting for results from the device."<<endl
<<" yield - Instruct CUDA to yield its thread when waiting for results from the device."<<endl
@ -569,16 +597,16 @@ public:
private:
private:
voiddoInitDAG(unsigned_n)
voiddoInitDAG(unsigned_n)
{
{
EthashAux::setCustomDirName(s_dagDir);
h256seedHash=EthashAux::seedHash(_n);
h256seedHash=EthashAux::seedHash(_n);
cout<<"Initializing DAG for epoch beginning #"<<(_n/30000*30000)<<" (seedhash "<<seedHash.abridged()<<"). This will take a while."<<endl;
cout<<"Initializing DAG for epoch beginning #"<<(_n/30000*30000)<<" (seedhash "<<seedHash.abridged()<<"). This will take a while."<<endl;
/// Kicks off generation of DAG for @a _blocknumber and blocks until ready; @returns result or empty pointer if not existing and _createIfMissing is false.
/// Kicks off generation of DAG for @a _blocknumber and blocks until ready; @returns result or empty pointer if not existing and _createIfMissing is false.