Bitcoin Forum
December 09, 2016, 09:54:10 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 [280] 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 ... 830 »
  Print  
Author Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.9.2  (Read 4824411 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
crazyates
Legendary
*
Offline Offline

Activity: 938



View Profile
May 23, 2012, 08:24:04 PM
 #5581

I have my computer set to restart every day at a certain time, and CGMiner starts when windows starts. Ya lose 3 minutes of hashing a day, but no 7 day bug you're talking about. The temp/fanspeed/dynamic OC is what makes CGMiner great!

Wrong!  If cgminer crashes right after your reboot, you can lose a bit more than 3 minutes.


I have a .bat that pings 127.0.0.1 a couple dozen times and then starts CGMiner. This makes sure the User is fully logged on, connected to the wifi, and the HD has stopped before I start mining. It's never crashed on me yet...

Tips? 1crazy8pMqgwJ7tX7ZPZmyPwFbc6xZKM9
Previous Trade History - Sale Thread
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
May 23, 2012, 08:55:23 PM
 #5582

It doesn't happen on linux like this - only windows.
If it happened the same way on both linux and windows then it could be a possible cgminer code fix, but since it is windows specific (and not reproducible on linux) it is extremely likely to be in the ATI windows library
Also the fact that the GPU doesn't stop working (if you use --no-restart) but simply loses it's ADL information, again means it is in the ATI library that is the problem.

Why do you expect AMD code to work the same way on Linux and Windows?
If you unloaded the ADL dll before re-initializing opencl, and then reloaded it, you would not have "this ADL library bug".

Just because it happens to work on Linux does not mean it must work on Windows.
It is like saying: my cgminer works in my environment so it is not a bug.
The point is this particular problem doesn't happen on linux in the first place - it only happens on windows.
The problem is that the miner keeps hashing but the ADL stops working ... after a long period of time (something like 6 or 7 days)
If you have a workaround to fix this ATI bug (yes it is a bug) then feel free to discuss this with ckolivas (if he is interested)
There is also the issue of testing a workaround ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
smracer
Donator
Legendary
*
Offline Offline

Activity: 1022



View Profile
May 23, 2012, 09:39:48 PM
 #5583

I just setup another copy of Ubuntu running on another thin client.

On all my other thin clients I can see all the temps, speed etc on one screen.

On this new one they are just flying by in one line and it is very hard to see what is going on.  I am guessing I changed the view somehow maybe in the conf file?

How can I get back to the regular cgminer screen?

2.4.1

Thanks

1smracer15yDLhJG27fd7GV3tegcNjtg2
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
May 23, 2012, 10:40:41 PM
 #5584

I just setup another copy of Ubuntu running on another thin client.

On all my other thin clients I can see all the temps, speed etc on one screen.

On this new one they are just flying by in one line and it is very hard to see what is going on.  I am guessing I changed the view somehow maybe in the conf file?

How can I get back to the regular cgminer screen?

2.4.1

Thanks
'Thin client'? NFI what you mean by that.

Not sure what you did wrong, but it could be one of the following:
1) You (or someone else you got it from) compiled cgminer without curses
 Solution - tell the person who compiled it to check the output of ./configure when they run it

2) You used -T and somehow got that into the ~/.cgminer/cgminer.conf file
 (look for "text-only" : true and remove it)
You might also find "debug" : true and "verbose" : true that you want to also remove

3) Maybe curses failed to load and it went into text mode coz you are using 11.04 and forgot to:
 cd /lib64/
 sudo ln -s libncurses.so.5 libtinfo.so.5

Not sure what else at the moment.

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
smracer
Donator
Legendary
*
Offline Offline

Activity: 1022



View Profile
May 23, 2012, 11:34:31 PM
 #5585

ty so much.

configure: WARNING: Could not find curses library - if you want a TUI, install libncurses-dev or pdcurses-dev

