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

271 Commits

Author SHA1 Message Date
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
ystarnaud
1914cef959 Fixed x13 and other issues
Corrected the x13 errors and fixed a few issues with the config parser's
handling of the default_profile.
2014-06-21 15:18:20 -04:00
Noel Maersk
513307c790 config: remove commented-out old config-loading code. 2014-06-20 20:43:08 +03:00
Noel Maersk
5309da57cc config: remove unused variable. 2014-06-20 16:53:00 +03:00
Noel Maersk
832ac82bf6 Updated API functionality
Fixed addpool to specify a profile or algorithm and sets defaults if
nothing specified. Also added a new API function to change multipool
strategy.

Conflicts (resolved):
	sgminer.c
2014-06-20 16:52:59 +03:00
ystarnaud
d9b4798e8e More options added
Added the following options to profiles/pools:
device (set devices on/off per profile), lookup-gap, shaders, worksize,
gpu-powertune, gpu-vddc
2014-06-20 16:50:06 +03:00
Noel Maersk
9fe5272c92 Updated config writer
Config writer now supports profiles and pool specific values. In
addition, the config writer now makes use of the jansson library to
create proper json objects and save them to the config file. This is
much better than trying to write our own json code.

Conflicts (resolved):
	sgminer.c
2014-06-20 16:49:51 +03:00
Yann St. Arnaud
9faa8fa59f Updated the config parser
Updated the config parser to provide better readability and flexibility
in config files. The latest features introduced a really messy way to
handle config files and this update alleviates this by adding the
ability to create profiles and associate them to pools.

Todo: Update the config file writer, in-program options and continue to
break off the config parsing/command line option code out of sgminer.c
to reduce clutter.
2014-06-20 16:49:07 +03:00
Elbandi
3b298478a3 Made opt_algorithm to simple variable 2014-06-17 18:11:59 +02:00
troky
b2e500e2a6 Fixed pool name display in rejected share notice when pool name is longer than 20 chars. 2014-06-16 15:52:48 +02:00
troky
d83d7bd386 Removed original sha2 and made code use sph_sha2 2014-06-12 13:19:30 +02:00
troky
f9a8e66f70 Fixed crash when changing display modes (#237) 2014-06-11 11:18:36 +02:00