Bitcoin Forum
April 26, 2024, 09:53:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4  All
  Print  
Author Topic: GPU Mining on OS X Using poclbm  (Read 78730 times)
rethaw (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
June 05, 2011, 07:02:15 PM
Last edit: July 12, 2011, 01:57:13 AM by rethaw
 #1

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, 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 (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 or 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

1714168415
Hero Member
*
Offline Offline

Posts: 1714168415

View Profile Personal Message (Offline)

Ignore
1714168415
Reply with quote  #2

1714168415
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
URSAY
Legendary
*
Offline Offline

Activity: 1946
Merit: 1000



View Profile
June 05, 2011, 11:37:44 PM
 #2

Anyone else using this?
Planetexpress
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
June 06, 2011, 07:57:52 AM
 #3

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

Could I help you? Why do not donate me a few Bitcoin cents (or more Wink )?
1AYcX47R6bwM4fEiYD3fE4QvYW2HF5t1rC

Play & Win Bitcoins http://bit.ly/jywwt5
afingal
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 06, 2011, 02:33:31 PM
 #4

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.
afingal
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 06, 2011, 02:44:01 PM
 #5

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
...
rb2k
Member
**
Offline Offline

Activity: 109
Merit: 10


View Profile
June 06, 2011, 02:44:07 PM
 #6

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?
afingal
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 06, 2011, 02:54:58 PM
 #7

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?
rethaw (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
June 06, 2011, 04:20:29 PM
Last edit: June 06, 2011, 04:35:32 PM by rethaw
 #8

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.

cuthbert
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
June 06, 2011, 04:38:14 PM
 #9

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?

afingal
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 06, 2011, 04:45:06 PM
 #10


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
rethaw (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
June 06, 2011, 04:53:02 PM
 #11

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.

afingal
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 06, 2011, 05:02:14 PM
 #12

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. 
Planetexpress
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
June 06, 2011, 06:06:42 PM
 #13

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?

Could I help you? Why do not donate me a few Bitcoin cents (or more Wink )?
1AYcX47R6bwM4fEiYD3fE4QvYW2HF5t1rC

Play & Win Bitcoins http://bit.ly/jywwt5
afingal
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 06, 2011, 06:36:21 PM
 #14


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.
rethaw (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
June 07, 2011, 01:01:08 AM
 #15

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?

taykaypee
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 07, 2011, 11:24:34 PM
 #16

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.
rethaw (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
June 08, 2011, 12:14:20 AM
 #17

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.

taykaypee
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 08, 2011, 12:20:31 AM
 #18

I search for Bitcoin.conf on my computer and don't get results. Is this file on my computer?
rethaw (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
June 08, 2011, 12:23:22 AM
 #19

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

taykaypee
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 08, 2011, 12:28:31 AM
 #20

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
Pages: [1] 2 3 4  All
  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!