mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-08 21:14:14 +00:00
GPU initialization update
Undo 212009a48aa566415a6531f076146fb8ad2dcbb4 as it caused some issues with some pools and configs.
This commit is contained in:
parent
212009a48a
commit
99082f4269
22
sgminer.c
22
sgminer.c
@ -4072,19 +4072,19 @@ void switch_pools(struct pool *selected)
|
|||||||
applog(LOG_WARNING, "Switching to %s", get_pool_name(pool));
|
applog(LOG_WARNING, "Switching to %s", get_pool_name(pool));
|
||||||
if (pool_localgen(pool) || opt_fail_only)
|
if (pool_localgen(pool) || opt_fail_only)
|
||||||
clear_pool_work(last_pool);
|
clear_pool_work(last_pool);
|
||||||
|
|
||||||
//if startup, initialize gpus and start mining threads
|
|
||||||
if(startup)
|
|
||||||
{
|
|
||||||
startup = false; //remove startup flag so we don't enter this block again
|
|
||||||
applog(LOG_NOTICE, "Startup GPU initialization... Using settings from pool %s.", get_pool_name(pool));
|
|
||||||
|
|
||||||
//apply gpu settings based on first alive pool
|
|
||||||
apply_initial_gpu_settings(pool);
|
|
||||||
gpu_initialized = true; //gpus initialized
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if startup, initialize gpus and start mining threads
|
||||||
|
if(startup)
|
||||||
|
{
|
||||||
|
startup = false; //remove startup flag so we don't enter this block again
|
||||||
|
applog(LOG_NOTICE, "Startup GPU initialization... Using settings from pool %s.", get_pool_name(pool));
|
||||||
|
|
||||||
|
//apply gpu settings based on first alive pool
|
||||||
|
apply_initial_gpu_settings(pool);
|
||||||
|
gpu_initialized = true; //gpus initialized
|
||||||
|
}
|
||||||
|
|
||||||
mutex_lock(&lp_lock);
|
mutex_lock(&lp_lock);
|
||||||
pthread_cond_broadcast(&lp_cond);
|
pthread_cond_broadcast(&lp_cond);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user