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

310 Commits

Author SHA1 Message Date
Znort 987
92af1925a6 Remove benchmark data from main.c 2011-08-15 15:08:13 +02:00
Znort 987
8256402a63 Remove harmless warning on win32 2011-08-15 14:58:36 +02:00
Znort 987
593022dfd7 Added somme comments 2011-08-15 14:00:09 +02:00
Znort 987
e923ac78d5 Add CPU algo used to summary 2011-08-15 13:59:44 +02:00
Znort 987
4e3f38d047 Re-indent code for fork_monitor 2011-08-15 13:59:07 +02:00
Znort 987
39bdec8bbe Various minor changes
- Fixed a type bug on 32bit platform in algo bench
	- Some re-indenting
2011-08-15 13:58:30 +02:00
Znort 987
75639da1e3 Add WIN32 safe CPU benchmark method
Method for WIN32

	- Add a hidden '--bench-algo' option to cgminer that only
          benchmarks the specified algorithm.

	- Create a chunk of shared mem

	- Launch a new instance of cgminer with --bench-algo, and
          act as a debugger for it to silently catch crashes.

	- Once it completes, either successfully or because of a
	  crash, read benchmarked value from shared mem
2011-08-15 13:55:00 +02:00
Znort 987
84b0467cb2 Fix broken assert in algo bencher 2011-08-15 13:53:15 +02:00
Znort 987
6fd06387b3 On unix, make algo benchmark more generic 2011-08-15 13:51:48 +02:00
Znort 987
01886493cf Add set_non_blocking routing
In preparation for upcoming generic unix automated
    algorithm benchmark method (as opposed to linux specific),
    add a utility method.
2011-08-15 13:49:26 +02:00
Znort 987
29f0f9bc18 Properly detect number of cores on WIN32 2011-08-15 13:48:17 +02:00
Znort 987
7158f9f9ed Add automated benchmark of the CPU hashers
The --algo switch now accepts the "auto" argument.

    When "auto" is passed to --algo, cgminer starts by benchmarking
    all the CPU algorithms it nows about and picks the fastest.

    This is useful for benchmarking, but also for folks who run
    cgminer on a large number of heterogeneous computers because
    it saves them from having to configure each instance optimally.

    Caveat emptor: depending on the platform, some algorithms will
    fail with "illegal instruction" (e.g. via padlock code on non via
    platforms, or SSE4 code on non SSE4 platforms).

    To protect against this, cgminer runs the benchmarks in a child
    process. The crash, if any occurs in the child, and the parent
    marks this algo as "fails" and continues benchmarking the next
    algorithm.

    Unfortunately, this safeguard is only implemented for Linux
    because I have no clue how to do this on win32 (nor access to
    a win32 box).
2011-08-15 13:47:50 +02:00
Con Kolivas
50504ef9e0 If a work item has had any mining done on it, don't consider it discarded work. 2011-08-14 13:57:58 +10:00
Con Kolivas
656067a44e Stale work test should respect age of rolled work as well. 2011-08-14 12:30:50 +10:00
Con Kolivas
232408050c Stick to rolling only work from the current pool unless we're in load balance mode or lagging to avoid aggressive rolling imitating load balancing. 2011-08-14 11:35:53 +10:00
Con Kolivas
01aadda25c Simply set the time of day when the work is decoded. 2011-08-14 11:24:38 +10:00
Con Kolivas
639d38fbd4 Revert "Make sure to give work items a starting time only once when they're staged."
This reverts commit 626ae10d7c.

Failed to address all work items.
2011-08-14 07:54:45 +10:00
Con Kolivas
626ae10d7c Make sure to give work items a starting time only once when they're staged. 2011-08-14 02:33:55 +10:00
Con Kolivas
d6dd5d700b Test each work item to see if it can be rolled instead of per-pool and roll whenever possible, adhering to the 60 second timeout. 2011-08-14 01:54:47 +10:00
Con Kolivas
e9b8344a37 Free all work in one place allowing us to perform actions on it in the future. 2011-08-13 20:56:41 +10:00
Con Kolivas
6da13fb87f Only put the message that a pool is down if not pinging it every minute. 2011-08-13 20:56:34 +10:00
Con Kolivas
510be5c9a4 Summary on exit is sometimes getting lost without a flush of stdout. 2011-08-13 20:56:16 +10:00
Con Kolivas
42c22025d8 The can_roll function fails inappropriately in stale_work. 2011-08-13 20:56:09 +10:00
Con Kolivas
d39e5abfba We can't hit this path since the earlier check for stale work will prevent us ever finding work it can roll here. 2011-08-13 20:56:04 +10:00
Con Kolivas
17e5e17e88 Only consider a pool lagging if we actually need the work and we have none staged despite queue requests stacking up. 2011-08-13 20:55:53 +10:00
Con Kolivas
a466942fd8 When pinging a sick cpu, flush finish and then ping it in a separate thread in the hope it recovers, but without blocking code elsewhere. 2011-08-13 20:55:43 +10:00
Con Kolivas
177e07aed3 Display last initialised time in gpu management info. 2011-08-13 20:55:30 +10:00
Con Kolivas
28880d0dc7 Move the non cl_ variables into the cgpu info struct to allow creating a new cl state on reinit, preserving known GPU variables.
Create a new context from scratch in initCQ in case something was corrupted to maximise our chance of succesfully creating a new worker thread.
2011-08-13 20:54:20 +10:00
Con Kolivas
071a0ad2f1 Preinitialise the devices only once on startup. 2011-08-13 20:50:00 +10:00
Znort 987
2e31e1687c Add missing fflush(stdout) for --ndevs 2011-08-13 20:49:15 +10:00
Znort 987
353789da0b Use tab to indent code instead of spaces 2011-08-13 20:49:02 +10:00
Znort 987
83fa2158d9 Lots more verbiage in error messages 2011-08-13 20:48:46 +10:00
Znort 987
1cbfcba2c1 Disable --monitor-stderr on WIN32 2011-08-13 20:48:30 +10:00
Con Kolivas
467c52bb4a Allocate work from one function to be able to initialise variables added later. 2011-08-13 20:48:03 +10:00
Znort 987
79c989dd48 Add new option: --monitor <cmd>
Option lets user specify a command <cmd> that will get
    forked by cgminer on startup. cgminer's stderr output
    subsequently gets piped directly to this command.

    This permits smart batch monitoring of the miner by a
    baby-sitter log parser while retaining the full benefit
    of the curses interface, e.g. when running cgminer under
    screen.

    Doing the same thing is possible using advanced bash
    redirection paraphernalia, but it is somewhat of a pain,
    especially when running screen'd.

    This option makes things more straightforward.
2011-08-13 20:47:25 +10:00
Con Kolivas
1725a1c021 Fix non-opencl build. 2011-07-30 23:19:53 +10:00
Con Kolivas
bc2976f538 Be more willing to get work from the backup pools if the work is simply being queued faster than it is being retrieved. 2011-07-30 21:56:51 +10:00
Con Kolivas
8f186e61e2 Restart threads by abstracting out the clcontext initialisation and using that instead of probing all cards. 2011-07-30 16:59:54 +10:00
Con Kolivas
411570d348 Revert "Don't use asynchronous work with flushes as it decreases reliability and two threads per GPU achieves the same throughput."
This reverts commit 7223508f7e.

Bad idea. Need to work around sync lineup.
2011-07-30 16:36:19 +10:00
Con Kolivas
decafea0ad Revert "Read buffers only after reading data back now that we're sync."
This reverts commit 5f2c3151b4.

Bad idea. Need to rework around sync lineup.
2011-07-30 16:36:02 +10:00
Con Kolivas
5f2c3151b4 Read buffers only after reading data back now that we're sync. 2011-07-30 16:33:43 +10:00
Con Kolivas
7223508f7e Don't use asynchronous work with flushes as it decreases reliability and two threads per GPU achieves the same throughput. 2011-07-30 16:11:03 +10:00
Con Kolivas
f763b0db10 Don't free up any ram from the dying thread to avoid dereferences. 2011-07-30 14:27:17 +10:00
Con Kolivas
43faa11358 Use correct name in syslog. 2011-07-30 13:37:34 +10:00
Con Kolivas
37115c0e1b RPC call debugging is a mess with \r in it so remove it. 2011-07-30 13:33:52 +10:00
Con Kolivas
59b640870c So we can pthread cancel a stuck thread, but can't pthread join it.
And we can't tq freeze the old queue or we could hang here.
And we need to re-initialise all the opencl contexts so send a test command and if it succeeds reinit the card.
2011-07-30 13:28:25 +10:00
Con Kolivas
74a07eb461 Revert "Send threads message to stop and then send cancel message but don't pthread_join them if they're stuck nor reinit the opencl code to not hang everything."
This reverts commit 62521f3e53.

Not enough to restart a GPU.
2011-07-30 13:14:59 +10:00
Con Kolivas
e100fcc672 Revert "Send ping to wake up new threads."
This reverts commit bf4c3626bc.

Prepare to rollback.
2011-07-30 13:14:47 +10:00
Con Kolivas
bf4c3626bc Send ping to wake up new threads. 2011-07-30 12:00:12 +10:00
Con Kolivas
62521f3e53 Send threads message to stop and then send cancel message but don't pthread_join them if they're stuck nor reinit the opencl code to not hang everything. 2011-07-30 10:16:03 +10:00