Author

Topic: Using cgminer with guiminer (Read 1090 times)

newbie
Activity: 21
Merit: 0
May 29, 2013, 01: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
member
Activity: 112
Merit: 10
May 28, 2013, 06: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.
newbie
Activity: 21
Merit: 0
May 27, 2013, 10:29:30 AM
#2
how to edit guiminer.py?
where is it, please?
member
Activity: 112
Merit: 10
March 07, 2013, 02: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
        # -T
        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.

Jump to: