Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 828. (Read 5806004 times)

newbie
Activity: 17
Merit: 0
visualstudio doesnt play nice with mingw

try code::blocks ide. been using it since my first C course
newbie
Activity: 59
Merit: 0
your a hardcore c programmer ;-P
You know, it's the same guy that is known for Linux kernel schedulers outside of this forum... No wonder.

Re. config format: JSON + arrays is absolutely awesome + you don't have to parse it, because you are using a library, why even think of changing?
member
Activity: 145
Merit: 10
your a hardcore c programmer ;-P

i code php like that. but not c/c++
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I don't use an IDE. Just a text editor (kate) on linux.
member
Activity: 145
Merit: 10
you could save it in binary format ;-P

what IDE are you using for dev ? might take a look at it. visualstudio doesnt play nice with mingw
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I was considering that long term. It's just that with the code and features changing so rapidly, deciding on a format for the config file that's easy to use and parse is the real issue. Currently it accepts some basic json formatted config file and working on parsing code is not remotely my strong point  Undecided
member
Activity: 145
Merit: 10
A nice idea would be saving of the settings into a default.config file.

If the program is launched with no parameters and the default.config exists it would load the values from the default.config file.

If the program is launched with no parameters and there is no default.config or it is invalid, it would prompt the user for the values, and then save them to the default.config.
hero member
Activity: 807
Merit: 500
Precompiled Win32 binary crashes on --help on my XP Win32 system.  I also started getting "not a valid win32 application" after that crash, but the corruption may have been caused by my security software as opposed to the --help command  The --help crash happens even on fresh extraction, though (while mining works on fresh extraction).  I can post the dwwin output if it would be helpful.
full member
Activity: 126
Merit: 100
Thanks xcooling, everything works now Cheesy
member
Activity: 145
Merit: 10
Ok.. fixed the problem with mstcpip.h missing when compiling on windows (mingw)

mstcpip.h is a wine (codeweavers) header file and not a microsoft header file.

fix:
create a file named mstcpip.h and save it into your mingw/includes directory, paste the following contents into the file

mingw/includes/mstcpip.h  (version 1.1.2.4)
Code:
*
 * Copyright 2008 Hans Leidekker for CodeWeavers.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

struct tcp_keepalive
{
    u_long onoff;
    u_long keepalivetime;
    u_long keepaliveinterval;
};

#ifndef USE_WS_PREFIX

#define SIO_RCVALL            _WSAIOW(IOC_VENDOR, 1)
#define SIO_RCVALL_MCAST      _WSAIOW(IOC_VENDOR, 2)
#define SIO_RCVALL_IGMPMCAST  _WSAIOW(IOC_VENDOR, 3)
#define SIO_KEEPALIVE_VALS    _WSAIOW(IOC_VENDOR, 4)
#define SIO_ABSORB_RTRALERT   _WSAIOW(IOC_VENDOR, 5)
#define SIO_UCAST_IF          _WSAIOW(IOC_VENDOR, 6)
#define SIO_LIMIT_BROADCASTS  _WSAIOW(IOC_VENDOR, 7)
#define SIO_INDEX_BIND        _WSAIOW(IOC_VENDOR, 8)
#define SIO_INDEX_MCASTIF     _WSAIOW(IOC_VENDOR, 9)
#define SIO_INDEX_ADD_MCAST   _WSAIOW(IOC_VENDOR, 10)
#define SIO_INDEX_DEL_MCAST   _WSAIOW(IOC_VENDOR, 11)

#define RCVALL_OFF             0
#define RCVALL_ON              1
#define RCVALL_SOCKETLEVELONLY 2

#else

#define WS_SIO_RCVALL            _WSAIOW(WS_IOC_VENDOR, 1)
#define WS_SIO_RCVALL_MCAST      _WSAIOW(WS_IOC_VENDOR, 2)
#define WS_SIO_RCVALL_IGMPMCAST  _WSAIOW(WS_IOC_VENDOR, 3)
#define WS_SIO_KEEPALIVE_VALS    _WSAIOW(WS_IOC_VENDOR, 4)
#define WS_SIO_ABSORB_RTRALERT   _WSAIOW(WS_IOC_VENDOR, 5)
#define WS_SIO_UCAST_IF          _WSAIOW(WS_IOC_VENDOR, 6)
#define WS_SIO_LIMIT_BROADCASTS  _WSAIOW(WS_IOC_VENDOR, 7)
#define WS_SIO_INDEX_BIND        _WSAIOW(WS_IOC_VENDOR, 8)
#define WS_SIO_INDEX_MCASTIF     _WSAIOW(WS_IOC_VENDOR, 9)
#define WS_SIO_INDEX_ADD_MCAST   _WSAIOW(WS_IOC_VENDOR, 10)
#define WS_SIO_INDEX_DEL_MCAST   _WSAIOW(WS_IOC_VENDOR, 11)

