Pages:
Author

Topic: cgminer - CPU/GPU miner in C for linux/windows - page 4. (Read 81916 times)

full member
Activity: 126
Merit: 100
With the latest version, it doesnt seem to like pools that much

Quote
[2011-07-08 00:22:18] 0 gpu miner threads started
[2011-07-08 00:22:18] Long-polling activated for http://192.168.233.128:8337/LP
[2011-07-08 00:22:18] 2 cpu miner threads started, using SHA256 '4way' algorithm.
[2011-07-08 00:22:18] JSON decode failed(-1): unable to decode byte 0xc9 at position 592
[2011-07-08 00:22:19] Failed json_rpc_call in get_upstream_work
[2011-07-08 00:22:19] json_rpc_call failed on get work, retry after 5 seconds
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Updated windows binary. In sync with source code now.

http://ck.kolivas.org/apps/cgminer-ycros-2011-07-07-2300.zip
full member
Activity: 182
Merit: 100
Windows build please.

Quote
[2011-07-06 09:26:27] [188.20 | 188.33 Mhash/s] [1484 Accepted] [21 Rejected] [0 HW errors]
[2011-07-06 09:26:27] [thread 1: 67108864 hashes, 41359356 khash/sec]
[2011-07-06 09:26:27] [thread 0: 50331648 hashes, 31027223 khash/sec]
[2011-07-06 09:26:28] LONGPOLL detected new block
[2011-07-06 09:26:30] getwork thread 1
[2011-07-06 09:26:30] work retrieval failed, exiting gpu mining thread 0
[2011-07-06 09:26:30] [thread 1: 50331648 hashes, 22013848 khash/sec]
[2011-07-06 09:26:30] Failed to tq_push work in workio_get_work
[2011-07-06 09:26:30] Received kill message
[2011-07-06 09:26:30] workio thread dead, exiting.

What happened here?

For some reason it was unable to retrieve any work and that's a fatal error, so it aborted cgminer entirely. I've updated the tree to retry getting work up to the configured amount of times (infinite by default) now.

I have dropped cgminer for now because of this.

It runs for about half a day, then randomly exits,
forcing me to re-start it or run a restart loop around
it. Not worth the hassle. Once I've seen it run stable
for a week or so in the presence of pool shenanigans
(ddos, upgrade downtime, etc), I'll consider running it
again.


He said it was fixed?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Updated tree.

I've included mf's changes (thanks) which add the efficiency and utility columns to the output. Since the output got very busy I've abbreviated it to look like the following (new columns are efficiency and utility):

[(5s):186.5  (avg):204.5 Mh/s] [Q:84  A:83  R:9  HW:0  E:99%  U:2.75/m]

I've also added code to put new work into a staging area first where the latest work is examined to see if it belongs to the same block or not. The utility of this is to cope at times when longpoll becomes unreliable, slow or is not supported/working. This minimises the chance of working on stale work under those circumstances and will produce a message like this:

[Accepted] [GPU 0] [192.0 Mh/s] [Q:60  A:50  R:6  HW:0  E:83%  U:2.45/m]                 
[2011-07-07 14:52:01] New block detected, possible missed longpoll, flushing work queue
[Accepted] [GPU 0] [191.8 Mh/s] [Q:64  A:51  R:6  HW:0  E:80%  U:2.35/m]                 
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Yes, I'm more than happy to take code from elsewhere. Just be aware the code is still in heavy flux so make sure you pull before making any changes.
mf
newbie
Activity: 24
Merit: 0
Getting close now to a release. Need to find a way to include the kernel files in distdir and install.

Con, would you consider adding or receiving a pull request to get the status line to be similar to phoenix's, and add a couple more info points:
- Total getworks received in the current run
- Efficiency %, calculated as percentage of getworks received vs accepted (can be >100%) in the current run
- Utility (for lack of a better name), calculated as being the number of accepted per minute in the current run (varies wildly at first, should stabilise after a bit).

All the above needs is:
- an unsigned to hold the total getworks received
- one more %d per log printf and/or _info for the total getworks
- two more %.2f per log printf and/or _info for the efficiency % and utility:
- Efficiency: getwork_requested ? cgpu->accepted * 100 / getwork_requested : 0.0
- Utility: accepted/total_secs*60

