diff --git a/eth/main.cpp b/eth/main.cpp index 2d79f4954..15041d651 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -612,6 +612,7 @@ int main(int argc, char** argv) else if (arg == "--opencl-device" && i + 1 < argc) try { openclDevice = stol(argv[++i]); + miningThreads = 1; } catch (...) { diff --git a/libethcore/Ethash.cpp b/libethcore/Ethash.cpp index c40ce2625..66dc953b7 100644 --- a/libethcore/Ethash.cpp +++ b/libethcore/Ethash.cpp @@ -311,7 +311,7 @@ void Ethash::GPUMiner::workLoop() auto p = EthashAux::params(m_minerSeed); auto cb = [&](void* d) { EthashAux::full(m_minerSeed, bytesRef((byte*)d, p.full_size)); }; - unsigned device = instances() > 0 ? index() : s_deviceId; + unsigned device = instances() > 1 ? index() : s_deviceId; m_miner->init(p, cb, 32, s_platformId, device); }