#define WS_RCVALL_OFF             0
#define WS_RCVALL_ON              1
#define WS_RCVALL_SOCKETLEVELONLY 2

#endif /* USE_WS_PREFIX */
http://wine.sourcearchive.com/documentation/1.1.24/mstcpip_8h_source.html
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Just to confirm..

the SSE4 implementation is intel only ?

Would you be able to make an SSE4a (amd) implementation ?
Yes it's intel only. No, I cannot make an amd implementation because I'm not an assembly coder, but I'm very happy to accept code from others (which is where the SSE4 implementation came from). SSE4 was only marginally faster than SSE2 anyway on my Intel based CPU.

NOTE: None of this has anything to do with GPU mining.
member
Activity: 145
Merit: 10
Just to confirm..

the SSE4 implementation is intel only ?

Would you be able to make an SSE4a (amd) implementation ?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Well, I made it so it would compile even if your CPU didn't support the instruction, as requested. Now ytf it apparently doesn't support the instruction generated, when you have sse4a listed in your flags, is beyond me. Clearly whatever the instructions are in it, are not supported (and that explains why it refused to compile with it previously). Specifically it searches for SSE4.1 and I don't know how that differs from sse4.2 and sse4a (google might help). It will still detect what is supported and choose sse4 if it is there. If not supported, I suspect it will automatically default to sse2.

how much % faster than sse2 is sse4?

can i help in any other way reporting? ssh access to my PC?

sse4 subsets seems to be bit messy
http://en.wikipedia.org/wiki/SSE4



Your hardware simply does not support the full sse4 set so nothing I can do will make that sse4 code work on your machine.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
checking for the version of libcurl... 7.15.5
CURLOPT_SOCKOPTFUNCTION (Option added in 7.15.6.)

Darn.
newbie
Activity: 59
Merit: 0
Version 1.4.0 no longer builds on RHEL5:

