1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 22:38:01 +00:00
Commit Graph

282 Commits

Author SHA1 Message Date
ystarnaud
c0515e8fa3 Added alt kernel file option 2014-11-19 11:18:25 +01:00
ystarnaud
b53cc151aa Fix worksize per GPU
Improper use of strtok() on the original config string instead of a copy
resulted in the worksize being cut down to GPU0's worksize only after
first use.
2014-11-17 00:16:02 +01:00
troky
ba9818a707 Fix version display in windows builds (mingw) 2014-11-16 19:52:30 +01:00
troky
32d95dd967 Updated to MSVS 2013 2014-11-16 12:51:58 +01:00
ystarnaud
b3c07acd08 Xn Algorithms Fine Tuning
Added options to fine tune X11-15 algorithms
2014-09-19 18:38:57 +02:00
troky
3ddffaa915 Compatibility fix. 2014-07-21 02:26:39 +02:00
troky
dbe0263c2d Fixed device display when both --device and --remove-disabled options are used. 2014-07-20 18:34:47 +02:00
troky
82b5320f36 Check if mining threads are initialized before restarting them. 2014-07-19 17:44:43 +02:00
Jan Berdajs
5bd2689069 Hard reset only when gpu-threads or devices are changed, but not when algorithm is changed.
Also a little refactor.

Conflicts:
	sgminer.c
2014-07-11 19:06:48 +02:00
Jan Berdajs
deacbdd65e immediately exit threads if doing hard reset 2014-07-11 19:04:07 +02:00
Jan Berdajs
19fcb5eae7 improve locking to prevent race condition
stratum could respond faster than we are able to add the sent share into the hash, which could cause memory leaks
2014-07-11 19:03:53 +02:00
ystarnaud
f8fcbbcd0a Config writer fix
Reworked how the config writer works to properly save the config file.
Sometimes settings would get lost in profiles.

Also changed algorithm switch to only perform a soft reset and lowered
the verbosity of the algorithm switcher.
2014-07-09 14:23:07 -04:00
Jan Berdajs
04722e2517 sshare could have already been free'd by parse_stratum_response in stratum_rthread by the point we reach this code - possible segfault fixed 2014-07-08 05:49:12 +02:00
Jan Berdajs
4a9ee47cd9 Add log-file option to automatically redirect stderr to a file
From bfgminer b0240dd004
2014-07-07 13:16:36 +02:00
Jan Berdajs
0bd7a9ff63 After cancelling a thread (unless it's detached, but mining threads aren't), it is always necessary to join the thread so the system will release resources.
This also simplifies kill_mining a bit.
2014-07-07 12:35:27 +02:00
Jan Berdajs
e33590f37d Thread was never joined because thr_info_cancel sets pth to 0. Should improve mining thread hard reset. 2014-07-07 04:20:41 +02:00
Jan Berdajs
363f52df47 Write to both stderr and console within same console lock "session"
From 7dd230cd8f
2014-07-06 01:30:50 +02:00
Jan Berdajs
2d66c44b42 Add debug-log documentation and enable it by default 2014-07-06 01:21:25 +02:00
Jan Berdajs
eb6f47e503 Add debug-log setting to log everything when stderr is redirected to file
Based on code from BFGMiner
2014-07-06 01:07:32 +02:00
Jan Berdajs
485ec9ac88 rename poorly named variable 2014-07-06 00:03:11 +02:00
troky
b6aefc6ebe Fixed segfault when adding pool profile via ncurses GUI #322 2014-07-04 09:54:29 +02:00
troky
94607ba5c4 Merge pull request #310 from sgminer-dev/v5_0-jansson
Added Jansson as submodule.
2014-07-03 23:02:54 +02:00
Jan Berdajs
30d0a9be78 Deprecating "difficulty-multiplier" setting 2014-07-03 19:30:47 +02:00
troky
74d4cfabb5 Added Janson version string to log output. 2014-07-03 09:56:05 +02:00
Jan Berdajs
27709ced83 Remove now unused temporary fix for algo switch 2014-07-02 21:32:24 +02:00
ystarnaud
69ab3a8cf4 Changed the way hard restart is done for better compatibility with windows pthread. 2014-07-02 15:09:31 -04:00
Jan Berdajs
a0e95b3687 some improvements for the zero-hashrate fix, and more debug output 2014-07-02 19:50:46 +02:00
ystarnaud
cf4aa31be0 Switcher thread fix
Fixed the mining threads block causing the miner to hang on algo
switcher. Thanks @mrbrdo for the help.
2014-07-02 09:25:17 -04:00
ystarnaud
55cd3ec220 Hangup fix
The switcher would hang when no settings needed to be applied and it
tried to tell the mining threads to resume working. Still an issue if
you attempt to switch between two pools that apply settings but don't
perform a hard reset.
2014-07-01 14:48:17 -04:00
ystarnaud
f3a773f279 Merge pull request #307 from sgminer-dev/v5_0-x15
V5 0 x15
2014-07-01 09:06:47 -04:00
troky
dc3ec7907e Thread info struct should be initialized/allocated for disabled devices, too. 2014-07-01 09:24:22 +02:00
ystarnaud
5c9126fd61 X14 Implementation
Added X14 and cleaned up the X13/X15 kernels so all 3 offshoots are in
sync. New option "--hamsi-short" or "hamsi-short":true to add a small
boost. May not work on all GPUs.
2014-07-01 01:33:20 -04:00
Jan Berdajs
1c2de13498 fix broken disabled devices when remove-disabled is set 2014-07-01 02:08:58 +02:00
Jan Berdajs
8f53b7c86c safer 2014-07-01 01:47:14 +02:00
Jan Berdajs
976873ba49 more locks for devices 2014-07-01 01:38:32 +02:00
Jan Berdajs
92deefcbca Fix bad lock 2014-07-01 01:19:07 +02:00
Jan Berdajs
40894db5d2 Changing disabled devices on pool switch is not possible if remove-disabled is set (enabled) 2014-07-01 01:12:14 +02:00
Jan Berdajs
7507790880 GPUs cannot be hotplugged 2014-07-01 01:04:44 +02:00
Jan Berdajs
7f0451336b Refactor and stability improvements when restarting threads
enable_device should not modify mining_threads because this is unsafe after initialization. it is also not necessary in most cases where it is currently used, except in initialization
refactored some of the new restart_mining_threads code and incorporated above change for better stability
properly handle disabled devices in restart_mining_threads when opt_removedisabled is set
total_devices was set incorrectly if the disabled devices were not at the end of devices, so total_devices is now always the number of detected devices, since that is what is in the devices variable
2014-06-30 23:57:02 +02:00
Jan Berdajs
be7d47dcee add lock when accessing mining_threads 2014-06-30 22:12:19 +02:00
Jan Berdajs
028f19e946 remove old commented-out code 2014-06-30 21:54:55 +02:00
Jan Berdajs
ba7c4892fb Remove obsolete benchmark mode
This mode/setting is unusable left-over from SHA-256 cgminer. It does not work with Scrypt or other algorithms that are used in sgminer. Removed in single commit so it can be used as reference, if benchmark mode is added in the future.
2014-06-30 21:44:44 +02:00
ystarnaud
9d54637e3c Fix HW Issue at startup
Fixed an issue where the GPUs would be initialized on first pool alive,
but the mining threads would end up being initialized on another pool
because it was selected right away.
2014-06-30 00:12:12 -04:00
ystarnaud
3ae5f97b94 Algorithm Switcher Update
Updated Algorithm switcher to change on pool rather than on algorithm.
This way if, for example, 2 pools use the same algorithm but different
GPU settings, the settings will be applied when changing pool.

Additionally:
* Included a "common" algorithm type in API pool/profile listing. For
example using "marucoin-mod" will return "X13", "darkcoin-mod" will
return "X11", scrypt + nfactor != 10 will return "NScrypt", etc...

* Added "kernel" config option to be backwards compatible with other
miners' configs.

* Added a few algorithm aliases: x11mod -> darkcoin-mod, x13mod ->
marucoin-mod...

* New config keyword: "includes", which holds an array of include files.
This is to counter the JSON limitation not allowing multiple values with
the same name, thus preventing inclusion of multiple files.
2014-06-28 00:54:17 -04:00
Noel Maersk
78014ab0d5 work queue: verbose log as to why staged work is being discarded. 2014-06-24 19:20:32 +03:00
ystarnaud
7024d14c88 Fix high fan issue at startup/algo switch
Was setting fan speed to gpu_fan (which is the max) instead of min_fan on GPU settings change.
2014-06-24 10:45:43 -04:00
ystarnaud
99082f4269 GPU initialization update
Undo 212009a48a as it caused some issues with some pools and configs.
2014-06-23 20:45:16 -04:00
ystarnaud
212009a48a GPU Initialization update
Moved the GPU initialization block to happen when a pool is actually switched to. Sometimes the first pool alive isn't the first pool switched to. This would result in unnecessary kernel loading if the first pool detected alive isn't used right away.
2014-06-23 17:20:26 -04:00
ystarnaud
76287736e2 Fixed GPU initialization
Fixed the GPU initialization to happen only after the first pool alive is switched to. This way no unnecessary kernels are loaded.
2014-06-23 16:40:34 -04:00
ystarnaud
e9b82991ec 60 second quit fix after algo switch 2014-06-23 12:04:05 -04:00