Bitcoin Forum
May 03, 2024, 12:50:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: (Dummies Guide) How to run multiple instances of cgminer whilst using BAMT  (Read 14799 times)
jam3zs (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
December 30, 2013, 10:41:54 PM
 #1

In cgminer you cannot specify multiple values for gpu-threads. gpu-threads is a
global per-instance setting, not a per-GPU setting. If you want to run 2
different values of gpu-threads, you need to run 2 instances of cgminer.

This guide will help you if, for example; you have a rig in which one or more of
your cards run better with gpu-threads set to 1 and your other cards run better
with gpu-threads set to 2 (or 3 or 4)

So I'm going to assume here that you're running a rig with 4 cards and you're
already set up and mining.

I'm also going to assume that you know how to use nano.
So let's say your cgminer.conf has the line "gpu-threads" : "2",
Unfortunately your 4th card isn't giving you the hash-rate you're expecting from
it or worse, you're getting hardware errors which lead to rejected shares.

(to see if you're getting hardware errors in BAMT, you need to be able to see
what cgminer is actually displaying. To do this simply SSH to your rig, log in
and type "screen -r". I won't go too into this to much but where it says HW: you
don't want so see anything there, if you're seeing anything other than 0 then
you have problems with your config. Now to detach from this screen you need to
press "ctrl+A+D" this is very important, do not press q!)

Anyway, you know that the 4th card wants to run with "gpu-threads" : "1", but you
can't do "gpu-threads" : "2,2,2,1", this will not work!

So to get 2 cgminers running, follow these steps:

1. SSH to your rig, be logged in, and a super user. You should be seeing this:
root@bamt-miner:/home/user#

2. Type "nano /etc/bamt/cgminer.conf"
Add the line: "device" : "0-2",
This is saying that this instance of cgminer will be controlling GPUs 0, 1 & 2.
Save and exit (ctrl+x)

3. Type "nano startcgminer.sh"
This will create a new script that you will run later to boot up your 2nd
cgminer.

4. Add your info. below is mine but you want to replace with the settings for
your 4th card (gpu 3):
(where it says "device 3" this is saying that this instance of cgminer will only
run gpu 3 (4th card) and "remove-disabled" makes it so it won't display the other
cards)

Code:
export DISPLAY=:0
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export CGMINER_BIN=/opt/miners/cgminer/cgminer
$CGMINER_BIN --scrypt \
 -o miningpoolserver.com:3333 -u username -p password \
 -o backupminingpoolserver:3333 -u username -p password \
 -I 20 \
 -w 512 \
 --gpu-threads 1 \
 --thread-concurrency 32765 \
 --gpu-engine 990 \
 --gpu-memclock 1500 \
 --gpu-powertune 11 \
 --gpu-vddc 1.025 \
 --device 3 \
 --remove-disabled \
 --temp-cutoff 99 \
 --temp-overheat 95 \
 --temp-target 85 \
 --auto-fan \
 --gpu-fan 50-85

Note: Make sure there are no random spaces at the end of any of these lines and also     make sure that the I for intensity is upper case.
Now save and exit the script by hitting ctrl+x etc.

5. type "screen -ls" and hit enter, you should see something similar to this:

Code:
There are screens on:
    4366.pts-1.bamt-miner   (12/30/2013 08:00:56 PM)        (Detached)
1 Sockets in /var/run/screen/S-root.

So this is saying that there is currently only 1 screen running and BAMT is
using it to run cgminer inside.

6. Type "screen" and hit enter, it will come up with a load of text about
screen, just ignore that and hit enter again.
Now you are inside your new 2nd screen.

7. Now type ./startcgminer.sh
You should now see cgminer boot up and start mining with just gpu 3.
To detach from this screen you need to hit ctrl+a+d.

And that's it, there should now be 2 screens running.

To check the other screen type "screen -ls" and hit enter, you should now see both screens running. Something like this:

Code:
There are screens on:
    6349.cgminer    (12/30/2013 08:08:35 PM)        (Detached)
    4366.pts-1.bamt-miner   (12/30/2013 08:00:56 PM)        (Detached)
2 Sockets in /var/run/screen/S-root.

To look at one screen type "screen -r 6349", to look at the other type "screen
-r 4366" (remember to detach from screens using ctrl+a+d)

You should still be able to see info for the first 3 cards on BAMT's web UI and
in fact I can still see the temp and load for my 4th card.

Please feel free to leave feedback, or let me know if I've missed anything.

I hope you found this guide useful and if you did please consider a small BTC
donation Smiley

Bitcoin ID: 18juPJsn2u4TFQgtE7BJVy49r4MoL2zNqh
1714697439
Hero Member
*
Offline Offline

Posts: 1714697439

View Profile Personal Message (Offline)

Ignore
1714697439
Reply with quote  #2

1714697439
Report to moderator
1714697439
Hero Member
*
Offline Offline

Posts: 1714697439

View Profile Personal Message (Offline)

Ignore
1714697439
Reply with quote  #2

1714697439
Report to moderator
1714697439
Hero Member
*
Offline Offline

Posts: 1714697439

View Profile Personal Message (Offline)

Ignore
1714697439
Reply with quote  #2

1714697439
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714697439
Hero Member
*
Offline Offline

Posts: 1714697439

View Profile Personal Message (Offline)

Ignore
1714697439
Reply with quote  #2

1714697439
Report to moderator
-Ra7
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 01, 2014, 08:07:44 PM
 #2

Hi,

When i want to start cgminer in the second screen by typing "./startcgminer.sh". It says that i have no permission:
http://oi40.tinypic.com/nxrypc.jpg
-Ra7
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 02, 2014, 11:13:22 PM
 #3

Anyone? I would appreciate the help!
Number6
Sr. Member
****
Offline Offline

Activity: 490
Merit: 254



View Profile
January 02, 2014, 11:34:19 PM
 #4

Nice guide, thanks for the write-up. Smiley

BTC:   18jdvLeM6r943eUY4DEC5B9cQZPuDyg4Zn     LTC:   LeBh9akQ3RwxwpUU6pJQ9YGs9PrC1Zc9BK
nvandertill
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
January 06, 2014, 07:13:23 AM
Last edit: January 06, 2014, 08:31:13 AM by nvandertill
 #5

Nice one. I will definitely be utilizing this in some manner. I have an r9 280x and 4x r9 290s that I plan to run off the same rig. 280x will be gpu0 as I have seen people having trouble with 290s black screening. Hopefully with 280x I will be able to utilize it as my main display and still mine with the 290s. We'll see. Unfortunately the 280x is most efficient with 2 gpu-threads while 290 is best with 1.

He forgot to include the instruction to make the bash script executable. Ra7 this is your issue.
Run: 'chmod +x startcgminer.sh'
Now you should be golden.

On another note, shouldn't we just be able to make another config file using the settings you are using via command line in the bash script (/etc/bamt/cgminer2.conf) and then edit the BAMT default scripts to run it with the -c switch? This would make things nice and tidy and BAMT would control both instances with the menu scripts.

Also, I assume this means you need to set up another worker for this instance of cgminer? Will add to this if I can get it working with the separate config file.
jam3zs (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 09, 2014, 05:18:48 PM
 #6

Anyone? I would appreciate the help!

sorry for the late reply, I didn't notice anyone had commented on here!

Yes, I missed out a step (oops) you need to type chmod +x startcgminer.sh then hit enter.

jam3zs (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 09, 2014, 05:31:52 PM
 #7

Nice one. I will definitely be utilizing this in some manner. I have an r9 280x and 4x r9 290s that I plan to run off the same rig. 280x will be gpu0 as I have seen people having trouble with 290s black screening. Hopefully with 280x I will be able to utilize it as my main display and still mine with the 290s. We'll see. Unfortunately the 280x is most efficient with 2 gpu-threads while 290 is best with 1.

Yes I have those same cards! and that's the reason I did this. Smiley

On another note, shouldn't we just be able to make another config file using the settings you are using via command line in the bash script (/etc/bamt/cgminer2.conf) and then edit the BAMT default scripts to run it with the -c switch? This would make things nice and tidy and BAMT would control both instances with the menu scripts.

I tried this and it didn't work for me. You could give it a go though and if you have any success, let me know.

Also, I assume this means you need to set up another worker for this instance of cgminer? Will add to this if I can get it working with the separate config file.

Yes you will need to set up a second worker, I probably should have mentioned that too lol.



nvandertill
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
January 09, 2014, 06:13:41 PM
 #8

Did you have trouble with your r9 290s? I can't seem to get more than one stable at a time.
jam3zs (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 10, 2014, 01:23:28 PM
 #9

Did you have trouble with your r9 290s? I can't seem to get more than one stable at a time.

I only have 1 x 290 but it is the most unstable of my cards.

What problems do you have?
nvandertill
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
January 30, 2014, 05:29:49 PM
 #10

Okay so I figured I'd let everyone here know, sgminer 4.0.0 (cgminer 3.7.2 fork) has added support for a comma-seperated gpu-threads value. This should make it possible to run diff model cards all from the same instance of sgminer. This script is obsolete (sorry OP). Sgminer is scrypt only BTW. Also included in this great fork is many fixes to make the R9 290s stable! Fantastic stuff.
grendel25
Legendary
*
Offline Offline

Activity: 2282
Merit: 1031



View Profile
February 04, 2014, 06:26:27 PM
 #11

Does anyone know how I'd address this issue using cgminer 3.7.2 and in Windows 7 64 bit?  I have multiple gpus (3 atm) and some like gpu-thread 1 and some like gpu-thread 2.  Pretty sure my cgminer crashes if I try to do -g 2,1,1

..EPICENTRAL .....
..EPIC: Epic Private Internet Cash..
.
.
▄▄█████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄████████████████▀▀█████▄
▄████████████▀▀▀    ██████▄
████████▀▀▀   ▄▀   ████████
█████▄     ▄█▀     ████████
████████▄ █▀      █████████
▀████████▌▐       ████████▀
▀████████ ▄██▄  ████████▀
▀█████████████▄███████▀
▀█████████████████▀
▀▀█████████▀▀
.
▄▄█████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄████████▀█████▀████████▄
▄██████▀  ▀     ▀  ▀██████▄
██████▌             ▐██████
██████    ██   ██    ██████
█████▌    ▀▀   ▀▀    ▐█████
▀█████▄  ▄▄     ▄▄  ▄█████▀
▀██████▄▄███████▄▄██████▀
▀█████████████████████▀
▀█████████████████▀
▀▀█████████▀▀
.
.
[/center]
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!