Quote
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.15.5
checking for libcurl >= version 7.10.1... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
...
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I./lib -I./lib  -DHAS_YASM -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -Wall -MT cgminer-util.o -MD -MP -MF .deps/cgminer-util.Tpo -c -o cgminer-util.o `test -f 'util.c' || echo './'`util.c
util.c:254: error: expected declaration specifiers or '...' before 'curlsocktype'
util.c: In function 'json_rpc_call':
util.c:348: error: 'CURLOPT_SOCKOPTFUNCTION' undeclared (first use in this function)
util.c:348: error: (Each undeclared identifier is reported only once
util.c:348: error: for each function it appears in.)
make[2]: Leaving directory `/builddir/build/BUILD/cgminer-1.4.0'
make[2]: *** [cgminer-util.o] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/cgminer-1.4.0'
RPM build errors:
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.75423 (%build)
    Bad exit status from /var/tmp/rpm-tmp.75423 (%build)
Child returncode was: 1

Could be old gcc or curl... is it possible to put a conditional to fix this? Previous versions did build just fine... The full log is here: http://rpm.zaytsev.net/test/cgminer/build.log

P.S. The fix by ycros doesn't help, I tried to replace util.c.

P.P.S. Yes, that's the curl version that is too old. Is it possible to make longpoll optional via configure??? It doesn't have all this CURLOPT_SOCKOPTFUNCTION stuff. It would suck if the support for RHEL5 would have to be dropped completely.
newbie
Activity: 56
Merit: 0
Well, I made it so it would compile even if your CPU didn't support the instruction, as requested. Now ytf it apparently doesn't support the instruction generated, when you have sse4a listed in your flags, is beyond me. Clearly whatever the instructions are in it, are not supported (and that explains why it refused to compile with it previously). Specifically it searches for SSE4.1 and I don't know how that differs from sse4.2 and sse4a (google might help). It will still detect what is supported and choose sse4 if it is there. If not supported, I suspect it will automatically default to sse2.

how much % faster than sse2 is sse4?

can i help in any other way reporting? ssh access to my PC?

sse4 subsets seems to be bit messy
http://en.wikipedia.org/wiki/SSE4


-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
About speed in this new release:

Note there are a number of changes that will appear to affect reported speed in this release compared to previous ones.

First of all, there is a new kernel, which means that a new binary will be force built so the startup the first time you start it will be slower.

Second, the counters are no longer reset after all the threads have started - that was artificially raising the reported speed initially to ridiculous fake values.

Thus the reported speed will appear to be lower for a good 5 minutes or so. Give it some time.

However, the actual kernel code should be slightly faster now for 2 reasons.

First there is an updated kernel based on diapolo's modifications from here:
http://forum.bitcoin.org/index.php?topic=25860

Second, the code was audited to ensure I could allow the GPUs to run the code out-of-order.

Both of these should actually speed the kernel up.

Don't expect to see massive changes in speed, but any improvement is always welcome Smiley

Finally, dynamic mode will now throttle things much more dramatically under heavy user load to minimise the impact on the user experience. The intensity range used to go from 0-14, but now goes from -10 to +10. Levels above 10 were counter-productive, and in the opposite direction, some cards performed poorly even at intensity 0 (notably nvidia GPUs and lower spec 4x ATI cards).
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Well, I made it so it would compile even if your CPU didn't support the instruction, as requested. Now ytf it apparently doesn't support the instruction generated, when you have sse4a listed in your flags, is beyond me. Clearly whatever the instructions are in it, are not supported (and that explains why it refused to compile with it previously). Specifically it searches for SSE4.1 and I don't know how that differs from sse4.2 and sse4a (google might help). It will still detect what is supported and choose sse4 if it is there. If not supported, I suspect it will automatically default to sse2.
newbie
Activity: 56
Merit: 0
Just tested it:

[2011-07-23 12:59:10] 4 cpu miner threads started, using SHA256 'sse4_64' algorithm.                   

seems to work for me??

Make sure you do make clean && ./autogen.sh before ./configure when building from git?

 



ubuntu natty, 64bit, catalyst 11.6
CPU 6core AMD
CPU miner only. compiled without opencl.now version 1.4.0 from git
make clean && ./autogen.sh before ./configure when building from git

Code:
michal@rig:~/cgminer4$ ./cgminer -a sse4_64 -t 6 -o http://useast.btcguild.com:8332/ -u  xxxxxxxxxxx -p xxxxxxxxxxx

[2011-07-23 05:53:29] Testing pool http://useast.btcguild.com:8332/
[2011-07-23 05:53:29] X-Roll-Ntime found
[2011-07-23 05:53:29] Long-polling activated for http://useast.btcguild.com:8332/LP
[2011-07-23 05:53:29] Successfully retrieved and deciphered work from pool 0 http://useast.btcguild.com:8332/
[2011-07-23 05:53:29] Pool 0 http://useast.btcguild.com:8332/ active
[2011-07-23 05:53:29] Binding cpu mining thread 2 to cpu 2
[2011-07-23 05:53:29] Binding cpu mining thread 3 to cpu 3
[2011-07-23 05:53:29] 6 cpu miner threads started, using SHA256 'sse4_64' algorithm.Illegal instruction


Code:
processor	: 0
vendor_id : AuthenticAMD
cpu family : 16
model : 10
model name : AMD Phenom(tm) II X6 1100T Processor
stepping : 0
cpu MHz : 3300.855
cache size : 512 KB
physical id : 0
siblings : 6
core id : 0
cpu cores : 6
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr cpb npt lbrv svm_lock nrip_save pausefilter
bogomips : 6601.71
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate [9]


-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Great work Con *THUMBS UP* ... I have one strange observation though. When I first start up 1.4 on Windows, it will send 1-3 shares to pool 1 even if pool 0 is up. Any idea?

Dia
Yes it tests any new pool added to the list to see if it's alive. Since it asks for work, it seems a shame to just throw that work out, so it adds it to its queue  Wink
Jump to: