xmr-stak-amd icon indicating copy to clipboard operation
xmr-stak-amd copied to clipboard

How to setup on Mac?

Open fabriek-huis opened this issue 7 years ago • 25 comments

Anyone know how to get this running on Mac OSX?

Mac Pro (2013) Desktop. Crossfire - AMD FirePro D300.

fabriek-huis avatar Sep 29 '17 02:09 fabriek-huis

The dev branch works fine. I've compiled it for macOS with instructions and included dependencies: http://macminer.fabulouspanda.com/commandline/xmrstakamd/

fabulouspanda avatar Sep 29 '17 15:09 fabulouspanda

@fabulouspanda thank you so much for the help! looks like its compiling 👍

fabriek-huis avatar Sep 29 '17 15:09 fabriek-huis

@fabulouspanda - Ok maybe I spoke to soon :|

What does that mean?! - : Starting GPU thread, no affinity

Is that right?! - seems super slow.. am I reading that right - "47.4 H/s" hashes a second. I can get 100+H/s with CPU (8-threads) alone :D

HASHRATE REPORT
| ID |   10s |   60s |   15m |
|  0 | 47.3 | 47.3 |  (na) |
---------------------------
Totals:   47.3 47.3  (na) H/s
Highest:  47.4 H/s

If I set threads = 2 "gpu_thread_num" : 2,

Invalid config file. Your GPU config array has 1 members, while you want to use 2 threads.

I have 2x - "AMD FirePro D300": Mac Pro 2013 (desktop),

Chipset Model:	AMD FirePro D300
 Type:	GPU
 Bus:	PCIe
 Slot:	Slot-1
 PCIe Lane Width:	x16
 VRAM (Total):	2048 MB
 Vendor:	ATI (0x1002)
 Device ID:	0x6810
 Revision ID:	0x0000
 ROM Revision:	113-C4012F-687
 Automatic Graphics Switching:	Supported
 gMux Version:	4.0.11 [3.2.8]
 EFI Driver Version:	01.0D.687
 Metal:	Supported

fabriek-huis avatar Sep 29 '17 16:09 fabriek-huis

Did you compile the dev branch on your own or are you just running the binary I compiled? Because I purposefully set the intensity really low in the supplied config file so people don't mess up their computers which would explain the low hashrate. You should look around for example configs, I don't have a great deal of experience with this miner unfortunately.

re: the array note if you're using my binary, what I say in the Information text file about adding an extra line like this in the config is important { "index" : 1, "intensity" : 64, "worksize" : 8, "affine_to_cpu" : false },

fabulouspanda avatar Sep 29 '17 16:09 fabulouspanda

@fabulouspanda thanks for compiling. I had such a hard time previously compiling my own xmr-stak-amd. Glad you compiled it for us!

@sputn1k - CPU and GPU mining is not the same, so making comparisons on hash rate is not productive. I think if you have one GPU, you should have just one thread. Try increasing the intensity to 128 or 256. My understanding is you multiple the intensity to worksize to match your GPU RAM. Since you have 2048MB, I would try the following:

"gpu_threads_conf" : [ 
	{ "index" : 0, "intensity" : 256, "worksize" : 8, "affine_to_cpu" : false },
],

For me, my AMD Radeon GPU on my old MacBook Pro (early 2011) makes my system extremely unresponsive. Things work, but the laptop is starved for resources. I'm also mining on CPU using xmr-stak-cpu. Any time I turn the GPU mining off, things work better. Just letting you know in case you run into that too.

fogoat avatar Sep 29 '17 17:09 fogoat

@sunk818 yes, but performance wise not great. not blaming the code must be a hardware compatibility issue (if CPU hashes more). Just stating for Mac Pro with 2x AMD FirePro D300 doesn't work well (out the box).

I don't have one GPU I have two AMD FirePro D300 in crossfire. So thats not right if I am getting that error, something must be wrong (or at-least doesn't work with my hardware).

xmr-stak-cpu runs better?

Thanks! will try those settings - hopefully will increase the hash rate.

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

@fabulouspanda Thanks I did not try compile it yet. I ran your binary.

Thank you very much will try that out and see it it helps. 👍

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

@sunk818 - "intensity" : 256, = 180 H/2 👍

HASHRATE REPORT
| ID |   10s |   60s |   15m |
|  0 | 180.2 |  (na) |  (na) |
---------------------------
Totals:   180.2  (na)  (na) H/s
Highest:  180.3 H/s

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

@fabulouspanda - thanks Two GPU's 365.4 H/s 👍 now time to play with settings ;)

Anyone out there having issues adding additional GPU - you need to add an additional index in gpu_threads_conf:

For example:

"gpu_thread_num" : 2,

"gpu_threads_conf" : [ 
	{ "index" : 0, "intensity" : 256, "worksize" : 8, "affine_to_cpu" : false },
	{ "index" : 1, "intensity" : 256, "worksize" : 8, "affine_to_cpu" : false },
],
HASHRATE REPORT
| ID |   10s |   60s |   15m | ID |   10s |   60s |   15m |
|  0 | 182.0 |  (na) |  (na) |  1 | 183.3 |  (na) |  (na) |
-----------------------------------------------------
Totals:   365.3  (na)  (na) H/s
Highest:  365.4 H/s

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

@sputn1k that's great! I was literally a second away from posting a comment suggesting what you just did. Glad to see it's working so smoothly

fabulouspanda avatar Sep 29 '17 18:09 fabulouspanda

@fabulouspanda thanks again!! - sorry I didn't understand the config my bad (first time using this).

Do you have compile instructions for Mac?

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

@sputn1k My pleasure.

Install the dependencies - I used homebrew from brew.sh and installed git, libhttpd and openssl with brew install

then run git clone https://github.com/fireice-uk/xmr-stak-amd.git cd xmr-stak-amd git checkout dev cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl . make

fabulouspanda avatar Sep 29 '17 18:09 fabulouspanda

@fabulouspanda thanks man, will try it out now 👍

I have brew/git installed (and both libhttpd/openssl). Just wasn't sure if it needed anything else as when I tried to compile xmr-stak-amd last time had loads of issues.

Would be good to setup a guide for Mac users (think I will do this, if I can get it to run).

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

@fabulouspanda compiles all ok! you are a true gentlemen, good day to your sir! :D

fabriek-huis avatar Sep 29 '17 18:09 fabriek-huis

Had some issues on macOS 10.10.5 trying to run your compiled binary. I'm trying to update brew, ruby, libhttpd, and openssl. Might be useful if you are explicit in the commands for necessary dependencies.

I ended up performing brew update && brew upgrade. That gave me cmake 3.9.3_1 and hwlock 1.11.8

After the brew upgrade, I was able to compile without issue.

Only problem running my compiled binary is that opencl directory is not in the bin directory, so I had to copy opencl directory that was one branch up into the bin directory. That should be an easy fix @fireice-uk ?

@fabulouspanda - Even after the brew upgrade, I still couldn't get your compiled binary to run. Perhaps the difference between macOS 10.12 and 10.10?

I had the following error before and after I compiled my own xmr-stak-amd.

SMBP:bin me$ ./xmr-stak-amd 
dyld: Library not loaded: @executable_path/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/me/xmr-stak-amd-macOS/bin/./xmr-stak-amd
  Reason: image not found
Trace/BPT trap: 5

@sputn1k - Sorry, I am not familiar with AMD FirePro D300 so I gave you an incomplete answer.

fogoat avatar Sep 29 '17 21:09 fogoat

@sputn1k I am also reading that your intensity is supposed to be half your RAM. So, 2048 / 2 = 1024. You might try that value and values in between to see if you get better hash rates.

fogoat avatar Oct 02 '17 18:10 fogoat

@sunk818 - cheers for that information. 800 intensity was the highest I could set mine without the machine hanging.

fabriek-huis avatar Oct 02 '17 19:10 fabriek-huis

Here's my setup: MacBook Pro (15-inch, 2016) AMD Radeon Pro 460 VRAM (Total): 4 GB { "index" : 0, "intensity" : 256, "worksize" : 8, "affine_to_cpu" : false },

I have tried the following "intensity" : 256 -> 74.3 H/s "intensity" : 512 -> Error: Abort trap: 6 "intensity" : 640 -> 1178887.3 H/s (what?!?)

With the last settings, I did not get any "Result accepted by the pool" from the console log. All I get is "New block detected." I did not see any updates in moneropool.com either.

Can someone explain what's going on with the crazy hashrate number?

torinnguyen avatar Nov 29 '17 08:11 torinnguyen

@torinnguyen

No idea why that occurs. I get the same thing as you.

Try testing with index = 1 { "index" : 1, "intensity" : 256, "worksize" : 8, "affine_to_cpu" : false }.

theobromine avatar Nov 29 '17 15:11 theobromine

index = 1 works. Turns out that is the index = 1 is of my AMD Radoen Pro 460; and index = 0 is the integrated Intel graphic. The AMD alone gives me 225H/s. The best hashrate on my machine is 300H/s with the following: "gpu_thread_num" : 2, { "index" : 0, "intensity" : 256, "worksize" : 8, "affine_to_cpu" : false }, { "index" : 1, "intensity" : 512, "worksize" : 8, "affine_to_cpu" : false },

That really heats up the device and freeze everything else on the screen.

FWIW, running CPU miner on Quad-core 2.9 GHz Intel Core i7 only give me 144 H/s

torinnguyen avatar Nov 29 '17 16:11 torinnguyen

Running the same hardware as you; Instead of running the integrated graphics you should xmr-stack or xmr-stack-cpu. It is more optimized for CPUs and won't make your machine hang nearly as much as running it on xmr-stack-amd.

theobromine avatar Nov 30 '17 18:11 theobromine

@sunk818 I have the same hardware as you but I get only a hash rate of 60 something. The thing is, looking at Activity Monitor I'm only running on integrated graphics when running xmr-stak-amd. Does your run on integrated as well according to Activity Monitor? Could you perhaps send your config.txt so I can have a look?

@fabulouspanda Have you tried compiling xmr-stak on macOS? It's unified for both CPU and GPU mining, however I wonder about the compatibility with Mac hardware... Also, I can't set the intensity higher than 256 using your compiled version. According to another forum, this was apparently fixed in an update to xmr-stak-amd miner. But you guys seem to be able to get past 256 using @fabulouspanda compiled version?

ChaotiX66 avatar Dec 09 '17 17:12 ChaotiX66

I stopped mining xmr-stak-amd because it kept "freezing" my MBP in the sense that my MBP was very unreponsive. It also overheated my internals. The battery got so big, it was dangerously enlarged. I had to have it replaced. Any profit I was to see even with free electricity just went out the window because I had to replace the battery.

In terms of seeing Intel integrated graphics that is correct. AMD GPU is being used so macOS can only use your Intel integrated graphics. If you stop running xmr-stak-amd, you should see GPU go back to AMD Radeon.

As for difficulty, I wouldn't get it past 256 anyway... In general, I wouldn't recommend GPU on a laptop. 60 H/s was what I was getting but stopped due to thermal damage.

fogoat avatar Dec 09 '17 20:12 fogoat

Thank you @sunk818 for letting me know! I'll stick to xmr-stak-cpu mining. Nothing serious, just a hobby. Sorry to hear about the battery though.

ChaotiX66 avatar Dec 09 '17 21:12 ChaotiX66

I am mining on iMac. 282H/s using xmr-stak-amd and about 160H/s with CPU. But I am not mining on OSX. I gave up on this idea because complete system crashed/freezed. Now I boot to Ubuntu with USB stick and mine there.

gregordoltar avatar Dec 11 '17 08:12 gregordoltar