Bitcoin Forum
May 29, 2024, 06:49:42 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using cgminer with guiminer  (Read 1066 times)
Marrs (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
March 07, 2013, 07:31:39 PM
 #1

I started using guiminer recently as a wrapper around cgminer, to make cgminer more easily trayable, stoppable, and restartable on my wife's desktop. I'm fine with cgminer's curses interface, but she's much more confortable with a GUI.

I noticed that the current version of guiminer doesn't understand the output from the most recent version of cgminer, but with a few minor changes, that can be fixed:

In guiminer.py, find CgListenerThread and change it to:

Code:
class CgListenerThread(MinerListenerThread):
    LINES = [
        (r"Accepted .* GPU \d+ pool \d+",
            lambda _: UpdateAcceptedEvent(accepted=True)),
        (r"Rejected .* GPU \d+ pool \d+",
            lambda _: UpdateAcceptedEvent(accepted=False)),
        (r"\(\d+s\):(\d+)\.?(\d*).*Mh/s", lambda match:
            UpdateHashRateEvent(rate=float(match.group(1) + '.' + match.group(2)) * 1000)),
        (r"^GPU\s*\d+",
            lambda _: None), # Just ignore lines like these
    ]

I also wanted to make cgminer use it's own config file for username, hostname, etc. so I don't have to create multiple miner tabs in guiminer to run multiple GPUs in separate cgminer instances. That can be done by changing configure_subprocess_cgminer (also in guiminer.py) to:

Code:
    def configure_subprocess_cgminer(self):
        """Set up the command line for cgminer."""
        path = self.external_path

        # Command line arguments for cgminer here:
        # -l <log message period in second>
        # -T <disable curses interface and output to console (stdout)>
        cmd = "%s -l 1 -T" % (path)
        return cmd, os.path.dirname(self.external_path)

It would probably be ideal to make this a configurable option from the cgminer tab in guiminer, but I haven't bothered to do that yet.

At some point, I might make a github account and submit these changes as pull requests to Kiv, but for now, I'll just make them available here if anyone wants them.

demigo
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
May 27, 2013, 03:29:30 PM
 #2

how to edit guiminer.py?
where is it, please?
Marrs (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
May 28, 2013, 11:49:54 PM
 #3

If you want to apply the above patches, you need to use the python code from https://github.com/Kiv/poclbm instead of running the Windows executable.
demigo
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
May 29, 2013, 06:55:42 AM
 #4

If you want to apply the above patches, you need to use the python code from https://github.com/Kiv/poclbm instead of running the Windows executable.


thank you
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!