mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-13 06:01:03 +00:00
Add a --dev-reorder option to only reorder devices according to PCI Bus ID when requested.
This commit is contained in:
parent
09184720c2
commit
5a14ec53c8
3
adl.c
3
adl.c
@ -21,6 +21,7 @@
|
||||
#include "adl_functions.h"
|
||||
|
||||
bool adl_active;
|
||||
bool opt_reorder = false;
|
||||
|
||||
int opt_hysteresis = 3;
|
||||
const int opt_targettemp = 75;
|
||||
@ -263,7 +264,7 @@ void init_adl(int nDevs)
|
||||
}
|
||||
}
|
||||
|
||||
if (devs_match && devices == nDevs) {
|
||||
if (opt_reorder && devs_match && devices == nDevs) {
|
||||
/* Windows has some kind of random ordering for bus number IDs and
|
||||
* ordering the GPUs according to ascending order fixes it. Linux
|
||||
* has usually sequential but decreasing order instead! */
|
||||
|
1
adl.h
1
adl.h
@ -2,6 +2,7 @@
|
||||
#define __ADL_H__
|
||||
#ifdef HAVE_ADL
|
||||
bool adl_active;
|
||||
bool opt_reorder;
|
||||
int opt_hysteresis;
|
||||
const int opt_targettemp;
|
||||
const int opt_overheattemp;
|
||||
|
5
main.c
5
main.c
@ -1564,6 +1564,11 @@ static struct opt_table opt_config_table[] = {
|
||||
OPT_WITHOUT_ARG("--disable-gpu|-G",
|
||||
opt_set_bool, &opt_nogpu,
|
||||
"Disable GPU mining even if suitable devices exist"),
|
||||
#ifdef HAVE_ADL
|
||||
OPT_WITHOUT_ARG("--dev-reorder",
|
||||
opt_set_bool, &opt_reorder,
|
||||
"Attempt to reorder GPU devices according to PCI Bus ID"),
|
||||
#endif
|
||||
#endif
|
||||
OPT_WITH_ARG("--donation",
|
||||
set_float_0_to_99, &opt_show_floatval, &opt_donation,
|
||||
|
Loading…
x
Reference in New Issue
Block a user