Open dheerajdhobley opened 7 years ago
It work for My MBP Retina Mid 2012. You need Xcode8.3, Cuda 9. Apple haven't updated yet their Nvidia Cuda driver, so I downloaded the official Cuda driver from Nvidia website [http://www.nvidia.com/object/macosx-cuda-9.0.222-driver.html].
On my Nvidia 650M, I get a 95 H/s.
I downloaded Xcode 8.3's CommandLineTools to make sure nvcc is compatible. I'm able to build successfully. I also downloaded the official CUDA driver from the Nvidia website.
I get ~80-90 H/s too, but I don't think that's due to the GPU. It's only because of the CPU. When you run xmr-stak, don't you get WARNING: NVIDIA insufficient driver! WARNING: backend NVIDIA disabled too?
If not, could you please paste what you get when you start xmr-stak?
Sorry to be late.
This is my nvidia.txt. Maybe it will help you.
/*
- GPU configuration. You should play around with threads and blocks as the fastest settings will vary.
- index - GPU index number usually starts from 0.
- threads - Number of GPU threads (nothing to do with CPU threads).
- blocks - Number of GPU blocks (nothing to do with CPU threads).
- bfactor - Enables running the Cryptonight kernel in smaller pieces.
- Increase if you want to reduce GPU lag. Recommended setting on GUI systems - 8
- bsleep - Insert a delay of X microseconds between kernel launches.
- Increase if you want to reduce GPU lag. Recommended setting on GUI systems - 100
- affine_to_cpu - This will affine the thread to a CPU. This can make a GPU miner play along nicer with a CPU miner.
- On the first run the miner will look at your system and suggest a basic configuration that will work,
- you can try to tweak it from there to get the best performance.
- A filled out configuration should look like this:
- "gpu_threads_conf" :
- [
- { "index" : 0, "threads" : 17, "blocks" : 60, "bfactor" : 0, "bsleep" : 0, "affine_to_cpu" : false},
- ], */
"gpu_threads_conf" : [ // gpu: GeForce GT 650M architecture: 30 // memory: 741/1023 MiB // smx: 2 { "index" : 0, "threads" : 50, "blocks" : 6, "bfactor" : 8, "bsleep" : 100, "affine_to_cpu" : false, },
],
So I created a file called nvidia.txt in the folder where the xmr-stak executable is, and pasted your configuration. Now, the following runtime errors are emitted by xmr-stak: WARNING: NVIDIA Insufficient driver! WARNING: NVIDIA no device found [2017-11-30 14:09:13] : WARNING: backend NVIDIA disabled.
I have gone into my Energy-Saver settings and disabled automatic-graphics-switching so that NVIDIA's graphics card is always available.
The file nvidia.txt is created by the miner if cuda is found. As the miner says you have driver issues. Do you compied the miner on a different machine? It looks like your driver is older than the driver which was used to compile the miner.
I compiled the miner on macOS High Sierra. I tried to use it on the same machine. I installed an old version of Xcode's Command Line Tools because nvcc from CUDA 9 doesn't work with the newest AppleClang compiler (version 9). I'm not sure what compiling with an old compiler has to do with not being able to recognise the graphics card.
I have no mac but if you use xcode and xcode provide an newer cuda than the driver than the runtime can not find your gpu.
Which cuda driver is installed? Which cuda toolkit do you use?
Cuda Driver version: 9.0.222 Cuda Toolkit: Latest version from NVIDIA's website (CUDA 9)
I thought the CUDA driver and CUDA toolkit came together.
I've got the same issue. Since Apple update their root bug, an update broke the cuda driver.
So wait & see that Nvidia update the Cuda driver.
-------------------------------------------------------------------
xmr-stak 2.0.0 79154f7
Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).
Based on NVIDIA mining code by KlausT and psychocrypt.
Configurable dev donation level is set to 2.0%
You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2017-11-30 17:33:09] : Start mining: MONERO
WARNING: NVIDIA Insufficient driver!
WARNING: NVIDIA no device found
[2017-11-30 17:33:09] : WARNING: backend NVIDIA disabled.
[2017-11-30 17:33:09] : WARNING on MacOS thread affinity is only advisory.
[2017-11-30 17:33:09] : Starting single thread, affinity: 0.
[2017-11-30 17:33:09] : hwloc: set_thisthread_membind not supported
[2017-11-30 17:33:09] : WARNING on MacOS thread affinity is only advisory.
[2017-11-30 17:33:09] : Starting single thread, affinity: 2.
[2017-11-30 17:33:09] : hwloc: set_thisthread_membind not supported
[2017-11-30 17:33:09] : WARNING on MacOS thread affinity is only advisory.
[2017-11-30 17:33:09] : Starting single thread, affinity: 4.
[2017-11-30 17:33:09] : hwloc: set_thisthread_membind not supported
[2017-11-30 17:33:09] : Fast-connecting to xmr-eu1.nanopool.org:14444 pool ...
[2017-11-30 17:33:09] : Pool xmr-eu1.nanopool.org:14444 connected. Logging in...
[2017-11-30 17:33:10] : Difficulty changed. Now: 120001.
[2017-11-30 17:33:10] : Pool logged in
please empty the build folder and try to add as additional cmake parameter -DCUDA_USE_STATIC_CUDA_RUNTIME=OFF
Maybe this can solve you issue.
If the last point is not helping please download the latest cuda and install it again: https://developer.nvidia.com/cuda-downloads
Do not forget to install the driver too.
No change after emptying build folder and adding additional cmake parameter
-DCUDA_USE_STATIC_CUDA_RUNTIME=OFF
.
Than please install the cuda driver again. What type of gpu is in your mac book. maybe it is a fermi gpu than you need to install cuda8. Cuda9 is not supporting fermi.
It's a GT 650M. I think Cuda9 supports it. Will try to install Cuda driver again.
Please update your Nvidia Driver with [Nvidia Web Driver - 378.10.10.10.20.109](Nvidia Web Driver - 378.10.10.10.20.109)
When you install and restart your computer. After, go into the Nvidia Preference and choose the Nvidia driver instead of Apple's one.
xmr-stak 2.0.0 79154f7
Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).
Based on NVIDIA mining code by KlausT and psychocrypt.
Configurable dev donation level is set to 2.0%
You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2017-12-01 10:21:22] : Start mining: MONERO
[2017-12-01 10:21:23] : Starting NVIDIA GPU thread 0, no affinity.
[2017-12-01 10:21:23] : WARNING on MacOS thread affinity is only advisory.
[2017-12-01 10:21:23] : Starting single thread, affinity: 0.
[2017-12-01 10:21:23] : hwloc: set_thisthread_membind not supported
[2017-12-01 10:21:23] : WARNING on MacOS thread affinity is only advisory.
[2017-12-01 10:21:23] : Starting single thread, affinity: 2.
[2017-12-01 10:21:23] : hwloc: set_thisthread_membind not supported
[2017-12-01 10:21:23] : WARNING on MacOS thread affinity is only advisory.
[2017-12-01 10:21:23] : Starting single thread, affinity: 4.
[2017-12-01 10:21:23] : hwloc: set_thisthread_membind not supported
[2017-12-01 10:21:23] : Fast-connecting to xmr-eu1.nanopool.org:14444 pool ...
[2017-12-01 10:21:23] : Pool xmr-eu1.nanopool.org:14444 connected. Logging in...
[2017-12-01 10:21:23] : Difficulty changed. Now: 120001.
[2017-12-01 10:21:23] : Pool logged in.
HASHRATE REPORT - CPU
| ID | 10s | 60s | 15m | ID | 10s | 60s | 15m |
| 0 | (na) | (na) | (na) | 1 | (na) | (na) | (na) |
| 2 | (na) | (na) | (na) |
-----------------------------------------------------
HASHRATE REPORT - NVIDIA
| ID | 10s | 60s | 15m |
| 0 | (na) | (na) | (na) |
---------------------------
Totals: (na) (na) (na) H/s
Highest: 0.0 H/s
If you succeed and we can reproduce the solution, maybe it will be needed to update the documentation.
briard51: Your solution worked perfectly for me. Instead of using OS X's version of NVIDIA's driver, I should use the latest NVIDIA WebDriver. I think this should be made part of the documentation for Mac OS users of xmr-stak, along with the fact that an older version of XCode's CommandLineTools has to be temporarily installed and xcode-select -switch
'ed to, to compile using NVIDIA CUDA's libraries.
@dheerajdhobley @briard51 Could you please open an pull request against the dev branch and update the documentation or post a text snipped which I can add to the documentation. I have no access to OSX therefore I can not write the documentation.
The issue has surfaced again. I just updated NVIDIA's WebDriver to 378.10.10.10.25.102 and Xcode's CommandLineTools to the latest version because I'd already compiled xmr-stak so I didn't need the CommandLineTools any longer. The error message is the same as when I'd opened this issue:
WARNING: NVIDIA Insufficient driver! WARNING: NVIDIA no device found [2017-12-13 00:12:35] : WARNING: backend NVIDIA disabled.
go into the Nvidia Preference and choose the Nvidia driver instead of Apple's one.
@briard51 how did you to chose another driver and where?)
@unformatt damn, why i don't have this menu?) what should i install?)
@rsimenok - not sure. I installed the driver from here: http://www.nvidia.com/download/driverResults.aspx/125379/en-us
Thanks a lot @unformatt , i've successfully compiled only dev branch with latest cuda, web driver, and CommandLiteTools 8.3.3, but gpu is still disabled :(
@rsimenok Did you call Cmake with these params? -DOpenCL_ENABLE=OFF -DCUDA_ENABLE=ON
?
@unformatt i tried cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOpenCL_ENABLE=OFF
and cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOpenCL_ENABLE=OFF -DCUDA_ENABLE=ON
, in compile log i see that cuda is found everything is ok but when i run xmr-stack i'm getting
WARNING: NVIDIA Insufficient driver!
WARNING: backend NVIDIA disabled.
I know from an other issue that you need somehow to enable the cuda driver in a control center. But I have no mac, try to search within old closed issues maybe the solution is there.
@rsimenok Try also specifying the CUDA API/Arch version. Mine was 5.2 so I passed -DCUDA_ARCH=52
I got the version from deviceQuery
>>> /Developer/NVIDIA/CUDA-9.0/samples/bin/x86_64/darwin/release/deviceQuery
/Developer/NVIDIA/CUDA-9.0/samples/bin/x86_64/darwin/release/deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GTX 950"
CUDA Driver Version / Runtime Version 9.1 / 9.0
CUDA Capability Major/Minor version number: 5.2
@unformatt :(
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL
WARNING: NVIDIA Insufficient driver! [2017-11-29 15:28:42] : WARNING: backend NVIDIA disabled.
How can I prevent this from happening? I want to use the GPU capabilities of my laptop for mining.