Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on compiling time for AMD GPU (macOS) #277

Open
d9beuD opened this issue Nov 20, 2019 · 10 comments
Open

Error on compiling time for AMD GPU (macOS) #277

d9beuD opened this issue Nov 20, 2019 · 10 comments

Comments

@d9beuD
Copy link

d9beuD commented Nov 20, 2019

I downloaded and compiled xmrig-amd from releases with no issue. But when I start xmrig with default config I get the following output:

 * ABOUT        XMRig-AMD/2.14.6 clang/11.0.0
 * LIBS         libuv/1.31.0 OpenCL/1.2 OpenSSL/1.0.2t microhttpd/0.9.63 
 * CPU          Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz x64 AES
 * ALGO         cryptonight, donate=5%
 * POOL #1      donate.v2.xmrig.com:3333 variant auto
 * COMMANDS     hashrate, pause, resume
[2019-11-20 11:19:20] compiling code and initializing GPUs. This will take a while...
[2019-11-20 11:19:20] found OpenCL GPU: Intel(R) UHD Graphics 630, cu: 24
[2019-11-20 11:19:20] found OpenCL GPU: AMD Radeon Pro 555X Compute Engine, cu: 12
[2019-11-20 11:19:20] #00, GPU #01 AMD Radeon Pro 555X Compute Engine, i:192 (8/256), si:2/2, u:8, cu:12
[2019-11-20 11:19:20]              0.38/1.00/4 GB
[2019-11-20 11:19:20] GPU #1 compiling...
[2019-11-20 11:19:33] Error CL_BUILD_PROGRAM_FAILURE when calling clBuildProgram.
Build log:
Error returned by cvms_element_build_from_source
[2019-11-20 11:19:33] Failed to start threads.

My hardware:

  • MacBook Pro 2019 15"
  • AMD Radeon Pro 555X

I don't understand what this error means.

@hvw33
Copy link

hvw33 commented Dec 2, 2019

Same here ...

@ekoyudhi
Copy link

Yes...i use Radeon 5450 HD get same error

@serambca
Copy link

HI! how to compile in macOS? I only see instructions for Linux or Windows :(

@d9beuD
Copy link
Author

d9beuD commented Apr 22, 2021

HI! how to compile in macOS? I only see instructions for Linux or Windows :(

It is the same as for Ubuntu, see this link: https://github.com/xmrig/xmrig-amd/wiki/Ubuntu-Build

@gtu78aed87t
Copy link

It didn't work for me neither failing at the 'cmake ..' command.

-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/Cellar/cmake/3.20.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find UV (missing: UV_LIBRARY UV_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.20.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/FindUV.cmake:25 (find_package_handle_standard_args)
CMakeLists.txt:234 (find_package)

@brianmcfadden
Copy link

This is a very old issue, but it still exists. There is a function in src/amd/opencl/cryptonight.cl called Skein. Near the end of that function, there are 4 lines that read:

       ulong outIdx = atomic_inc(output + 0xFF);
       if (outIdx < 0xFF) {
          output[outIdx] = BranchBuf[idx] + (uint) get_global_offset(0);
       }

When I comment out those 4 lines, clBuildProgram succeeds, and xmrig-amd starts hashing, and the video display slows down terribly. You could try it out and verify whether that's where the issue lies.

Those are probably 4 lines of important code that screw up all the hashing when commented out, so this isn't a fix, but it does identify the part that's breaking. What's strange is that in the function called JH, which is the function after Skein, there is an identical code block that doesn't break. I suppose JH may never get called, and Skein does, but that's speculation on my part. Someone who knows the code better might be able to take a look at this.

@d9beuD
Copy link
Author

d9beuD commented May 21, 2021

Maybe it would be great to use Metal API instead of OpenCL. Metal is up to date and well optimized. But I can understand that it would be a huge development work.

@gtu78aed87t
Copy link

How would you go about to get xmrig-amd to use metal? I managed to compile it somehow on a mojave system with rx 580, but got stuck when it couldn't detect it. I have both searched for a way to either update opencl beyond 1.2 or find a gpu-miner that utilize metal.

@brianmcfadden
Copy link

@KhronosGroup intends to host/coordinate a project for OpenCL over Metal as part of OpenCL 3.0. AFAIK, there is no timetable, and there is some question whether that will be on the schedule at all, but I think it would be very useful here.

https://images.anandtech.com/doci/15746/OpenCL%2030%20Press%20Deck_20.png

@ganzocrypt
Copy link

ganzocrypt commented May 23, 2021

Hi, there is fork that is working on macos AMD, tested on KaPow algo.
You can check the last xmrig I posted for testing, not sure if it works on other systems.

Can someone test it and if it works which algos are working?

  • upx2 is not working
  • KaPow works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@brianmcfadden @ekoyudhi @serambca @hvw33 @ganzocrypt @gtu78aed87t @d9beuD and others