Author

Topic: (Dummies Guide) How to run multiple instances of cgminer whilst using BAMT (Read 14812 times)

legendary
Activity: 2296
Merit: 1031
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
newbie
Activity: 59
Merit: 0
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.
member
Activity: 70
Merit: 10
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?
newbie
Activity: 59
Merit: 0
Did you have trouble with your r9 290s? I can't seem to get more than one stable at a time.
member
Activity: 70
Merit: 10
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.



member
Activity: 70
Merit: 10
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.

newbie
Activity: 59
Merit: 0
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.
sr. member
Activity: 490
Merit: 254
Nice guide, thanks for the write-up. Smiley
newbie
Activity: 3
Merit: 0
Anyone? I would appreciate the help!
newbie
Activity: 3
Merit: 0
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
member
Activity: 70
Merit: 10
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
Jump to: