Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: rethaw on June 05, 2011, 07:02:15 PM



Title: GPU Mining on OS X Using poclbm
Post by: rethaw on June 05, 2011, 07:02:15 PM
Mac users are reporting difficulties with the latest kernels. If possible, make a copy of your miner before updating to a newer version.

For those wanting to use poclbm to do GPU mining on Snow Leopard these are the steps I followed.

1) Install XCode (https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792), its free from Apple. If you haven't already you will need to sign up for a developer account, which is also free.

2) Install bitcoin from http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.21/bitcoin-0.3.21-macosx.zip/download (http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.21/bitcoin-0.3.21-macosx.zip/download) (or latest).

3) Open a terminal and enter the commands:

Code:
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install
cd ..
curl -o pyopencl.tar.gz http://pypi.python.org/packages/source/p/pyopencl/pyopencl-2011.1beta3.tar.gz#md5=efc633bb5e7a03207fa657a61a12c7af
tar -xzvf pyopencl.tar.gz
cd pyopencl-2011.1beta3
python configure.py
make
sudo make install
mkdir /Applications/poclbm
cd /Applications/poclbm
curl -o phatk.cl https://raw.github.com/m0mchil/poclbm/master/phatk.cl
curl -o BitcoinMiner.py https://raw.github.com/m0mchil/poclbm/master/BitcoinMiner.py
curl -o poclbm.py https://raw.github.com/m0mchil/poclbm/master/poclbm.py
curl -o sha256.py https://raw.github.com/m0mchil/poclbm/master/sha256.py

There will now be a poclbm folder in your Applications. You can now either start solo or pool mining.

Solo mining, first edit your bitcoin.conf to allow local RPC:

Code:
echo "rpcuser=username" > ~/Library/Application\ Support/Bitcoin/bitcoin.conf
echo "rpcpassword=password" >> ~/Library/Application\ Support/Bitcoin/bitcoin.conf

Then each time you want to start mining:

Code:
/Applications/Bitcoin.app/Contents/MacOS/bitcoin -server &
python /Applications/poclbm/poclbm.py -u username --pass password -d 0

Pooled mining: I suggest joining Deepbit (http://deepbit.net) or mining.bitcoin.cz (http://mining.bitcoin.cz). You can then start mining by entering:

Code:
python /Applications/poclbm/poclbm.py http://username:password@api.bitcoin.cz:8332 -d 0

Happy mining! I'm curious how many Mhash/s people with the new iMac's are getting. On my 2010 iMac I'm getting around 30Mhash/s.

Note: Your device may be at a different location. You can enumerate the devices by running poclbm without any flags.

Thanks to Easy Ubuntu python OpenCL mining setup (http://forum.bitcoin.org/?topic=2636)


Title: Re: GPU Mining on OS X Using poclbm
Post by: URSAY on June 05, 2011, 11:37:44 PM
Anyone else using this?


Title: Re: GPU Mining on OS X Using poclbm
Post by: Planetexpress on June 06, 2011, 07:57:52 AM
Hello,

I try to install it on my mac but i get this error so it would not work.

PLZ Help.


localhost:pyopencl-2011.1beta3 XXXXX$ make
-bash: make: command not found
localhost:pyopencl-2011.1beta3 XXXXX$ sudo make install
sudo: make: command not found
localhost:pyopencl-2011.1beta3 XXXXX$ mkdir /Applications/poclbm


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 06, 2011, 02:33:31 PM
Hello,

I try to install it on my mac but i get this error so it would not work.

PLZ Help.


localhost:pyopencl-2011.1beta3 XXXXX$ make
-bash: make: command not found
localhost:pyopencl-2011.1beta3 XXXXX$ sudo make install
sudo: make: command not found
localhost:pyopencl-2011.1beta3 XXXXX$ mkdir /Applications/poclbm

Make is part of XCode.  This means that you failed at step 1.  You either skipped it or XCode didn't get installed properly and you should try reinstalling.


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 06, 2011, 02:44:01 PM
Something which seems to be missing in the instructions...

I'm got the following:

python: can't open file '/Applications/poclbm/poclbm.py': [Errno 2] No such file or directory

I copied poclbm.py,  along with a bunch of other stuff, which ended up in ~/pyopencl-2011.1beta3/  into /Applications/poclbm/ and that seems to have taken care of the error.

Is there a missing line in the instructions? Should you cd into /Applications/poclbm before doing the steps with curl?

...
mkdir /Applications/poclbm
cd /Applications/poclbm
curl -o BitcoinMiner.cl https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.cl
...


Title: Re: GPU Mining on OS X Using poclbm
Post by: rb2k on June 06, 2011, 02:44:07 PM
Happy mining! I'm curious how many Mhash/s people with the new iMac's are getting. On my 2010 iMac I'm getting around 30Mhash/s.

2011 MBP: 60 Mhash/s


p.s. why don't you just use easy_install for e.g. pycopencl rather than manually downloading stuff?


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 06, 2011, 02:54:58 PM
Okay,  I still haven't got this working.  Now I'm getting:

Traceback (most recent call last):
  File "/Applications/poclbm/poclbm.py", line 3, in <module>
    import pyopencl as cl
  File "/Applications/poclbm/pyopencl/__init__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: No module named _cl

How do I fix that?


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 06, 2011, 04:20:29 PM
Is there a missing line in the instructions? Should you cd into /Applications/poclbm before doing the steps with curl?

...
mkdir /Applications/poclbm
cd /Applications/poclbm
curl -o BitcoinMiner.cl https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.cl
...

Thanks afingal I added it. It seems like pyopencl never got installed properly. You could retry the steps:

Code:
curl -o pyopencl.tar.gz http://pypi.python.org/packages/source/p/pyopencl/pyopencl-2011.1beta3.tar.gz#md5=efc633bb5e7a03207fa657a61a12c7af
tar -xzvf pyopencl.tar.gz
cd pyopencl-2011.1beta3
python configure.py
make
sudo make install

If there are any errors you probably need to install XCode.


Title: Re: GPU Mining on OS X Using poclbm
Post by: cuthbert on June 06, 2011, 04:38:14 PM
Im getting ~96 Mhash/s on my new 2011 iMac (with a ATI 6970m GPU), using the Diablo GUI published in another thread here. Kind of disappointing low hash rate I think.

Is there reason to believe poclbm would give a higher hash rate?



Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 06, 2011, 04:45:06 PM

Thanks afingal I added it. It seems like pyopencl never got installed properly. You could retry the steps:

Code:
curl -o pyopencl.tar.gz http://pypi.python.org/packages/source/p/pyopencl/pyopencl-2011.1beta3.tar.gz#md5=efc633bb5e7a03207fa657a61a12c7af
tar -xzvf pyopencl.tar.gz
cd pyopencl-2011.1beta3
python configure.py
make
sudo make install

If there are any errors you probably need to install XCode.

I tried that and I'm still getting the same error.  Make install is saying stuff like the following (pulling out select lines):

pyopencl 2011.1beta3 is already the active version in easy-install.pth
decorator 3.3.1 is already the active version in easy-install.pth
py 1.4.3 is already the active version in easy-install.pth
pytools 2011.3 is already the active version in easy-install.pth


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 06, 2011, 04:53:02 PM
The difference between Diablo and poclbm is that Diablo runs on Java and poclbm on Java. Some people have noticed appreciable differences between the two, though with the right flags they should be very close to each other.

I am now using poclbm because it can do regular CPU mining as well as GPU, even though its only a few more Mhash/s. It also shows the hashes of each share. There's no risk in seeing if there is a difference for you.


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 06, 2011, 05:02:14 PM
Im getting ~96 Mhash/s on my new 2011 iMac (with a ATI 6970m GPU), using the Diablo GUI published in another thread here. Kind of disappointing low hash rate I think.

Is there reason to believe poclbm would give a higher hash rate?

I arrived here by looking up and down the reported performance at https://en.bitcoin.it/wiki/Mining_hardware_comparison and looking for people who had specifically reported that they were using a Mac.  poclbm gives slightly better performance than Diablo GUI in the one equal comparison on a Mac, though it's not the specific graphics card which I have.  I mainly chose to try and work with poclbm because it seems to be relatively popular.  I should try Diablo as well when I get a chance.  It seems to me, glancing up and down the list, that Mac performance is relatively poor in general.  I don't know why.  It could be configuration issues or it could be a poor complier/interpreter.  I don't know the specifics of the individual cases and this can be a complex thing to figure out because, even if the interpreter for a language like Python is good, it may be calling a module, somewhere down the line, written in some other language where the compiler isn't so great. 


Title: Re: GPU Mining on OS X Using poclbm
Post by: Planetexpress on June 06, 2011, 06:06:42 PM
hmm my xcode ist the latest one, we use it for development without any problems.

Could you please reposte the new code for the installation?


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 06, 2011, 06:36:21 PM

Thanks afingal I added it. It seems like pyopencl never got installed properly. You could retry the steps:

Code:
curl -o pyopencl.tar.gz http://pypi.python.org/packages/source/p/pyopencl/pyopencl-2011.1beta3.tar.gz#md5=efc633bb5e7a03207fa657a61a12c7af
tar -xzvf pyopencl.tar.gz
cd pyopencl-2011.1beta3
python configure.py
make
sudo make install

If there are any errors you probably need to install XCode.

I tried that and I'm still getting the same error.  Make install is saying stuff like the following (pulling out select lines):

pyopencl 2011.1beta3 is already the active version in easy-install.pth
decorator 3.3.1 is already the active version in easy-install.pth
py 1.4.3 is already the active version in easy-install.pth
pytools 2011.3 is already the active version in easy-install.pth


So... I Googled around a bit, still trying to solve the problem on my own, and found the following:

http://lists.tiker.net/pipermail/pyopencl/2011-April/000612.html

This seems like a good possibility since I am indeed using a Mac Pro. I fumbled around trying things but I think the following are the relevant lines:

Code:
VERSIONER_PYTHON_PREFER_32_BIT=yes # for 32b
VERSIONER_PYTHON_PREFER_32_BIT=yes # for 64b
rm ./siteconf.py
python configure.py
make clean
make
sudo make install

I get the same errors as above. I'm guessing that I need to do some kind of sudo make uninstall command but I'm not sure what.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 07, 2011, 01:01:08 AM
afingal: I'm sorry you're having problems. I don't have a Mac Pro, but it does seem like it could be an issue with 32 vs. 64-bit. You can try "make clean".

Good luck.

planetexpress: What is the output when you enter "/usr/bin/make" into a terminal?


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 07, 2011, 11:24:34 PM
Am i entering anything specific for -u username and --pass password? I'm close to having this work, but I'm not very terminal savvy.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 08, 2011, 12:14:20 AM
Are you doing solo mining? If so you will use the username and password in your bitcoin.conf. If you had copied and pasted my directions verbatim these would just be "username" and "password".

For pooled mining you would use the login info you set up with your pool. Let me know how it goes.


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 08, 2011, 12:20:31 AM
I search for Bitcoin.conf on my computer and don't get results. Is this file on my computer?


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 08, 2011, 12:23:22 AM
What happens when you execute these lines? Make sure bitcoin is closed.


Code:
/Applications/Bitcoin.app/Contents/MacOS/bitcoin -server &
python /Applications/poclbm/poclbm.py -u username --pass password -d 0


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 08, 2011, 12:28:31 AM
Those are two separate commands right? Sorry I'm new to this...

The first returns "No such file or directory"

The second returns a sytaxerror: invalid syntax


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 08, 2011, 12:34:19 AM
Ahhh Bitcoin wasn't in my Applications directory. Now the first returns:


[2] 1008
[1]   Exit 127                /Applications/Bitcoin.app/Contents/MacOS/bitcoin -server

And the app opens in my dock


but the second line is still a syntax error.


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 08, 2011, 12:44:35 AM
afingal: I'm sorry you're having problems. I don't have a Mac Pro, but it does seem like it could be an issue with 32 vs. 64-bit. You can try "make clean".

Good luck.

I already tried "make clean" but I haven't tried actually booting into full 64-bit mode, which was another suggestion on the page I referenced earlier.  I'll might try that when I get a chance.  Meanwhile, I now have poclbm working on my MacBook although that's no where near as good as I expect the Mac Pro to be.  I'll post more about that in just a bit. 


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 08, 2011, 12:53:30 AM
Those are two separate commands right? Sorry I'm new to this...

Yes. In fact I'm running them in two separate terminal windows. 

The first returns "No such file or directory"

Okay, I see you solved that while I was previewing my reply.

The second returns a sytaxerror: invalid syntax

I'm using the command exactly as you show it and it's working.  Maybe, try and re-type it just to make sure you have it exactly?


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 08, 2011, 12:54:48 AM
bnh096:~ xxxx$  /Applications/poclbm/poclbm.py -u username --pass password -d
-bash: /Applications/poclbm/poclbm.py: Permission denied
bnh096:~ xxxx$


xxxx is my computer name




Title: Re: GPU Mining on OS X Using poclbm
Post by: Kermee on June 08, 2011, 01:00:13 AM
Im getting ~96 Mhash/s on my new 2011 iMac (with a ATI 6970m GPU), using the Diablo GUI published in another thread here. Kind of disappointing low hash rate I think.

Is there reason to believe poclbm would give a higher hash rate?

Running guiminer on Bootcamp'ed Windows 7 x64 on a Mid-2010 iMac (ATI 5850M GPU), I was getting ~128 Mh/s.  ATI 6970M should be at least 50% faster if not more.

Just make sure you up the fans and keep GPU-z running to monitor GPU temps but at 98% load, my GPU's were around 68C.

Cheers,
Kermee


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 08, 2011, 01:01:50 AM
You need to put "python" in front of the line you entered.


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 08, 2011, 01:21:00 AM
The reason I took it out is because this:


bnh096:~ xxxx$ python /Applications/poclbm/poclbm.py -u username --pass password -d 0
  File "/Applications/poclbm/poclbm.py", line 1
    <html><body>You are being <a href="https://raw.github.com/m0mchil/poclbm/master/poclbm.py">redirected</a>.</body></html>
    ^
SyntaxError: invalid syntax


Title: Re: GPU Mining on OS X Using poclbm
Post by: afingal on June 08, 2011, 01:31:06 AM
I've got this working on my MacBook now.  At first, I got "Permission denied" when I tried to connect so I opened up bitcoin.conf and found that there was only one line in it which was "rpcuser=password" so I fixed it according to the example given in the following link:

https://en.bitcoin.it/wiki/Running_Bitcoin

Now it works.

Using the following for the CPU (Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz):
Code:
python /Applications/poclbm/poclbm.py -u username --pass password -d 1
I get 1.6 Mhash/s which is exactly the same as I get with the Bitcoin GUI client set to generate coin. 

Then using the GPU (GeForce 9400M):
Code:
python /Applications/poclbm/poclbm.py -u username --pass password -d 0
I get 1.4 Mhash/s.  So the CPU is actually better than the GPU on this hardware.  The upside is that the GPU produces much less heat and the fan does not have to go as fast.


Title: Re: GPU Mining on OS X Using poclbm
Post by: taykaypee on June 08, 2011, 05:40:55 AM
host-103-84:~ xxxx$ rpcuser=taykaypee
host-103-84:~ xxxx$ rpcpassword=yyyy
host-103-84:~ adiep$ python /Applications/poclbm/poclbm.py -u username --pass password -d 0
  File "/Applications/poclbm/poclbm.py", line 1
    <html><body>You are being <a href="https://raw.github.com/m0mchil/poclbm/master/poclbm.py">redirected</a>.</body></html>
    ^
SyntaxError: invalid syntax



where xxxx is the name of my computer admin and yyyy is a password. Sorry, I don't understand, I'm new to this >< what am i doing wrong?


Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 08, 2011, 03:26:55 PM
I'm getting the same error:

  File "/Applications/poclbm/poclbm.py", line 1
    <html><body>You are being <a href="https://raw.github.com/m0mchil/poclbm/master/poclbm.py">redirected</a>.</body></html>
    ^
SyntaxError: invalid syntax

When I open the BitcoinMiner.py file with BBEdit, there is only a single line in the file:
<html><body>You are being <a href="https://raw.github.com/m0mchil/poclbm/master/BitcoinMiner.py">redirected</a>.</body></html>

Is this what should be in the BitcoinMiner.py file? How to fix?


Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 08, 2011, 03:50:12 PM
Making some progress --

Apparently the https://github.com/.... links redirect to https://raw.github.com/..... so I modified the curl commands accordingly. Now I have real stuff in all 4 files under /Applications/poclbm

When I run the first command:
/Applications/Bitcoin.app/Contents/MacOS/bitcoin -server &
the Bitcoin application starts up and I can see the application running in another window. Seems OK.

When I run the second command in the terminal window:
python /Applications/poclbm/poclbm.py -u xxxxxx --pass yyyyy -d 0
I get the following line:
Bitcoin is not connected!
The terminal prompt does not return, and the Activity Monitor shows no significant process is running in the background.

Now what?


Title: Re: GPU Mining on OS X Using poclbm
Post by: enewhuis on June 08, 2011, 06:37:40 PM
I saw that on my setup too.  I think the bitcoin.conf file settings aren't correct.

When mine contains only "rpcuser=password" the Bitcoin client works but I cannot connect my local python miner.  When I supply some other rpcuser and rpcpassword I can connect but Bitcoin client won't find any peers.


When I run the second command in the terminal window:
python /Applications/poclbm/poclbm.py -u xxxxxx --pass yyyyy -d 0
I get the following line:
Bitcoin is not connected!
The terminal prompt does not return, and the Activity Monitor shows no significant process is running in the background.

Now what?


Title: Re: GPU Mining on OS X Using poclbm
Post by: enewhuis on June 08, 2011, 07:02:21 PM
I got it to work but putting these three values in my bitcoin.conf.

server=1
rpcuser=enewhuis
rpcpassword=drummerz

I then started the Bitcoin client and ran

e-2:poclbm en$ python /Applications/poclbm/poclbm.py -u enewhuis --pass drummerz -d 0
3736 khash/s   

Dismal 3.7 Mhash/s tho, but this is a mere MacBook Pro.


Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 08, 2011, 07:29:58 PM
Thanks for the reply.

I tried the changes you made to the bitcoin.conf -- only those 3 lines (but with my username and password, of course)

Still getting the "Bitcoin is not connected!" message.  Hmmmm....

Running a Mac Pro 2.66GHz Quad-Core Xeon, OSX 10.6.7.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 04:16:28 AM
Thanks, I fixed the error, I had put rpcuser twice in the original post and github does seem to redirect to a subdomain.

If you are having trouble getting Bitcoin connected to other nodes I suggest checking out https://en.bitcoin.it/wiki/Fallback_Nodes (https://en.bitcoin.it/wiki/Fallback_Nodes).

You can add a fallback node by entering:

Code:
echo "addnode=69.164.218.197" > ~/Library/Application\ Support/Bitcoin/bitcoin.conf

Check out the link for other Fallback Nodes. That being said it may be an issue with your firewall blocking either the bitcoin or irc ports.

I strongly suggest giving pooled mining a try though. The variance on payback is greatly reduced. The one I use is http://mining.bitcoin.cz (http://mining.bitcoin.cz). Once you have set up a worker you enter:

Code:
python /Applications/poclbm/poclbm.py -u xxxx --pass xxxx -d 0 -o mining.bitcoin.cz


Title: Re: GPU Mining on OS X Using poclbm
Post by: HongPong on June 09, 2011, 04:39:16 AM
After I got around those old curl urls, this worked like a charm! ATI Radeon HD5770 on old Mac Pro chuggin away at around 100Mhash/sec. The GPU is about 20x faster than the CPU! Works perfectly, huge hat tip!  8)


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 04:51:46 AM
Awesome, are you doing pooled or solo?


Title: Re: GPU Mining on OS X Using poclbm
Post by: t0ny on June 09, 2011, 06:14:30 AM
Quote
echo "rpcuser=username" > ~/Library/Application\ Support/Bitcoin/bitcoin.conf
echo "rpcpassword=password" > ~/Library/Application\ Support/Bitcoin/bitcoin.conf

The > should be >>. A single a > replaces the file while a  >> adds to it.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 06:17:39 AM
Thanks t0ny, fixed.


Title: Re: GPU Mining on OS X Using poclbm
Post by: runawayjim on June 09, 2011, 05:54:45 PM
I got everything working, and I'm only pulling in 2800kH/s on my mid-2009 MBP.  Is that to be expected with the GeForce 9600M GT inside it?


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 07:16:27 PM
I got everything working, and I'm only pulling in 2800kH/s on my mid-2009 MBP.  Is that to be expected with the GeForce 9600M GT inside it?

The nvidia cards are apparently optimized for floating point calculations, while the Radeon's are optimized for integer. The hashing algorithm relies heavily on integer calculations so the AMD/ATI cards seem to have nvidia beat for bitcoin mining.

You could post your results to https://en.bitcoin.it/wiki/Mining_hardware_comparison (https://en.bitcoin.it/wiki/Mining_hardware_comparison) as there aren't any results for your video card yet. It looks like the closest thing is another MBP listed on there with a 9400M at 1.9 MHash/s.


Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 09, 2011, 07:52:02 PM
Thanks for the reply.

I tried the changes you made to the bitcoin.conf -- only those 3 lines (but with my username and password, of course)

Still getting the "Bitcoin is not connected!" message.  Hmmmm....

Running a Mac Pro 2.66GHz Quad-Core Xeon, OSX 10.6.7.

OK -- it took several things to get running.
First, when I originally installed and launched Bitcoin it did not open connections and download blocks. The solution was found at: http://forum.bitcoin.org/index.php?topic=10099.0
Second, I did need to add the "addnode=69.164.218.197" to my bitcoin.conf. I also needed to add "server=1" to the bitcoin.conf file.

I'm getting about 3300 khash/sec on a Mac Pro 2.66GHz Quad-Core Xeon with NVIDIA GeForce GT 120 graphics.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 07:54:31 PM
I'm getting about 3300 khash/sec on a Mac Pro 2.66GHz Quad-Core Xeon with NVIDIA GeForce GT 120 graphics.

Nice, can you compare the rate to what your processor gets? You can do this in poclbm using the "-d x" flag, where x is the number assigned to that device.


Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 09, 2011, 08:00:00 PM
I'm getting about 3300 khash/sec on a Mac Pro 2.66GHz Quad-Core Xeon with NVIDIA GeForce GT 120 graphics.

Nice, can you compare the rate to what your processor gets? You can do this in poclbm using the "-d x" flag, where x is the number assigned to that device.

Most interesting -- when I use the "-d 1" option (which I presume is the processor) I'm getting about 5000 khash/sec. The Activity Monitor show all 4 CPUs are doing their thing.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 08:01:45 PM
if you run poclbm without any flags it will enumerate the devices. That would be your processor. In general this is not an effective way of mining coins, but you can run one instance for the processor and another for the GPU.


Title: Re: GPU Mining on OS X Using poclbm
Post by: HongPong on June 09, 2011, 10:36:21 PM
Awesome, are you doing pooled or solo?
I jumped onto Deepbit and get about .001 or .002 per block roughly. Not too shabby compared to the idleness of the card normally :)

I am wondering if I can get my other graphics card to run this, it is older. It's a GeForce 7300 or 6300 (don't have it in front of me right now :)

Also what is the best way to run something on the OSX CPU? The CPU is jelly right now that the GPU gets all the action. It would only get 1/20th the hashes of the GPU but I would like to try running it in a quieter pool than deepbit and see what happens.


Title: Re: GPU Mining on OS X Using poclbm
Post by: HongPong on June 09, 2011, 10:38:16 PM
if you run poclbm without any flags it will enumerate the devices. That would be your processor. In general this is not an effective way of mining coins, but you can run one instance for the processor and another for the GPU.

Ah so just to be clear, i can open two terminal windows and run one command on the GPU and one on the CPU? Can i tell a third instance to use the second graphics card?


Title: Re: GPU Mining on OS X Using poclbm
Post by: HongPong on June 09, 2011, 10:41:20 PM
Could you explain how the -d device flag works? I don't know where the documentation (or lack thereof is). i may try to contribute back to the project by pushing some better docs on github if i can. I may not be a code ninja but i can write docs.


Title: Re: GPU Mining on OS X Using poclbm
Post by: lemonginger on June 09, 2011, 10:43:35 PM
if you run poclbm without any flags it will enumerate the devices. That would be your processor. In general this is not an effective way of mining coins, but you can run one instance for the processor and another for the GPU.

Ah so just to be clear, i can open two terminal windows and run one command on the GPU and one on the CPU? Can i tell a third instance to use the second graphics card?

Yes, though CPU mining is useless at this point, so may as well just have one process for each card


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 10:51:26 PM
Run poclbm with the "-help" flag.

Code:
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USER, --user=USER  user name
  --pass=PASSWORD       password
  -o HOST, --host=HOST  RPC host (without 'http://')
  -p PORT, --port=PORT  RPC port
  -r RATE, --rate=RATE  hash rate display interval in seconds, default=1
  -f FRAMES, --frames=FRAMES
                        will try to bring single kernel execution to 1/frames
                        seconds, default=30, increase this for less desktop
                        lag
  -d DEVICE, --device=DEVICE
                        use device by id, by default asks for device
  -a ASKRATE, --askrate=ASKRATE
                        how many seconds between getwork requests, default 5,
                        max 10
  -w WORKSIZE, --worksize=WORKSIZE
                        work group size, default is maximum returned by opencl
  -v, --vectors         use vectors
  --verbose             verbose output, suitable for redirection to log file
  --platform=PLATFORM   use platform by id

http://forum.bitcoin.org/?topic=4122.0 (http://forum.bitcoin.org/?topic=4122.0)


Title: Re: GPU Mining on OS X Using poclbm
Post by: HongPong on June 09, 2011, 11:25:17 PM
@rethaw thanks. Now that I'm back, I see that my second card is not on the device list. I wonder how to deal with that.

it is an NVIDIA GEForce 7300 GT  - 256MBVram, device id 0x0393 . I wonder also if in this kind of box the PCIe lane settings (a weird OSX setting most people haven't seen i bet) could be fiddled with to increase throughput.

EDIT - it appears the 7300 GT does not support CUDA which seems to preclude using it for this. Is there any way to run a GPU which is not compatible with CUDA?


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 09, 2011, 11:32:11 PM
Unfortunately only 8xxx or newer cards are supported as far as I know. This has nothing to do with poclbm, just not a feature in earlier cards.


Title: Re: GPU Mining on OS X Using poclbm
Post by: robin1979 on June 14, 2011, 09:35:33 PM
old: MacPro4,1 - OSX Snow Leopard (10.6.8) - '-f 30 -w 256' - Radeon 5870

180MH/s



new: MacPro4,1 - OSX Lion (DP4) - '-f 30 -w 256' - Radeon 5870

300MH/s  ;D ;D ;D ;D




Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 14, 2011, 10:40:09 PM
I'm curious if you have any theories why Lion is so much faster than Snow Leopard with the same GPU?


Title: Re: GPU Mining on OS X Using poclbm
Post by: robin1979 on June 14, 2011, 11:52:24 PM
I'm curious if you have any theories why Lion is so much faster than Snow Leopard with the same GPU?

New OpenCL implementation (for the new Final Cut)


Title: Re: GPU Mining on OS X Using poclbm
Post by: woodguy00 on June 14, 2011, 11:56:33 PM
Good to know. Thanks.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 15, 2011, 01:42:04 AM
old: MacPro4,1 - OSX Snow Leopard (10.6.8) - '-f 30 -w 256' - Radeon 5870

180MH/s



new: MacPro4,1 - OSX Lion (DP4) - '-f 30 -w 256' - Radeon 5870

300MH/s  ;D ;D ;D ;D




This is good news for Mac miners!


Title: Re: GPU Mining on OS X Using poclbm
Post by: inertia on June 15, 2011, 09:02:58 AM
MacBook Pro (6,2 NVIDIA GeForce GT 330M), Snow Leopard, -f 1 -w 64

7845 khash/s


Title: GPU alternative for Mac
Post by: MacCompiler on June 16, 2011, 01:11:17 AM
For those of you who are not comfortable with Xcode and compiling your own software, please consider using the ready-made app packaged alternatives. (http://forum.bitcoin.org/index.php?topic=8994.0)

 8)


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 16, 2011, 01:25:56 AM
For those of you who are not comfortable with Xcode and compiling your own software, please consider using the ready-made app packaged alternatives. (http://forum.bitcoin.org/index.php?topic=8994.0)

 8)

Thanks MacCompiler. Fortunately you don't have to use XCode for anything, its just a little more straightforward then asking individuals to install a compiler. Since poclbm is in python you are only really compiling dependencies. Mac OS X actually comes with more of the dependencies preinstalled than any other system I know of (numpy, OpenCL drivers).


Title: Re: GPU Mining on OS X Using poclbm
Post by: Threshold on June 16, 2011, 01:39:42 AM
rethaw, thanks for posting this.  Downloading Xcode now.  :)


Title: Re: GPU Mining on OS X Using poclbm
Post by: Threshold on June 16, 2011, 10:35:58 PM
Doh!

My iMac with its ATI Radeon HD 2600 Pro is chugging away at 2200 khash/s.

Maybe its time to get a new machine!


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 16, 2011, 10:53:45 PM
What year iMac is it? Those things hold their value quite well.


Title: Re: GPU Mining on OS X Using poclbm
Post by: Threshold on June 16, 2011, 11:25:59 PM
What year iMac is it? Those things hold their value quite well.

I honestly don't remember.  It must be 5ish years old.


Title: Re: GPU Mining on OS X Using poclbm
Post by: Randall Flagg on June 18, 2011, 02:15:03 AM
I'm curious if you have any theories why Lion is so much faster than Snow Leopard with the same GPU?

New OpenCL implementation (for the new Final Cut)

is that can be upgradable for OS 10.6.7 ?  maybe it will on 10.6.8...


Title: Re: GPU Mining on OS X Using poclbm
Post by: Randall Flagg on June 18, 2011, 02:48:04 AM
After I got around those old curl urls, this worked like a charm! ATI Radeon HD5770 on old Mac Pro chuggin away at around 100Mhash/sec. The GPU is about 20x faster than the CPU! Works perfectly, huge hat tip!  8)

"old" mac pro ?  what do you mean, i have the exact same amount as you do with mac pro 5,1 with same Ati ...


Title: Re: GPU Mining on OS X Using poclbm
Post by: robin1979 on June 18, 2011, 10:08:02 AM
Update:

old: MacPro4,1 - OSX Snow Leopard ( 10.6.8 ) - '-f 30 -w 256' - Radeon 5870

180MH/s

newer: MacPro4,1 - OSX Lion ( DP4 ) - '-f 30 -w 256' - Radeon 5870

300MH/s  ;D ;D ;D ;D

new: MacPro4,1 - OSX Lion ( DP4 update 1 ) - '-f 30 -w 256' - Radeon 5870

280MH/s   :o :o :o :o




Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on June 18, 2011, 03:19:23 PM
Update:

new: MacPro4,1 - OSX Lion ( DP4 update 1 ) - '-f 30 -w 256' - Radeon 5870

280MH/s   :o :o :o :o


Put in a ticket!


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on July 09, 2011, 06:31:19 PM
New version of poclbm has been released. First post changed.


Title: Re: GPU Mining on OS X Using poclbm
Post by: robin1979 on July 11, 2011, 05:55:33 AM
New version of poclbm has been released. First post changed.

You might want to update it again to specify the new server syntax.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on July 11, 2011, 06:02:36 AM
New version of poclbm has been released. First post changed.

You might want to update it again to specify the new server syntax.

Thanks, got it.


Title: Re: GPU Mining on OS X Using poclbm
Post by: theowalpott on July 11, 2011, 12:36:42 PM
Has anyone got any decent performance out of a Mac Pro using poclbm?!? I've got access to one with a 5870 in it, but the best I can get out of it is around 210MH/s - not great!

I've tried running it using the latest version from the git repo, but when I turn vectors on it gets a much lower hashrate, using anything other than the maximum worksize (-w256) seems to cause it to slow down too! It seems to get segfaults all over the place if I don't choose the options very carefully too! I've ended up using an older version of poclbm, which doesnt use the phatk kernel. Anyone got any tips?

btw, this is running a 64-bit version of OS X, 10.6.8. I'm not much of a Mac guy, but I know my way round a linux/unix command line, so I've basically been treating it like a linux box.

Cheers for any help :)


Title: Re: GPU Mining on OS X Using poclbm
Post by: robin1979 on July 11, 2011, 01:40:24 PM
Has anyone got any decent performance out of a Mac Pro using poclbm?!? I've got access to one with a 5870 in it, but the best I can get out of it is around 210MH/s - not great!

I've tried running it using the latest version from the git repo, but when I turn vectors on it gets a much lower hashrate, using anything other than the maximum worksize (-w256) seems to cause it to slow down too! It seems to get segfaults all over the place if I don't choose the options very carefully too! I've ended up using an older version of poclbm, which doesnt use the phatk kernel. Anyone got any tips?

btw, this is running a 64-bit version of OS X, 10.6.8. I'm not much of a Mac guy, but I know my way round a linux/unix command line, so I've basically been treating it like a linux box.

Cheers for any help :)

210MH/s sounds pretty decent for a 5870 under Snow Leopard. I never got it past 180MH/s. Now running Lion (GM), I'm getting a little over 300 (310-320), with the original poclbm kernel.

Could not get the phatk kernel to run with Lion, does weird things and does not submit shares (or very irregular), while it reports speeds over over 1 Thash. I did not have time to debug it yet.


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on July 11, 2011, 03:37:30 PM
Hmm sounds like phatk doesn't play nicely. It may be time to branch a mac version.


Title: Re: GPU Mining on OS X Using poclbm
Post by: theowalpott on July 11, 2011, 04:09:47 PM
Has anyone got any decent performance out of a Mac Pro using poclbm?!? I've got access to one with a 5870 in it, but the best I can get out of it is around 210MH/s - not great!

I've tried running it using the latest version from the git repo, but when I turn vectors on it gets a much lower hashrate, using anything other than the maximum worksize (-w256) seems to cause it to slow down too! It seems to get segfaults all over the place if I don't choose the options very carefully too! I've ended up using an older version of poclbm, which doesnt use the phatk kernel. Anyone got any tips?

btw, this is running a 64-bit version of OS X, 10.6.8. I'm not much of a Mac guy, but I know my way round a linux/unix command line, so I've basically been treating it like a linux box.

Cheers for any help :)

210MH/s sounds pretty decent for a 5870 under Snow Leopard. I never got it past 180MH/s. Now running Lion (GM), I'm getting a little over 300 (310-320), with the original poclbm kernel.

Could not get the phatk kernel to run with Lion, does weird things and does not submit shares (or very irregular), while it reports speeds over over 1 Thash. I did not have time to debug it yet.

Yes, I had the stupidly high hashrate issue with phatk too.. if you let it go for a minute or so, it'll produce a share and then crash out - usually spewing a lot of "verification error" type messages. I went back to the original poclbm kernel, and also made the edit to the Ma define line, which is probably why I got the extra speed.

I'll have to look into getting Lion running on it once its released. It's not my machine though - belongs to my father, who has absolutely no idea what power he has inside it.. sigh. If I had my way, it'd be running linux (and windows for games)! For now though, I've set it to run in the background between 6am and 6pm (they have solar power!) every day - I couldn't even tell it was running as long as the frames were set right (went for -f120). Can't really complain about the extra 200 MH/s for free! :)


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on July 11, 2011, 04:19:44 PM
Has anyone got any decent performance out of a Mac Pro using poclbm?!? I've got access to one with a 5870 in it, but the best I can get out of it is around 210MH/s - not great!

I've tried running it using the latest version from the git repo, but when I turn vectors on it gets a much lower hashrate, using anything other than the maximum worksize (-w256) seems to cause it to slow down too! It seems to get segfaults all over the place if I don't choose the options very carefully too! I've ended up using an older version of poclbm, which doesnt use the phatk kernel. Anyone got any tips?

btw, this is running a 64-bit version of OS X, 10.6.8. I'm not much of a Mac guy, but I know my way round a linux/unix command line, so I've basically been treating it like a linux box.

Cheers for any help :)

This is more general help, but I strongly advise installing homebrew. Its like a package manager that handles building a lot of the popular linux packages. My snow leopard machine uses python 2.6, I wonder if not being on 2.7 is a problem. It can be installed easily via brew alongside the default installation.


Title: Re: GPU Mining on OS X Using poclbm
Post by: theowalpott on July 11, 2011, 05:46:46 PM
Cool, thanks for the tip rethaw. Will take a look at it once I've got some time - got a lot of projects on the go atm :)


Title: Re: GPU Mining on OS X Using poclbm
Post by: pletoss on January 23, 2012, 04:28:19 PM
Hi,

I packaged Kiv's poclbm guiminer into a bundled standalone Mac OS X Binary (app) using py2app and some funky voodoo patching action. No dependencies needed, just click'n'run, Apple style ;-).

You can get it from here: https://github.com/downloads/pletoss/poclbm/guiminer-poclbm-macosx.dmg and give it a try. I hope this works for everybody.

It's important to drag it out of the dmg to some place where it is writable before running since it needs to be able to write some log files in the app. Dragging it to Applications as usual should work.

Also - join our pool ;) - btcmp.com, I added api support for balance updating and withdraw into guiminer. It's true pay per share, so no variance what so ever, you instantly get BTC's for each share you submit. We've been mining since July.

If you're interested in the voodoo: https://github.com/pletoss/poclbm.

Cheers,
Pletoss


Title: Re: GPU Mining on OS X Using poclbm
Post by: rethaw on March 10, 2012, 06:38:19 AM
If you're having trouble getting mining on mac I suggest using https://en.bitcoin.it/wiki/DiabloMiner (https://en.bitcoin.it/wiki/DiabloMiner) .


Title: Re: GPU Mining on OS X Using poclbm
Post by: voluntaryistonly on September 17, 2013, 12:38:26 PM
Hi All,
Finally got this running on my osx 10.6.8, (openpy cl was a pain to install, finally managed it, TY! to all poster's of answers & solutions ;-) currently hashing at 2.1-2.5 just a couple of questions:
on the gui there is a window for "extra flags" what's that all about? (running guiminer for osx, very nice btw, very nice...) my graphics card is a geforce 9400.
is there a way to tweak even more hashes out of my mac mini? would be nice if I could ;-)

thanks in advance...
vo