GithubHelp home page GithubHelp logo

sgminer-dev / sgminer Goto Github PK

View Code? Open in Web Editor NEW
629.0 125.0 825.0 15.75 MB

Scrypt GPU miner

License: GNU General Public License v3.0

Java 0.11% C 97.81% C++ 1.22% PHP 0.82% Python 0.02% Shell 0.01% Objective-C 0.01% Batchfile 0.01%

sgminer's Introduction

sgminer

Introduction

This is a multi-threaded multi-pool GPU miner with ATI GPU monitoring, (over)clocking and fanspeed support for scrypt-based cryptocurrency. It is based on cgminer by Con Kolivas (ckolivas), which is in turn based on cpuminer by Jeff Garzik (jgarzik).

releases: https://github.com/sgminer-dev/sgminer/releases

git tree: https://github.com/sgminer-dev/sgminer

bugtracker: https://github.com/sgminer-dev/sgminer/issues

irc: #sgminer and #sgminer-dev on freenode

mailing lists: https://sourceforge.net/p/sgminer/mailman/

License: GPLv3. See COPYING for details.

Documentation

Documentation is available in directory doc. It is organised by topics:

  • API for the RPC API specification;
  • configuration.md for (largely incomplete) detailed information on all configuration options;
  • FAQ.md for frequently asked questions;
  • GPU for semi-obsolete information on GPU configuration options and mining SHA256d-based coins;
  • kernel.md for OpenCL kernel-related information, including development procedure;
  • MINING.md for how to find the right balance in GPU configuration to mine Scrypt-based coins efficiently;
  • windows-build.txt for information on how to build on Windows.

Note that most of the documentation is outdated or incomplete. If you want to contribute, fork this repository, update as needed, and submit a pull request.

Building

Dependencies

Mandatory:

Optional:

  • curses dev library - libncurses5-dev on Debian or libpdcurses on WIN32, for text user interface
  • AMD ADL SDK - version 6, required for ATI GPU monitoring & clocking

If building from git:

  • autoconf
  • automake

sgminer-specific configuration options:

--disable-adl           Override detection and disable building with adl
--disable-adl-checks
--without-curses        Do not compile support for curses TUI

Debian Example

apt-get install libcurl4-openssl-dev pkg-config libtool libncurses5-dev

AMD APP SDK and AMD ADL SDK must be downloaded from the amd websites.

*nix build instructions

If needed, place include headers (*.h files) from ADL_SDK_*<VERSION>*.zip in sgminer/ADL_SDK.

Then:

git submodule init
git submodule update
autoreconf -i
CFLAGS="-O2 -Wall -march=native -std=gnu99" ./configure <options>
make

To compile a version that can be used accross machines, remove -march=native.

To compile a debug version, replace -O2 with -ggdb.

Depending on your environment, replace -std=gnu99 with -std=c99.

Systemwide installation is optional. You may run sgminer from the build directory directly, or make install if you wish to install sgminer to a system location or a location you specified with --prefix.

Windows build instructions

See doc/windows-build.txt for MinGW compilation and cross-compiation, doc/cygwin-build.txt for building using Cygwin, or use the provided winbuild Microsoft Visual Studio project (tested on MSVS2010), with instructions in winbuild/README.txt.

Basic Usage

WARNING: documentation below this point has not been updated since the fork.

After saving configuration from the menu, you do not need to give sgminer any arguments and it will load your configuration.

Any configuration file may also contain a single

"include" : "filename"

to recursively include another configuration file.

Writing the configuration will save all settings from all files in the output.

Single pool:

sgminer -o http://pool:port -u username -p password

Multiple pools:

sgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password

Single pool with a standard http proxy, regular desktop:

sgminer -o "http:proxy:port|http://pool:port" -u username -p password

Single pool with a socks5 proxy, regular desktop:

sgminer -o "socks5:proxy:port|http://pool:port" -u username -p password

Single pool with stratum protocol support:

sgminer -o stratum+tcp://pool:port -u username -p password

The list of proxy types are: http: standard http 1.1 proxy http0: http 1.0 proxy socks4: socks4 proxy socks5: socks5 proxy socks4a: socks4a proxy socks5h: socks5 proxy using a hostname

If you compile sgminer with a version of CURL before 7.19.4 then some of the above will not be available. All are available since CURL version 7.19.4.

If you specify the --socks-proxy option to sgminer, it will only be applied to all pools that don't specify their own proxy setting like above.

For more advanced usage , run sgminer --help.

See doc/GPU for more information regarding GPU mining and doc/SCRYPT for more information regarding Scrypt mining.

Runtime usage

The following options are available while running with a single keypress:

[P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit

P gives you:

Current pool management strategy: Failover [F]ailover only disabled [A]dd pool [R]emove pool [D]isable pool [E]nable pool [C]hange management strategy [S]witch pool [I]nformation

S gives you:

[Q]ueue: 1 [S]cantime: 60 [E]xpiry: 120 [W]rite config file [C]gminer restart

D gives you:

[N]ormal [C]lear [S]ilent mode (disable all output) [D]ebug:off [P]er-device:off [Q]uiet:off [V]erbose:off [R]PC debug:off [W]orkTime details:off co[M]pact: off [L]og interval:5

Q quits the application.

G gives you something like:

GPU 0: [124.2 / 191.3 Mh/s] [A:77 R:33 HW:0 U:1.73/m WU 1.73/m] Temp: 67.0 C Fan Speed: 35% (2500 RPM) Engine Clock: 960 MHz Memory Clock: 480 Mhz Vddc: 1.200 V Activity: 93% Powertune: 0% Last initialised: [2011-09-06 12:03:56] Thread 0: 62.4 Mh/s Enabled ALIVE Thread 1: 60.2 Mh/s Enabled ALIVE

[E]nable [D]isable [R]estart GPU [C]hange settings Or press any other key to continue

The running log shows output like this:

[2012-10-12 18:02:20] Accepted f0c05469 Diff 1/1 GPU 0 pool 1 [2012-10-12 18:02:22] Accepted 218ac982 Diff 7/1 GPU 1 pool 1 [2012-10-12 18:02:23] Accepted d8300795 Diff 1/1 GPU 3 pool 1 [2012-10-12 18:02:24] Accepted 122c1ff1 Diff 14/1 GPU 1 pool 1

The 8 byte hex value are the 2nd 8 bytes of the share being submitted to the pool. The 2 diff values are the actual difficulty target that share reached followed by the difficulty target the pool is currently asking for.

The output line shows the following: (5s):1713.6 (avg):1707.8 Mh/s | A:729 R:8 HW:0 WU:22.53/m

Each column is as follows: 5s: A 5 second exponentially decaying average hash rate avg: An all time average hash rate A: The total difficulty of Accepted shares R: The total difficulty of Rejected shares HW: The number of HardWare errors WU: The Work Utility defined as the number of diff1 shares work / minute (accepted or rejected).

GPU 1: 73.5C 2551RPM | 427.3/443.0Mh/s | A:8 R:0 HW:0 WU:4.39/m

Each column is as follows: Temperature (if supported) Fanspeed (if supported) A 5 second exponentially decaying average hash rate An all time average hash rate The total difficulty of accepted shares The total difficulty of rejected shares The number of hardware erorrs The work utility defined as the number of diff1 shares work / minute

The sgminer status line shows: ST: 1 SS: 0 NB: 1 LW: 8 GF: 1 RF: 1

ST is STaged work items (ready to use). SS is Stale Shares discarded (detected and not submitted so don't count as rejects) NB is New Blocks detected on the network LW is Locally generated Work items GF is Getwork Fail Occasions (server slow to provide work) RF is Remote Fail occasions (server slow to accept work)

The block display shows: Block: 0074c5e482e34a506d2a051a... Started: [17:17:22] Best share: 2.71K

This shows a short stretch of the current block, when the new block started, and the all time best difficulty share you've found since starting sgminer this time.

Multipool

Failover strategies

A number of different strategies for dealing with multipool setups are available. Each has their advantages and disadvantages so multiple strategies are available by user choice, as per the following list:

Failover

The default strategy is failover. This means that if you input a number of pools, it will try to use them as a priority list, moving away from the 1st to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will move back to the higher priority ones.

Round robin

This strategy only moves from one pool to the next when the current one falls idle and makes no attempt to move otherwise.

Rotate

This strategy moves at user-defined intervals from one active pool to the next, skipping pools that are idle.

Load balance

This strategy sends work to all the pools on a quota basis. By default, all pools are allocated equal quotas unless specified with --quota. This apportioning of work is based on work handed out, not shares returned so is independent of difficulty targets or rejected shares. While a pool is disabled or dead, its quota is dropped until it is re-enabled. Quotas are forward looking, so if the quota is changed on the fly, it only affects future work. If all pools are set to zero quota or all pools with quota are dead, it will fall back to a failover mode. See quota below for more information.

The failover-only flag has special meaning in combination with load-balance mode and it will distribute quota back to priority pool 0 from any pools that are unable to provide work for any reason so as to maintain quota ratios between the rest of the pools.

Balance

This strategy monitors the amount of difficulty 1 shares solved for each pool and uses it to try to end up doing the same amount of work for all pools.

Quotas

The load-balance multipool strategy works off a quota based scheduler. The quotas handed out by default are equal, but the user is allowed to specify any arbitrary ratio of quotas. For example, if all the quota values add up to 100, each quota value will be a percentage, but if 2 pools are specified and pool0 is given a quota of 1 and pool1 is given a quota of 9, pool0 will get 10% of the work and pool1 will get 90%. Quotas can be changed on the fly by the API, and do not act retrospectively. Setting a quota to zero will effectively disable that pool unless all other pools are disabled or dead. In that scenario, load-balance falls back to regular failover priority-based strategy. While a pool is dead, it loses its quota and no attempt is made to catch up when it comes back to life.

To specify quotas on the command line, pools should be specified with a semicolon separated --quota(or -U) entry instead of --url. Pools specified with --url are given a nominal quota value of 1 and entries can be mixed.

For example: --url poola:porta -u usernamea -p passa --quota "2;poolb:portb" -u usernameb -p passb Will give poola 1/3 of the work and poolb 2/3 of the work.

Writing configuration files with quotas is likewise supported. To use the above quotas in a configuration file they would be specified thus:

"pools" : [
    {
            "url" : "poola:porta",
            "user" : "usernamea",
            "pass" : "passa"
    },
    {
            "quota" : "2;poolb:portb",
            "user" : "usernameb",
            "pass" : "passb"
    }
]

Extra File Configuration

If you want to store a number of pools in your configuration file, but don't always want them automatically enabled at start up (or restart), then the "state" option with a value of "disabled" can be used:

"pools" : [
    {
            "url" : "poola:porta",
            "user" : "usernamea",
            "pass" : "passa"
    },
    {
            "quota" : "2;poolb:portb",
            "user" : "usernameb",
            "pass" : "passb",
            "state" : "disabled"
    }
]

It is then trivial to change the "state" setting to "enabled" in the configuration file at anytime and then restart the miner (see below). You can enable the pool whilst the miner is still running ('p' followed by 'e' followed by pool number) - but the pool will still be disabled on restart if the config file is not changed.

"state" can also be set to "hidden". This allows the json file to contain a large number of pools, of which some could be automatically culled at start up. This makes it easy to swap pools in and out of the runtime selection, without having a large list of pools cluttering up the display.

"pools" : [
    {
            "poolname" : "Main Pool",
            "url" : "poola:porta",
            "user" : "usernamea",
            "pass" : "passa",
            "state" : "disabled"
    },
    {
            "poolname" : "Joe's Weekend Pool",
            "quota" : "2;poolb:portb",
            "user" : "usernameb",
            "pass" : "passb",
            "state" : "hidden"
    }
]

These options are considered experimental and therefore will NOT be created when the 'Write config file' option is used ('s' followed by 'w').

A restart of the miner ('s' followed by 'c') will reload the config file and any changes that may have been made.

Logging

sgminer will log to stderr if it detects stderr is being redirected to a file. To enable logging simply append 2>logfile.txt to your command line and logfile.txt will contain all debug output unless you set debug-log to false, in which case it will only contain output at the log level you specified (notice by default).

There is also the -m option on Linux which will spawn a command of your choice and pipe the output directly to that command.

The WorkTime details 'debug' option adds details on the end of each line displayed for Accepted or Rejected work done. An example would be:

<-00000059.ed4834a3 M:X D:1.0 G:17:02:38:0.405 C:1.855 (2.995) W:3.440 (0.000) S:0.461 R:17:02:47

The first 2 hex codes are the previous block hash, the rest are reported in seconds unless stated otherwise: The previous hash is followed by the getwork mode used M:X where X is one of P:Pool, T:Test Pool, L:LP or B:Benchmark, then D:d.ddd is the difficulty required to get a share from the work, then G:hh:mm:ss:n.nnn, which is when the getwork or LP was sent to the pool and the n.nnn is how long it took to reply, followed by 'O' on it's own if it is an original getwork, or 'C:n.nnn' if it was a clone with n.nnn stating how long after the work was recieved that it was cloned, (m.mmm) is how long from when the original work was received until work started, W:n.nnn is how long the work took to process until it was ready to submit, (m.mmm) is how long from ready to submit to actually doing the submit, this is usually 0.000 unless there was a problem with submitting the work, S:n.nnn is how long it took to submit the completed work and await the reply, R:hh:mm:ss is the actual time the work submit reply was received

If you start sgminer with the --sharelog option, you can get detailed information for each share found. The argument to the option may be "-" for standard output (not advisable with the ncurses UI), any valid positive number for that file descriptor, or a filename.

To log share data to a file named "share.log", you can use either: ./sgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log ./sgminer --sharelog share.log -o xxx -u yyy -p zzz

For every share found, data will be logged in a CSV (Comma Separated Value) format: timestamp,disposition,target,pool,dev,thr,sharehash,sharedata For example (this is wrapped, but it's all on one line for real): 1335313090,reject, ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000, http://localhost:8337,GPU0,0, 6f983c918f3299b58febf95ec4d0c7094ed634bc13754553ec34fc3800000000, 00000001a0980aff4ce4a96d53f4b89a2d5f0e765c978640fe24372a000001c5 000000004a4366808f81d44f26df3d69d7dc4b3473385930462d9ab707b50498 f681634a4f1f63d01a0cd43fb338000000000080000000000000000000000000 0000000000000000000000000000000000000000000000000000000080020000

sgminer's People

Contributors

aznboy84 avatar bitbandi avatar bllacky avatar bufius avatar ckolivas avatar denis2342 avatar elbandi avatar fleger avatar gzm55 avatar joe4782 avatar kalroth avatar kanoi avatar luke-jr avatar mrbrdo avatar nelisky avatar neocogent avatar nushor avatar phoenix48 avatar prettyhatemachine avatar pshep avatar rustyrussell avatar setkeh avatar someone42 avatar sterlingpickens avatar troky avatar tupieurods avatar veox avatar xiangfu avatar ycros avatar ystarnaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sgminer's Issues

Implement --benchmark with scrypt

Currently --benchmark reports:
./sgminer --benchmark
[16:56:46] Cannot use benchmark mode with scrypt

Investigate why this isn't implemented, try to do so.

Fatal JSON Error Loading Config file

Everytime I start up sgminer it throws an error.

[21:33:26] Started sgminer 4.0.0
[21:33:26] Loaded configuration file /home/nate/.sgminer/sgminer.conf
[21:33:26] Fatal JSON error in configuration file.
[21:33:26] Configuration file could not be used.
[21:33:26] Need to specify at least one pool server.

sgminer.conf:

{
"pools" : [
{
"url" : "http://107.170.7.72:19327",
"user" : "6zLgmL9pE4LfrwKPM6XhUQ1CCBZ9jTLWrv",
"pass" : "x"
}
]
,
"intensity" : "13,
"xintensity" : "0,
"rawintensity" : "0",
"worksize" : "256",
"kernel" : "scrypt",
"lookup-gap" : "0",
"thread-concurrency" : "16384",
"shaders" : "0",
"api-mcast-port" : "4028",
"api-port" : "4028",
"expiry" : "120",
"failover-switch-delay" : "60",
"gpu-dyninterval" : "7",
"gpu-platform" : "0",
"gpu-threads" : "2",
"log" : "5",
"no-pool-disable" : true,
"queue" : "1",
"scan-time" : "30",
"tcp-keepalive" : "30",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}

compilation bug in adl.c (last commits)

With last commits i got this message when compiling:

adl.c In function 'init-adl'
adl.c:340:3: error 'struct AdapterInfo' has no member named 'iDrvIndex'

Kernel path not found

After the latest modifications, where all the kernels are inside the /kernel folder, if you specify any kernel to the config file it fails to load.

If you move the kernel from the folder to the root folder of sgminer it all works ok.

Some ideas for pool management

Pools in single file well when you are continuously mining litecoin, for example. But I prefer to mine new forks, and it takes too much time to update each conf file of my rigs. . But I think there could be some improvements.

I. Option --worker-name. It allows to use one pools.conf file for multiple rigs, but they will use different worker names.

Example of pools.conf:
"pools" :
[{
"url" : "stratum+tcp://sample.pool.com:1111",
"user" : "dummy",
"pass" : "x"
},
{
"url" : "stratum+tcp://another-sample.pool.com:2222",
"user" : "dummy",
"pass" : "x"
}]

If you have a rig with --worker-name set to 1, then it will connects as user 'dummy.1" with password x. It allows to monitor my rigs on pool's dashboard.

II. Auto-check for an updated pools conf.
I'd like to see something like this:
./sgminer --pools-list http://sample.com/pools.conf --pools-check-time 10

It checks for an updated pools.conf file every 10 minutes and switches to a new pool if there's updated conf file.

III. A simple format for .conf file. Example:

"pools" : [
{
"url" : "stratum+tcp://first-pool.com:1111",
"user" : "dummy.1",
"pass" : "x"
},
{
"url" : "stratum+tcp://second-pool.com:2222",
"user" : "dummy.1",
"pass" : "x"
},
{
"url" : "stratum+tcp://third-pool.com:3333",
"user" : "dummy.1",
"pass" : "x"
}
]

my suggestion:

{
"default-user" : "dummy",
"default-password" : "x",
"worker-name" : "1",
"pools" : [ "stratum+tcp://first-pool.com:1111", "stratum+tcp://second-pool.com:2222", "stratum+tcp://another-username:[email protected]:3333" ]
}

There is a default user and password, but pool #3 uses custom one (split via @).

Also, it would be better to disable or hide pool using a letter in front of the address, for example:
"pools" : [ "d:stratum+tcp://first-pool.com:1111"]

d - disabled
h - hidden

Fix windows ADL interface under remote desktop (RDP)

Starting up cgminer/bfgminer/sgminer under an RDP connection in windows results in not being able to properly detect the ADL interface, and hence no hardware control.

Fixing this up would be an improvement for windows users.

Unfortunately, I'm not a windows dev so I can't investigate this directly. But at least it's reported.

Windows Build Issue under MINGW / MSYS (gcc 4.8.1)

Hello,

Configure output is below:

------------------------------------------------------------------------
sgminer 4.0.0
------------------------------------------------------------------------


Configuration Options Summary:

  libcurl(GBT+getwork).: Enabled: -Lc:/mingw/lib -lcurl -lcurldll
  curses.TUI...........: FOUND: -lpdcurses
  OpenCL...............: FOUND. GPU mining support enabled
  ADL..................: SDK found, GPU monitoring support enabled

Compilation............: make (or gmake)
  CPPFLAGS.............:
  CFLAGS...............: -D WIN32_LEAN_AND_MEAN
  LDFLAGS..............:
  LDADD................:  -Lc:/mingw/lib -lcurl -lcurldll   compat/jansson-2.5/src/.libs/libjansson.a -lpthread -lOpenCL   -lws2_32 -lm

Installation...........: make install (as root if needed, with 'su' or 'sudo')
  prefix...............: /usr/local

GCC Version info is below:

$ gcc -v
Using built-in specs.
COLLECT_GCC=c:\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)

Make output is below:

$ make
make  all-recursive
make[1]: Entering directory `/home/Mike/sgminer-master'
Making all in lib
make[2]: Entering directory `/home/Mike/sgminer-master/lib'
  GEN    arg-nonnull.h
  GEN    c++defs.h
  GEN    warn-on-use.h
  GEN    signal.h
  GEN    string.h
make  all-recursive
make[3]: Entering directory `/home/Mike/sgminer-master/lib'
make[4]: Entering directory `/home/Mike/sgminer-master/lib'
  CC     dummy.o
  CC     memmem.o
  CC     sigaction.o
  CC     sigprocmask.o
  AR     libgnu.a
make[4]: Leaving directory `/home/Mike/sgminer-master/lib'
make[3]: Leaving directory `/home/Mike/sgminer-master/lib'
make[2]: Leaving directory `/home/Mike/sgminer-master/lib'
Making all in compat
make[2]: Entering directory `/home/Mike/sgminer-master/compat'
Making all in jansson-2.5
make[3]: Entering directory `/home/Mike/sgminer-master/compat/jansson-2.5'
make  all-recursive
make[4]: Entering directory `/home/Mike/sgminer-master/compat/jansson-2.5'
Making all in src
make[5]: Entering directory `/home/Mike/sgminer-master/compat/jansson-2.5/src'
  CC     dump.lo
  CC     error.lo
  CC     hashtable.lo
  CC     load.lo
  CC     memory.lo
  CC     pack_unpack.lo
  CC     strbuffer.lo
  CC     strconv.lo
  CC     utf.lo
  CC     value.lo
  CCLD   libjansson.la
make[5]: Leaving directory `/home/Mike/sgminer-master/compat/jansson-2.5/src'
make[5]: Entering directory `/home/Mike/sgminer-master/compat/jansson-2.5'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/Mike/sgminer-master/compat/jansson-2.5'
make[4]: Leaving directory `/home/Mike/sgminer-master/compat/jansson-2.5'
make[3]: Leaving directory `/home/Mike/sgminer-master/compat/jansson-2.5'
make[3]: Entering directory `/home/Mike/sgminer-master/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/Mike/sgminer-master/compat'
make[2]: Leaving directory `/home/Mike/sgminer-master/compat'
Making all in ccan
make[2]: Entering directory `/home/Mike/sgminer-master/ccan'
  CC     opt/libccan_a-helpers.o
  CC     opt/libccan_a-opt.o
  CC     opt/libccan_a-parse.o
  CC     opt/libccan_a-usage.o
  AR     libccan.a
make[2]: Leaving directory `/home/Mike/sgminer-master/ccan'
make[2]: Entering directory `/home/Mike/sgminer-master'
  CC     sgminer-sgminer.o
  CC     sgminer-api.o
  CC     sgminer-util.o
  CC     sgminer-sha2.o
In file included from sha2.h:35:0,
                 from sha2.c:37:
config.h:361:0: warning: "_WIN32_WINNT" redefined [enabled by default]
 #define _WIN32_WINNT 0x0501
 ^
In file included from c:\mingw\include\_mingw.h:35:0,
                 from c:\mingw\include\string.h:29,
                 from ./lib/string.h:28,
                 from sha2.c:35:
c:\mingw\include\sdkddkver.h:154:0: note: this is the location of the previous definition
 #    define _WIN32_WINNT _WIN32_WINNT_WIN2K
 ^
  CC     sgminer-logging.o
  CC     sgminer-driver-opencl.o
  CC     sgminer-ocl.o
  CC     sgminer-findnonce.o
  CC     sgminer-adl.o
  CC     sgminer-scrypt.o
  CCLD   sgminer.exe
sgminer-sgminer.o:sgminer.c:(.text+0x11b35): undefined reference to `llround'
sgminer-sgminer.o:sgminer.c:(.text+0x1cc48): undefined reference to `timeEndPeriod'
sgminer-sgminer.o:sgminer.c:(.text+0x1ef04): undefined reference to `timeBeginPeriod'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: sgminer-sgminer.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [sgminer.exe] Error 1
make[2]: Leaving directory `/home/Mike/sgminer-master'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Mike/sgminer-master'
make: *** [all] Error 2
$

The windows-build.txt should be amended to include a comment about ensuring you update "/etc/fstab.sample" to "/etc/fstab", otherwise a ton of includes/libraries required for build are not present. Also, I needed to use the "-D WIN32_LEAN_AND_MEAN" build option in order to get past a winsock/winsock2 conflict. I can't seem to get around this issue with "llround" and "timeEndPeriod", though.

CPU mining support

I know that CPU mining support is not really useful anymore, but it seems that it's completely removed from the source? Even with --enable-cpumining I can't build a working version on my Windows VM (which does apparently not emulate a proper GPU):

$ sgminer.exe -c ../sgminer.conf
[20:16:23] Started sgminer 4.0.0
[20:16:23] Loaded configuration file ../sgminer.conf
[20:16:23] clDevicesNum returned error, no GPUs usable
[20:16:23] All devices disabled, cannot mine!

Or am I missing something here?

API: start without mining, load arbitrary config

request by furuknap

As far as I understand it, at least from cgminer, you can simply restart the miner and it will reload the current .conf. So, if you put your tuning modifications into the current file and save, a simple remote restart API command will reload. In other words, the current restart functionality supports tuning in the current file, so I thought it would be easier to just build on that.

How about this, then: a launch mode that does not load any .conf file at all, but instead launches the API only and waits for a "load config" command. there's already at least one implementation of a cascading .conf file loader. Here's what a .conf could look like:

{
   "api-listen" : true,
   [...]
   "no-config" : true
}

Then, upon issuing the command "load-config|filename", sgminer would load the config, parse (report any errors, of course), and then resume mining.

This way, remote tuning could get access to sgminer with no running mining at all, load whatever configuration is required (or even build one runtime and save via API). If a recoverable crash happens, sgminer goes back into no-config mode and awaits further instructions. If a non-recoverable crash happens, sgminer can simply restart using the previous .conf (which is no-config) and the system remains responsive.

cgminer issues (crash on exit)

I am gonna try this fork. Just a question Cgminer isn’t capable of handling the latest series of graphics cards. There were a lot of crashes on exit.

For cgminer the solution was: in the adl.c file around line 472, just before the ADL_Overdrive5_FanSpeed_Get call, add a line above:

ga->DefFanSpeedValue.iSpeedType=ADL_DL_FANCTRL_SPEED_TYPE_PERCENT;

I can't find this line in adl.c. Have you adopted this solution or probably have a better fix? Is this still an issue?

http://www.ohmpie.com/mining-on-an-r9-290-in-linux

Write config file

Saving a config file with [S] then [W] creates a sgminer.conf file that has
"kernel" : "scrypt",
in it, which causes sgminer to throw an error next time it is launched.

Config generated by sgminer is invalid

If you make changes to the intensities from a running instance of sgminer and you hit [W]rite, it writes the config without problems but upon reload it gives an error because it writes 0 value to the other unused intensities.

Also it doesn't write "gpu-threads" inside the config file

No ncurses interface with HD 5970

Ncurses interface is just blank with HD 5970 card. You have to revert to text-based interface only with -T. Happens with cgminer 3.72 too.

Port to build on MSVS2010 (in addition to MinGW)

On Sat, Jan 25, 2014 at 03:24:07AM -0800, troky wrote:

Hi,

Here it is: https://www.dropbox.com/s/z92c88k8qoltgmw/sgminer.rar

Checked out from veox/sgminer/master and created local branch

  • it compiles on Linux and VS2010 (x86 and x64)
  • most changes are explicit casting from Xalloc() because MSVC++ requires that and I believe that practice should be followed
  • all external libraries are statically linked (compiled in VS2010 from latest sources, including jansson)
  • only requirement for Windows is VC++ 2010 redist package (x86 and/or x64)
  • winbuild/config.h probably needs cleanup
  • tested on my 2x R9 290 rig for >24h without problems

Regards,
troky

Haven't investigated yet, requested for a git repo URL instead.

Zuikkis' kernel

Issue split from https://github.com/veox/sgminer/issues/4

Kernel is already available in kernel/zuikkis.cl in branch kernels.

TODO:

  • add argument ignores for hard-coded stuff (ocl.c, _initCl()) - anything else except lookup-gap?
  • add documentation on specific quirks (probably in doc/KERNEL.md).

P.S. should another version with #pragma unroll still present be added? Perhaps leave it there, commented out?

Unable to open ckolivas.cl or /opt/miners/sgminer/ckolivas.cl for reading

I am running SMOS 1.3 and tried to install sgminer.

This worked on one of my rigs. But trying to install a few day's later on other rigs fails.

these are the install commands in the SMOS Sgminer install script.

!/bin/sh

mine stop
wget http://smos-linux.org/upgrade/sgminer.pl
wget http://smos-linux.org/upgrade/sgminer2.pl
rm -rf /opt/bamt/gpumon
mv sgminer2.pl /opt/bamt/gpumon
rm -rf /opt/bamt/common.pl
mv sgminer.pl /opt/bamt/common.pl
sleep 5
cd /opt/miners/
rm -rf cgminer
git clone https://github.com/veox/sgminer
cp /opt/ADL/include/* /opt/miners/sgminer/ADL_SDK/
cd /opt/miners/sgminer/
./autogen.sh
sleep 5
make clean
sleep 5
CFLAGS="-O2 -Wall -march=native -I /opt/AMDAPP/include/" LDFLAGS="-L/opt/AMDAPP/lib/x86" ./configure --enable-scr$
sleep 5
make
sleep 5
rm -rf /home/.script.sh
mv /root/smos/mining/sgminer/.sgminer.sh /home/.script.sh
chmod +x /home/.script.sh
clear
echo "sgminer 4.0.0 installed."
echo "SMOS-Linux.org"
echo "Now reboot your rig, and start mining"

This is the full output after starting sgminer:

[15:24:00] Started sgminer 4.0.0
[15:24:00] Loaded configuration file /etc/bamt/cgminer.conf
[15:24:00] Error in configuration file, partially loaded.
[15:24:00] Start sgminer with -T to see what failed to load.
[15:24:03] Unable to open ckolivas.cl or /opt/miners/sgminer/ckolivas.cl for rea
ding
[15:24:03] Failed to init GPU thread 0, disabling device 0
[15:24:03] Restarting the GPU from the menu will not fix this.
[15:24:03] Try restarting sgminer.
Press enter to continue:

[15:24:03] Unable to open ckolivas.cl or /opt/miners/sgminer/ckolivas.cl for reading
[15:24:03] Failed to init GPU thread 1, disabling device 1

Hope you can fix this, sgminer rocks!

Feature Request: Option to slowly increment gpu settings, specifically memory clock

I've found that some of my GPUs (r9 290s) will run at a higher memory clock but will crash instantly if it is set that way from the start. If, however, I set them to be 100MHz lower than that, give them a few minutes at that rate, then up them to the higher clock, they work perfectly. It's a pretty specific issue and all else works; so, not a big deal. Also, I was thinking that this could be beneficial for PSUs as well. This way the power load could be more controlled and increased instead of spiking all at once. Might save a few PSUs. Just an idea.

generic kernel and hard coded optimization, a way to have both

Hi,

I checked most of the kernel in the branch and the good thing is that they avoid hard coded values and thus are profitable for all.

On the other side, I found on the net many kernels that have hard coded values. From a performance point of view, can we reach better performance with the hard coded one? Do you have any observation with that?

In case it is better, my proposal is to generate one the fly the hard coded kernel at runtime based on the generic one and the configuration file of sgminer. i can do the piece of code for it.

Make all tuning aspects settable remotely

furunkap's request

I would like to be able to set all tuning aspects remotely, such as worksize, lookup-gap, thread-concurrency, threads, and so on, but so that these settings will be placed in a .conf file on issuing the API-command 'save' only (I realize changing these runtime may be impossible).

Make custom machine-specific data available through the API

furunkap's request

Have a separate section in the .conf that can hold custom data. An example would be:

"pools" : [
   {
   "url" : "***",
   "user" : "***",
   "pass" : "***"   
   }
],
"custom" : [
   {
   "machine-name": "foo",
   "comment" : "Doesn't support X/Y/Z, but talk to Ralph about it"
   "bar" : "baz"
   }
],
"temp-cutoff" : "90",
"temp-target" : "80",
...

The custom response should be sent back as response to the CONFIG API request.

List GPU shaders to assist in xIntensity tuning?

In order to make comparisons to original intensity values, perhaps the number of shaders could be queried and listed on the [G]pu settings page.

This would allow things like, my I=13 is equal to xI = 8 for my card with 1024 shaders.

sgminer doesnt control fan on both cards

Hi, I have a double Sapphire R9 290x. I have installed the latest Catalyst driver, ADL_SK 6.0 and AMD APP 2.9. I compiled sgminer from sources. When i do sgminer -n i see these errors with Overdrive5 (which is weird because R9 are supposed to use Overdrive6)

[18:19:09] CL Platform 0 vendor: Advanced Micro Devices, Inc.
[18:19:09] CL Platform 0 name: AMD Accelerated Parallel Processing
[18:19:09] CL Platform 0 version: OpenCL 1.2 AMD-APP (1348.5)
[18:19:09] Platform 0 devices: 2
[18:19:09] 0 Hawaii
[18:19:09] 1 Hawaii
[18:19:09] GPU 0 AMD Radeon R9 290 Series hardware monitoring enabled
[18:19:09] GPU 0 BIOS partno.: 113-C6710150-102, version:
015.039.000.007.003526, date: 10/03/13 15:00
[18:19:09] GPU 1 AMD Radeon R9 290 Series hardware monitoring enabled
[18:19:09] Failed to ADL_Overdrive5_ODParameters_Get
[18:19:09] Failed to ADL_Overdrive5_ODPerformanceLevels_Get
[18:19:09] Failed to ADL_Overdrive5_ODPerformanceLevels_Get
[18:19:09] Failed to ADL_Overdrive5_FanSpeedInfo_Get
[18:19:09] Failed to ADL_Overdrive5_FanSpeed_Get for default value
[18:19:09] Failed to ADL_Overdrive5_PowerControl_get
[18:19:09] Dual GPUs detected: 1 and 0
[18:19:09] 2 GPU devices max detected

When i start mining i get Temp data just for one of the cards, the other is missing. Also the fan is running only on one card, even though the fan speed is shown also for the second card:

http://imgur.com/ZCvgIAe

This leads to one card overheating and is obviously very bad ! cgminer 3.7.2 has the same issue :(

Allow setting arbitrary "pool stable" time

Explanation by caseigl

He's talking about when a pool disconnects or can't be reached. WHen this happens, cgminer switches to a backup pool and waits five minutes to switch back to the primary. The idea was, in theory, to make sure that the primary pool is actually stable before switching back.

The problem is that multipools forcibly disconnect everyone when they switch to a new coin, so if you are running a newer cgminer you miss out on five minutes of mining EVERY time they switch coins or rounds, which can be multiple times per hour and dozens of times per day. That's a lot of time to lose off your primary pool, especially when sometimes rounds are only 10-15 minutes long on some of the altcoins.

Introduced by veox@3b527f1

Looks like this now: veox@fd8d465

Perhaps demote the log message from WARNING to INFO, too.

Re-enable threads check + restart (on temperature overshoot)

I've the same issue on cgminer as well. When a card gets "disabled" cause the temperature goes over the limit, it never comes back.

I think we need a check to see if the card was effectively enabled and eventually perform a restart thread.

Pool information not being read from sgminer.conf

There appears to be an omission in the latest commit that breaks the "pools" setting. See Ln. 1257 & 1258 in sgminer.c de08e71. I came across this the other night while trying to figure out why sgminer wasn't reading my pool information from the configuration file. Recompiling with those lines restored fixed the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.