sgminer-dev / sgminer

Scrypt GPU miner
GNU General Public License v3.0
632 stars 827 forks source link

device option and on-fly algo changing. sgminer 5_0 #249

Closed tupieurods closed 10 years ago

tupieurods commented 10 years ago

If i'm using on-fly algo changing and "device" option i have zero hashrate, and sgminer closes after 1-2 minute. As i understand it's windows only issue. Recently i had that only on my pc, now i have confirmation from two different people: (eng forum): line of discussion: https://bitcointalk.org/index.php?topic=632503.msg7217688#msg7217688 https://bitcointalk.org/index.php?topic=632503.msg7217691#msg7217691 https://bitcointalk.org/index.php?topic=632503.msg7217882#msg7217882 <- most important message and russian forum: http://club.dns-shop.ru/forum/?p=956&action=thread&id=80145#926976

Also, why if in conf i write: "pool-algorithm" : "marucoin-mod,marucoin-modold" sgminer ignores it and use scrypt, looks like it's don't understand different pool-algorithm for different cards.

mrbrdo commented 10 years ago

"pool-algorithm" does not support multiple algorithms ("per-GPU"). Only a single one.

As far as the other issues you write, did you try the new build that nicehash released today? Or any Windows build that is from today/yesterday? It might fix this issue and also improve stability. Let me know, otherwise we will look into it more, but we need the output of sgminer when this happens (preferably in debug mode "-T -D" or verbose "-T -v", you can omit "-T" if you really need the ncurses interface).

tupieurods commented 10 years ago

Build from latest sources(~40 min ago, built by my own) My config: http://pastebin.com/ytzD30dk log_nice(sgminer.conf without "device":'0"): http://pastebin.com/KTkwqURh log_boo(sgminer.conf with "device":'0"): http://pastebin.com/3NE5tFF9

tupieurods commented 10 years ago

Sorry, wrong button.

mrbrdo commented 10 years ago

@tupieurods as far as I can see, something else is shutting off sgminer, it doesn't seem to be shutting down itself. Are you running CGWatcher?

As far as the device hashing 0 problem, will have to check that. I am going to vacations until 25th so someone else might want to take a look.

tupieurods commented 10 years ago

No. ctrl+C shutting sgminer). Current build doesn't shutting down himself, maybe that part fixed.

mrbrdo commented 10 years ago

That's pretty important information, please remember to mention things like that.

tupieurods commented 10 years ago

Works fine, if i use this option:

"remove-disabled" : true

temporary fix, until this bug isn't fixed in code.

tupieurods commented 10 years ago

got it, problem is here: https://github.com/sgminer-dev/sgminer/blob/v5_0/sgminer.c#L6167-L6194

If we disable some device, algo_switch_n will be always lower than mining_threads, because in the end algo_switch_n equal to number of mining threads in real using.

We should add one more variable with number of mining threads in real using and change it every time, when we set device state enabled/disabled.

I found device some of state changes here: https://github.com/sgminer-dev/sgminer/blob/v5_0/sgminer.c#L8027-L8043 https://github.com/sgminer-dev/sgminer/blob/v5_0/sgminer.c#L6624-L6628 https://github.com/sgminer-dev/sgminer/blob/v5_0/sgminer.c#L6558-L6564 https://github.com/sgminer-dev/sgminer/blob/v5_0/driver-opencl.c#L1238-L1258 https://github.com/sgminer-dev/sgminer/blob/v5_0/driver-opencl.c#L848-L861 https://github.com/sgminer-dev/sgminer/blob/v5_0/api.c#L1994-L2025

Maybe i missed something or some items in the list isn't correct and we shouldn't change number of real mining threads in some of them.

ystarnaud commented 10 years ago

@tupieurods I ran into this issue while testing my config-parser updates with per-pool devices on/off. Wish i has seen your post sooner because it would have saved me a headache debugging it.

Here's my solution in one of my commits:

https://github.com/ystarnaud/sgminer/commit/db6e4d3c73ec6b3f842d6b244c4e8c1baaced9bd#diff-ccb83336fe4e8722c874e79c5c4c4dddR5905

veox commented 10 years ago

Config parser has been merged into branch v5_0, see if it solved the issue.

mrbrdo commented 10 years ago

@tupieurods if the above fix did not resolve the issue for you please comment/reopen.

tupieurods commented 10 years ago

Fixed.