main.c


Log

Author Commit Date CI Message
Con Kolivas a2a60080 2011-09-02T09:23:17 Add verbose message when a GPU fails to initialise, and disable the correct GPU.
Con Kolivas 8b690b57 2011-09-02T08:55:09 Give a verbose message when no active pools are found and pause before exiting.
Con Kolivas ed7389e8 2011-09-02T08:35:27 Put some sanity checks on the times that can be input.
Con Kolivas 71eff460 2011-09-01T23:18:31 Mingw32 doesn't support strptime so use sscanf.
Con Kolivas 71ce9bc8 2011-09-01T23:15:42 Print summary on quit modes.
Con Kolivas 84965341 2011-09-01T13:19:51 Add start and stop time scheduling for regular time of day running or once off start/stop options.
Con Kolivas 5aca762a 2011-08-31T16:01:28 Go back to requesting work 2/3 of the way through the current scantime with CPU mining as reports of mining threads running out of work have occurred with only 5 seconds to retrieve work.
Con Kolivas a593afdb 2011-08-31T13:23:36 Use the curses_lock to protect the curses_active variable and test it under lock.
Con Kolivas 81195954 2011-08-31T10:25:28 Fix the bouncing short term value by allowing it to change dynamically when the latest value is very different from the rolling value, but damp the change when it gets close.
Con Kolivas 87ac3a00 2011-08-30T12:40:48 Provide much more smoothing of the short term rates.
Con Kolivas d1a8614e 2011-08-30T10:16:47 Add --failover-only option to not leak work to backup pools when the primary pool is lagging.
Con Kolivas 021b2c0d 2011-08-29T17:19:04 The cpu mining work data can get modified before we copy it if we submit it async, and the sync submission is not truly sync anyway, so just submit it sync.
Con Kolivas af15955b 2011-08-29T15:25:14 Exit with a failed return code if we did not reach opt_shares.
Con Kolivas 8f788ec9 2011-08-29T15:12:12 Add an option to break out after successfully mining a number of accepted shares.
Con Kolivas 510bcc3d 2011-08-29T12:21:37 Disable curses after inputting a pool if we requested no curses interface.
Con Kolivas 4cc08fe4 2011-08-29T12:15:24 Enable curses after the mining threads are set up so that failure messages won't be lost in the curses interface.
Con Kolivas 5c7ea9e5 2011-08-29T11:52:10 Display version information and add --version command line option, and make sure we flush stdout.
Con Kolivas 7d34a6b6 2011-08-29T09:39:06 Statify tv_sort.
Con Kolivas f0cc2932 2011-08-29T01:22:05 Convert the opt queue into a minimum number of work items to have queued instead of an extra number to decrease risk of getting idle devices without increasing risk of higher rejects.
Con Kolivas 3aee066b 2011-08-29T01:07:57 Add options to explicitly enable CPU mining or disable GPU mining.
Con Kolivas ee5b4764 2011-08-29T00:49:04 Don't show value of intensity since it's dynamic by default.
Con Kolivas efa17318 2011-08-29T00:36:42 cgminer no longer supports default url user and pass so remove them.
Con Kolivas fc46d57d 2011-08-28T22:45:33 Return -1 if no input is detected from the menu to prevent it being interpreted as a 0.
Con Kolivas 8d393116 2011-08-28T20:24:17 Reinstate minimum 1 extra in queue to make it extremely unlikely to ever have 0 staged work items and any idle time.
Con Kolivas 8a7b9acd 2011-08-28T14:46:21 Switching between redrawing windows does not fix the crash with old libncurses, so redraw both windows, but only when the window size hasn't changed.
Con Kolivas eb0fa6e5 2011-08-28T07:53:25 Copy cgminer path, not cat it.
Con Kolivas 57c93d7e 2011-08-26T13:02:15 Prevent segfault on exit for when accessory threads don't exist.
Con Kolivas e81a362b 2011-08-25T23:33:41 Bump threshhold for lag up to maximum queued but no staged work.
Con Kolivas 5b488811 2011-08-25T21:49:23 Only consider pool lagging if more than one item is queued.
Con Kolivas 3d5f5554 2011-08-25T14:42:03 Allow a custom kernel path to be entered on the command line.
Con Kolivas 7dc3db23 2011-08-25T11:19:40 Implement SSE2 32 bit assembly algorithm as well.
Con Kolivas a4ec961e 2011-08-25T10:21:49 We can queue all the necessary work without hitting frequent stales now with the time and string stale protection active all the time. This prevents a pool being falsely labelled as not providing work fast enough.
Con Kolivas 81aedc97 2011-08-25T08:10:30 Add message about needing one server.
Con Kolivas f2f0ba80 2011-08-24T23:34:22 Revert "Revert "Since we roll work all the time now, we end up staging a lot of work without queueing, so don't queue if we've already got staged work."" This reverts commit cea1cf6cc0c5100ac332801d9fd596435f27aea7. This wasn't eht cause of the false positives.
Con Kolivas cea1cf6c 2011-08-24T23:26:30 Revert "Since we roll work all the time now, we end up staging a lot of work without queueing, so don't queue if we've already got staged work." This reverts commit b81077f36a74e1c1f58b36a9401245134a8d373a. This creates too many false positives for pool not providing work fast enough.
Con Kolivas 5a2cf5a6 2011-08-24T23:23:09 Get start times just before mining begins to not have very slow rise in average.
Con Kolivas b643b56a 2011-08-24T23:14:52 Allow LP to reset block detect and block detect lp flags to know who really came first.
Con Kolivas 73c98e1e 2011-08-24T22:07:05 Check if there is more than one work item queued before complaining about a slow pool.
Con Kolivas dbf0a136 2011-08-24T21:50:04 Use the new hashes directly for counts instead of the fragile counters currently in use.
Con Kolivas 0899ee86 2011-08-24T20:45:30 Only consider pool slow to respond if we can't even roll work.
Con Kolivas 6197ff20 2011-08-24T20:13:05 Remove silly debugging output.
Con Kolivas 93f4163a 2011-08-24T17:32:36 Create a hash list of all the blocks created and search them to detect when a new block has definitely appeared, using that information to detect stale work and discard it.
Con Kolivas b81077f3 2011-08-24T12:50:44 Since we roll work all the time now, we end up staging a lot of work without queueing, so don't queue if we've already got staged work.
Con Kolivas bf3033e0 2011-08-24T08:23:22 Make restarting of GPUs optional for systems that hang on any attempt to restart them. Fix DEAD status by comparing it to last live time rather than last attempted restart time since that happens every minute.
Con Kolivas 666fcc3f 2011-08-24T08:06:15 Move staged threads to hashes so we can sort them by time.
Con Kolivas bca84c3b 2011-08-24T08:23:22 Make restarting of GPUs optional for systems that hang on any attempt to restart them. Fix DEAD status by comparing it to last live time rather than last attempted restart time since that happens every minute.
Con Kolivas d9accc48 2011-08-23T12:34:32 Put a lower limit on the nonce increment in cpu mining.
Con Kolivas f6591379 2011-08-23T12:17:21 Minimise how much more work can be given in cpu mining threads each interval.
Con Kolivas 5acdbec4 2011-08-23T12:04:26 Make the fail-pause progressively longer each time it fails until the network recovers.
Con Kolivas b4d6b11b 2011-08-23T11:57:08 Only display the lagging message if we've requested the work earlier.
Con Kolivas ced4a9ac 2011-08-23T11:40:48 Clean up the pool switching to not be dependent on whether the work can roll or not by setting a lagging flag and then the idle flag.
Con Kolivas 088ee2fa 2011-08-23T10:47:47 Only use one thread to determine if a GPU is sick or well, and make sure to reset the sick restart attempt time.
Con Kolivas 7c6dfacc 2011-08-21T08:55:31 Display which longpoll failed and don't free the ram for lp_url since it belongs to the pool hdr path.
Con Kolivas 6f741597 2011-08-20T23:36:18 Use any longpoll available, and don't disable it if switching to a server that doesn't have it.
Con Kolivas b358bdc0 2011-08-20T23:11:12 Never automatically disable any pools but just specify them as idle if they're unresponsive at startup.
Con Kolivas 324d849b 2011-08-20T23:03:49 Attempt to restart a GPU once every minute while it's sick. Don't kill off the reinit thread if it fails to init a GPU but returns safely. Only declare a GPU dead if there's been no sign of activity from the reinit thread for 10 mins.
Con Kolivas 1b228ee3 2011-08-20T22:39:20 Re-enable devices immediately after ther old threads would have been killed off in case the first attempt to restart them fails but we still want them emabled.
Con Kolivas 75018d0d 2011-08-20T22:22:11 Release cl resources should the gpu mining thread abort.
Con Kolivas a754cc3f 2011-08-18T23:07:30 Suppress correct log output when display per-device status.
Con Kolivas 6f769e0f 2011-08-18T22:17:55 Add the ability to enable/disable per-device stats on the fly and match logging on/off.
Con Kolivas e414490b 2011-08-18T22:07:06 Don't display rolling status if per device stats is enabled.
Con Kolivas 2798b8c5 2011-08-18T21:35:37 Merge branch 'master' of github.com:ckolivas/cgminer
Con Kolivas 64e7cdd6 2011-08-18T21:32:45 The new phatk kernel needs a different nonce passed according to how many vectors are in use. This fixes breakage that otherwise occurs when 1 or 4 vectors are chosen.
Znort 987 e49bfbf2 2011-08-18T12:17:10 Add per-device statics log output
Znort 987 f66dec74 2011-08-17T11:45:17 Fix a crash with --algo auto
Con Kolivas cf54f9b8 2011-08-17T16:07:15 Move to 256 sized buffers and don't risk overwrite by using only 127 mask.
Con Kolivas 52e521a7 2011-08-17T15:48:07 Revert "Copy the work before returning from creating a thread in case we change the work before copying it." This reverts commit 6bf4d781e9d9620779d3fb924037941929e738c9. Causing a double free error.
Phateus d15d225a 2011-08-16T23:19:46 Changed phatk version to 2.2
Con Kolivas 6bf4d781 2011-08-17T14:44:13 Copy the work before returning from creating a thread in case we change the work before copying it.
Con Kolivas 1e77f044 2011-08-17T12:43:39 Clean up the longpoll management to ensure the right paths go to the right pool and display whether we're connected to LP or not in the status line.
Con Kolivas 074b8193 2011-08-16T11:21:26 Flush output.
Con Kolivas 53a4245a 2011-08-16T11:15:04 Log summary at the end as per any other output.
Con Kolivas 939a0e02 2011-08-16T10:46:25 Only show cpu algo in summary if cpu mining.
Con Kolivas cdece1f2 2011-08-16T10:45:02 Simplify code and tidy output.
Con Kolivas 8e38a149 2011-08-16T10:37:34 Simplify output code and remove HW errors from CPU stats.
Con Kolivas c53a7b0d 2011-08-16T10:26:42 Only display the CPU algo when we're CPU mining.
Con Kolivas 8febf57a 2011-08-16T09:45:16 Keep options in alphabetical order.
Con Kolivas 845af911 2011-08-16T09:42:26 Add --submit-stale option which submits all shares, regardless of whether they would normally be considered stale.
Znort 987 eed634a3 2011-08-16T00:04:50 Merge branch 'ckolivas-master' into merge-ckolivas-master
Con Kolivas 4e48561a 2011-08-15T22:21:17 Rework the last-initialised time displayed.
Con Kolivas cfe8534c 2011-08-15T22:07:28 Partial restart of threads has proven to be unsuccessful so reinstate device re-initialisation to restart GPUs. Do this by having a reinit thread that is told via a queue which device to restart. If this thread fails to return from opencl code, it should not interrupt the workings of other devices.
Con Kolivas 42d49ffd 2011-08-15T20:28:25 Revert "Restart threads by abstracting out the clcontext initialisation and using that instead of probing all cards." This reverts commit 8f186e61e250e71bd606cabb52795eaa0c9ad423.
Con Kolivas cf543507 2011-08-15T20:27:02 Revert "Preinitialise the devices only once on startup." This reverts commit 071a0ad2f156ab492ebea6c5a60a1e49a62466de.
Con Kolivas b1289a01 2011-08-15T20:26:46 Revert "Move the non cl_ variables into the cgpu info struct to allow creating a new cl state on reinit, preserving known GPU variables." This reverts commit 28880d0dc7c601ee4479921502b66e913e38e36d.
Con Kolivas 7c50bb02 2011-08-15T20:26:27 Revert "Display last initialised time in gpu management info." This reverts commit 177e07aed32e6b38f615f52d3243620625ff93e0.
Con Kolivas cac54f30 2011-08-15T20:25:18 Revert "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." This reverts commit a466942fd880d157cc0b5968805b2159f556fc20.
Znort 987 92af1925 2011-08-15T15:08:13 Remove benchmark data from main.c
Znort 987 8256402a 2011-08-15T14:58:36 Remove harmless warning on win32
Znort 987 593022df 2011-08-15T11:51:27 Added somme comments
Znort 987 e923ac78 2011-08-15T11:53:19 Add CPU algo used to summary
Znort 987 4e3f38d0 2011-08-15T12:06:23 Re-indent code for fork_monitor
Znort 987 39bdec8b 2011-08-15T11:57:31 Various minor changes - Fixed a type bug on 32bit platform in algo bench - Some re-indenting
Znort 987 75639da1 2011-08-15T12:03:46 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
Znort 987 84b0467c 2011-08-15T11:49:06 Fix broken assert in algo bencher
Znort 987 6fd06387 2011-08-15T12:02:34 On unix, make algo benchmark more generic
Znort 987 01886493 2011-08-15T11:59:00 Add set_non_blocking routing In preparation for upcoming generic unix automated algorithm benchmark method (as opposed to linux specific), add a utility method.
Znort 987 29f0f9bc 2011-08-15T11:55:12 Properly detect number of cores on WIN32
Znort 987 7158f9f9 2011-08-12T13:38:18 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).
Con Kolivas 50504ef9 2011-08-14T13:57:58 If a work item has had any mining done on it, don't consider it discarded work.
Con Kolivas 656067a4 2011-08-14T12:30:50 Stale work test should respect age of rolled work as well.