1smracer15yDLhJG27fd7GV3tegcNjtg2
P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
May 24, 2012, 06:24:40 AM
 #5586

Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
{
while (*hexstr && len) {
char hex_byte[3];
unsigned int v;

if (!hexstr[1]) {
applog(LOG_ERR, "hex2bin str truncated");
return false;
}

hex_byte[0] = hexstr[0];
hex_byte[1] = hexstr[1];
hex_byte[2] = 0;

if (sscanf(hex_byte, "%x", &v) != 1) {
applog(LOG_ERR, "hex2bin sscanf '%s' failed", hex_byte);
return false;
}

*p = (unsigned char) v;

p++;
hexstr += 2;
len--;
}

return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?
af_newbie
Legendary
*
Offline Offline

Activity: 896



View Profile
May 24, 2012, 01:48:48 PM
 #5587

Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
...
return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?

I think the code is correct.  It also checks input parameters.

If size of buffer (p) is too small for a given hex str,the caller would know that something is wrong.
If the hexStr is truncated to size less than buffer (p) length, the caller would know.

For example: if hexStr points to 32 hex numbers, but the size of buffer pointed by p is 64, the function would return false.
If you had || instead of &&, the function would return true and the caller would assume that there are 64 valid (0-255) bytes.

If you had a prototype:

bool hex2bin(unsigned char *buf, int bufSize, const char *hexstr, int * outlen)

it would allow callers to check the size of the converted binary buffer.

cengique
Member
**
Offline Offline

Activity: 64


View Profile
May 24, 2012, 02:17:32 PM
 #5588

...
I did the sudo aticonfig -f --adapter=all --initial and rebooted, I also deleted the .bin file in cgminer's directory.

CGminer gave an error about the number of devices not matching. It saw three devices, but OpenCL was only seeing one?
...
opencl has nothing to do with xorg I'm afraid, but what you need before starting cgminer is:
Code:
export DISPLAY=:0


I'm not running as root. DISPLAY is already set. And I'm not using SSH, I'm on the local console.

I just suffered from the same problem. If your DISPLAY is set to ":0.0", clinfo only finds one card!!! This is dumb.

You can correct it by setting it to ":0" as suggested above.

I found the solution haphazardly from here: http://devgurus.amd.com/thread/140667
crazyates
Legendary
*
Offline Offline

Activity: 938



View Profile
May 24, 2012, 02:25:41 PM
 #5589

...
I did the sudo aticonfig -f --adapter=all --initial and rebooted, I also deleted the .bin file in cgminer's directory.

CGminer gave an error about the number of devices not matching. It saw three devices, but OpenCL was only seeing one?
...
opencl has nothing to do with xorg I'm afraid, but what you need before starting cgminer is:
Code:
export DISPLAY=:0


I'm not running as root. DISPLAY is already set. And I'm not using SSH, I'm on the local console.

I just suffered from the same problem. If your DISPLAY is set to ":0.0", clinfo only finds one card!!! This is dumb.

You can correct it by setting it to ":0" as suggested above.

I found the solution haphazardly from here: http://devgurus.amd.com/thread/140667

It's not dumb - it's the way Xorg works. Before I was using CGMiner, I had 3 instances of phoenix on :0.0 :0.1 and :0.2 . That's how you specify cards.

Tips? 1crazy8pMqgwJ7tX7ZPZmyPwFbc6xZKM9
Previous Trade History - Sale Thread
P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
May 24, 2012, 03:24:38 PM
 #5590

Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
...
return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?

I think the code is correct.  It also checks input parameters.

If size of buffer (p) is too small for a given hex str,the caller would know that something is wrong.
If the hexStr is truncated to size less than buffer (p) length, the caller would know.

For example: if hexStr points to 32 hex numbers, but the size of buffer pointed by p is 64, the function would return false.
If you had || instead of &&, the function would return true and the caller would assume that there are 64 valid (0-255) bytes.

If you had a prototype:

bool hex2bin(unsigned char *buf, int bufSize, const char *hexstr, int * outlen)

it would allow callers to check the size of the converted binary buffer.



Thing is, the BFL uses hex2bin the other way round: the string is longer than p. The BFL returns a string of nonces, hex2bin is used to extract these nonces. There's no null terminator on each nonce, so hex2bin is returning an error, even though everything is fine.
af_newbie
Legendary
*
Offline Offline

Activity: 896



View Profile
May 24, 2012, 04:02:19 PM
 #5591

Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
...
return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?

I think the code is correct.  It also checks input parameters.

If size of buffer (p) is too small for a given hex str,the caller would know that something is wrong.
If the hexStr is truncated to size less than buffer (p) length, the caller would know.

For example: if hexStr points to 32 hex numbers, but the size of buffer pointed by p is 64, the function would return false.
If you had || instead of &&, the function would return true and the caller would assume that there are 64 valid (0-255) bytes.

If you had a prototype:

bool hex2bin(unsigned char *buf, int bufSize, const char *hexstr, int * outlen)

it would allow callers to check the size of the converted binary buffer.



Thing is, the BFL uses hex2bin the other way round: the string is longer than p. The BFL returns a string of nonces, hex2bin is used to extract these nonces. There's no null terminator on each nonce, so hex2bin is returning an error, even though everything is fine.

Not sure which version of driver-bitforce.c you are looking at but 2.4.1 does not check return code from hex2bin().  Sure, terminating after first 4 hex numbers would be better for BFL and Icarus, but jobj_binary()/work_decode() also uses this and checks the return code.  
P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
May 24, 2012, 04:28:24 PM
 #5592


Not sure which version of driver-bitforce.c you are looking at but 2.4.1 does not check return code from hex2bin().  Sure, terminating after first 4 hex numbers would be better for BFL and Icarus, but jobj_binary()/work_decode() also uses this and checks the return code. 


I'm bug chasing, so I edited the code to use the return value.
af_newbie
Legendary
*
Offline Offline

Activity: 896



View Profile
May 24, 2012, 04:32:24 PM
 #5593


Not sure which version of driver-bitforce.c you are looking at but 2.4.1 does not check return code from hex2bin().  Sure, terminating after first 4 hex numbers would be better for BFL and Icarus, but jobj_binary()/work_decode() also uses this and checks the return code. 


I'm bug chasing, so I edited the code to use the return value.
P_Shep, I think the code is ok as is.  It actually terminates after 4 hex numbers are converted (len =0)
P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
May 24, 2012, 04:44:30 PM
 #5594

I don't know, I think success should return success, and failure should return failure.
In this case, it terminates a successful conversion with failure.

Also, I changed it in my code to || last night... still working fine for me Smiley
wogaut
Donator
Sr. Member
*
Offline Offline

Activity: 448



View Profile
May 24, 2012, 04:50:06 PM
 #5595

I'm reposting this from this newbie thread (since I think here's a better place for it:
Re: Running an FPGA on Raspberry Pi, possible?

OK, here's how far I got installing cgminer on my Raspberry Pi:
Code:
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install libncurses-dev
sudo apt-get install yasm
sudo apt-get install curl
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install pkg-config
Download zip archive from https://github.com/ckolivas/cgminer
Code:
unzip ckolivas-cgminer-v2.4.1-9-gb69d735.zip
cd ckolivas-cgminer-b69d735/
./autogen.sh
./configure --enable-bitforce
configure then quits after a while with the following errors:
Code:
./configure: line 9269: syntax error near unexpected token `PKG_CHECK_MODULES'
./configure: line 9269: `PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.15.6, AC_DEFINE([CURL_HAS_SOCKOPT], [1], [Defined if version of curl supports sockopts.]),'

Doing a
Code:
curl-config --version
results in
Code:
libcurl 7.21.0
so the libcurl version should work.

Does anybody have an idea what the issue might be?



Inaba
Legendary
*
Offline Offline

Activity: 1260



View Profile WWW
May 24, 2012, 04:51:47 PM
 #5596

got libcurl-dev installed?

If you're searching these lines for a point, you've probably missed it.  There was never anything there in the first place.
P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
May 24, 2012, 04:54:01 PM
 #5597


Does anybody have an idea what the issue might be?


to get it working in openwrt, i had to manually specify the location of the lib.

LIBCURL_CFLAGS=-L/path/to/lib LIBCURL_LIBS=-lcurl
wogaut
Donator
Sr. Member
*
Offline Offline

Activity: 448



View Profile
May 24, 2012, 05:40:55 PM
 #5598


Does anybody have an idea what the issue might be?


to get it working in openwrt, i had to manually specify the location of the lib.

LIBCURL_CFLAGS=-L/path/to/lib LIBCURL_LIBS=-lcurl


Good catch, but after defining these variables myself ./configure works
Code:
LIBCURL_CFLAGS='-I/usr/include/curl'
LIBCURL_LIBS='-L/usr/lib -lcurl'
and having a closer look at the error, it appears to me that it doesn't like the syntax of PKG_CHECK_MODULES.
Commenting out these two lines unfortunately leads to an undefined variable ACEOF which causes more issues.
Did you have these issues too?


Scratch that, I had to run aclocal before ./autogen.sh



P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
May 24, 2012, 06:00:46 PM
 #5599

Great! Smiley
crazyates
Legendary
*
Offline Offline

Activity: 938



View Profile
May 24, 2012, 09:34:44 PM
 #5600

Question: If I upgrade one of my 58XX cards to a 79XX card, and consequently upgrade my SDK from 2.5 to 2.6, I can still use the phatk .bin from 2.5 on the 5870, correct?

2.6 will be installed, but I'd be using a phatk.bin from 2.5 on my 5870, and a diakgcn.bin from 2.6 on the 79XX for the best speed, correct?

Now how do I keep those .bins in use in future versions of CGMiner? (I do keep backups of my known good working bins in a separate folder)

Tips? 1crazy8pMqgwJ7tX7ZPZmyPwFbc6xZKM9
Previous Trade History - Sale Thread
Pages: « 1 ... 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 [280] 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 ... 830 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!