cgminer's MHash/s seem to wildly differ from other miners I have. The "efficiency" and "utility" are probably better measures of how the miner has performed in the long run than "just" the MHash.

Especially the "Utility", as (together with "accepted") is the only measure of how well the miner performs with regards to submitting the shares upstream.
sr. member
Activity: 378
Merit: 250
Question about an optimization:  I was wondering if I were to take advantage of the horizontal math function of SSE3 in place of the multiple paddd functions, would it be quicker?  And also, I was wondering if someone could give me a hand with si/di registers and explain why they weren't used effectively in the code?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Quote
[2011-07-06 09:26:27] [188.20 | 188.33 Mhash/s] [1484 Accepted] [21 Rejected] [0 HW errors]
[2011-07-06 09:26:27] [thread 1: 67108864 hashes, 41359356 khash/sec]
[2011-07-06 09:26:27] [thread 0: 50331648 hashes, 31027223 khash/sec]
[2011-07-06 09:26:28] LONGPOLL detected new block
[2011-07-06 09:26:30] getwork thread 1
[2011-07-06 09:26:30] work retrieval failed, exiting gpu mining thread 0
[2011-07-06 09:26:30] [thread 1: 50331648 hashes, 22013848 khash/sec]
[2011-07-06 09:26:30] Failed to tq_push work in workio_get_work
[2011-07-06 09:26:30] Received kill message
[2011-07-06 09:26:30] workio thread dead, exiting.

What happened here?

For some reason it was unable to retrieve any work and that's a fatal error, so it aborted cgminer entirely. I've updated the tree to retry getting work up to the configured amount of times (infinite by default) now.
full member
Activity: 182
Merit: 100
Quote
[2011-07-06 09:26:27] [188.20 | 188.33 Mhash/s] [1484 Accepted] [21 Rejected] [0 HW errors]
[2011-07-06 09:26:27] [thread 1: 67108864 hashes, 41359356 khash/sec]
[2011-07-06 09:26:27] [thread 0: 50331648 hashes, 31027223 khash/sec]
[2011-07-06 09:26:28] LONGPOLL detected new block
[2011-07-06 09:26:30] getwork thread 1
[2011-07-06 09:26:30] work retrieval failed, exiting gpu mining thread 0
[2011-07-06 09:26:30] [thread 1: 50331648 hashes, 22013848 khash/sec]
[2011-07-06 09:26:30] Failed to tq_push work in workio_get_work
[2011-07-06 09:26:30] Received kill message
[2011-07-06 09:26:30] workio thread dead, exiting.

What happened here?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Updated tree:
Reworked the screen update to have a non-scrolling status line and make the stderr log optional.
Updated assembly for 64 bit cpu mining - d3m0n1q thanks a lot. Updated with newer assembly. It seems to be worth 5-10% improvement.

Getting close now to a release. Need to find a way to include the kernel files in distdir and install.
sr. member
Activity: 378
Merit: 250
Hey, have you added in the SSE2_x64_atom update yet?
No. Is it stable/working ok? Link?
Link:  http://yyz.us/bitcoin/sha256_xmm_amd64_atom.asm

And yes, it's stable and working.  It was determined that you need to strip "_atom" from both the name of the file and the name within the text of the file.  Use it to replace your existing sha256_xmm_amd64.asm file in the x86_64 folder then recompile.  I've been using it since it came out.  Alternatively, just copy-paste the code I already stripped from the cpuminer thread and name it sha256_xmm_amd64.asm.  You'll be surprised at how many more hashes you'll find with it.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Maybe im dreaming, would it be possible to detect a dropped/slow gpu and restart that thread?

Not that this has happened but have happened with the other single instance mine on all gpu hashers.
That shouldn't happen. This miner goes to great lengths to keep the mining threads busy at all times in the face of terrible network connectivity. Unless the pool is down for extended periods it should do what you want already.
full member
Activity: 182
Merit: 100
Maybe im dreaming, would it be possible to detect a dropped/slow gpu and restart that thread?

Not that this has happened but have happened with the other single instance mine on all gpu hashers.
newbie
Activity: 42
Merit: 0
It crashes after some run time with a floating point exception:

Quote
Core was generated by `./cgminer --algo sse2_64 --debug --url http://mineco.in:3000/ --userpass xxxxxx'.
Program terminated with signal 8, Arithmetic exception.
#0  0x00000000004024b2 in miner_thread (userdata=)
    at main.c:949
949                             max64 = work.blk.nonce +
(gdb) where
#0  0x00000000004024b2 in miner_thread (userdata=)
    at main.c:949
#1  0x000000393800673d in start_thread () from /lib64/libpthread.so.0
#2  0x00000039374d44bd in clone () from /lib64/libc.so.6
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Thanks very much. Updated the tree. Please try again.
newbie
Activity: 42
Merit: 0
The thing is that #include line isn't wrapped in the #ifdef HAVE_OPENCL block, so the file is always included regardless of the OpenCL presence. There are more OpenCL-related bits in miner.h and mine.c which are always compiled.

Did you do ./autogen.sh followed by configure first? If so, what was the output please?
autogen doesn't output anything.
I had to remove the libcurl macro from configure and added the curl flags manually to the generated Makefile since RHEL5 doesn't have libcurl pkgconfig bits.
configure output:
Quote
$ CFLAGS="-O3 -Wall -msse2" ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc needs -traditional... no
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... (cached) ranlib
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for stdint.h... (cached) yes
checking for mprotect... yes
checking for mmap... yes
checking for MAP_ANONYMOUS... yes
checking whether memchr works... yes
checking whether memmem is declared... yes
checking for memmem... yes
checking whether memmem works... yes
checking for wchar_t... yes
checking whether the preprocessor supports include_next... yes
checking whether system header files limit the line length... no
checking for unsigned long long int... yes
checking for long long int... yes
checking whether stdint.h conforms to C99... yes
checking for C/C++ restrict keyword... __restrict
checking whether memmem is declared without a macro... yes
checking whether mempcpy is declared without a macro... yes
checking whether memrchr is declared without a macro... yes
checking whether rawmemchr is declared without a macro... yes
checking whether stpcpy is declared without a macro... yes
checking whether stpncpy is declared without a macro... yes
checking whether strchrnul is declared without a macro... yes
checking whether strdup is declared without a macro... yes
checking whether strncat is declared without a macro... yes
checking whether strndup is declared without a macro... yes
checking whether strnlen is declared without a macro... yes
checking whether strpbrk is declared without a macro... yes
checking whether strsep is declared without a macro... yes
checking whether strcasestr is declared without a macro... yes
checking whether strtok_r is declared without a macro... yes
checking whether strerror_r is declared without a macro... yes
checking whether strsignal is declared without a macro... yes
checking whether strverscmp is declared without a macro... yes
checking whether memmem works in linear time... no
checking for memmem... (cached) yes
checking whether memmem works... (cached) yes
checking whether NULL can be used in arbitrary expressions... yes
checking for ANSI C header files... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for OpenCL... no
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
checking for yasm... /usr/bin/yasm
checking if yasm version is greater than 1.0.1... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating x86_64/Makefile
config.status: creating lib/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

OpenCL: NOT FOUND. GPU mining support DISABLED.

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Hey, have you added in the SSE2_x64_atom update yet?
No. Is it stable/working ok? Link?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Still not possible to build without OpenCL:

In file included from main.c:30:
miner.h:15:19: error: CL/cl.h: No such file or directory
In file included from main.c:30:
miner.h:215: error: expected specifier-qualifier-list before ‘cl_uint’
main.c: In function ‘miner_thread’:
main.c:869: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:880: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:890: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:903: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:913: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:920: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:941: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:943: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:949: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:952: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:963: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:967: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:974: error: ‘dev_blk_ctx’ has no member named ‘nonce’


Did you do ./autogen.sh followed by configure first? If so, what was the output please?
newbie
Activity: 42
Merit: 0
Still not possible to build without OpenCL:

In file included from main.c:30:
miner.h:15:19: error: CL/cl.h: No such file or directory
In file included from main.c:30:
miner.h:215: error: expected specifier-qualifier-list before ‘cl_uint’
main.c: In function ‘miner_thread’:
main.c:869: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:880: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:890: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:903: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:913: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:920: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:941: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:943: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:949: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:952: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:963: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:967: error: ‘dev_blk_ctx’ has no member named ‘nonce’
main.c:974: error: ‘dev_blk_ctx’ has no member named ‘nonce’
Pages:
Jump to: