background

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Use Anonymous Ads

MacMiner GPU / sgminer wont run - iMac Radeon 580

Thank you for any help in pointing me in the right direction. I have been unable to get MacMiner GPU or sgminer command line to work.

Computer: iMac Radeon 580 8GB
Command: ./sgminer -k lbry -o stratum+tcp://lbry.suprnova.cc:6256 -u name.worker -p x -d all -D -L errors.txt

I get the warnings:
WARNING: GPU_MAX_ALLOC_PERCENT is not specified!
WARNING: GPU_USE_SYNC_OBJECTS is not specified!
Where do I specify these settings?

Error before program crash:
Using /Applications/MacMiner.app/Contents/Resources/sgminer/bin/lbry.cl
CompilerOptions: -I "." -I "./kernel" -I "." -D WORKSIZE=256 -I "/Applications/MacMiner.app/Contents/Resources/sgminer/bin"
Error -11: Building Program (clBuildProgram)
In file included from :4:
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:55:7: warning: no previous prototype for function 'FAST_ROTR64_LO'
ulong FAST_ROTR64_LO(const uint2 x, const uint y) { return(as_ulong(amd_bitalign(x.s10, x, y))); }

Full Log:
Started sgminer

  • using Jansson 2.7
    CL Platform vendor: Apple
    CL Platform name: Apple
    CL Platform version: OpenCL 1.2 (May 26 2017 12:59:48)
    Platform devices: 1
    0 AMD Radeon Pro 580 Compute Engine
    Default Devices = all
    set_devices(all)
    Loading settings from default_profile for pool 0
    Pool 0 devices set to "all"
    Pool 0 lookup gap set to "(null)"
    Pool 0 Intensity set to "8"
    Pool 0 Thread Concurrency set to "(null)"
    Pool 0 Shaders set to "(null)"
    Pool 0 Worksize set to "(null)"
    WARNING: GPU_MAX_ALLOC_PERCENT is not specified!
    WARNING: GPU_USE_SYNC_OBJECTS is not specified!
    Probing for an alive pool
    Testing lbry.suprnova.cc
    [08:57:13] Succeeded delayed connect
    [08:57:13] lbry.suprnova.cc stratum session id: deadbeefcafebabe82d8020000000000
    [08:57:13] lbry.suprnova.cc difficulty changed to 128
    [08:57:15] Timed out waiting for response extranonce.subscribe
    [08:57:15] Stratum authorisation success for lbry.suprnova.cc
    [08:57:15] lbry.suprnova.cc alive
    [08:57:15] Startup GPU initialization... Using settings from pool lbry.suprnova.cc.
    [08:57:15] Startup Pool No = 0
    [08:57:15] compare_pool_settings()
    [08:57:15] set_devices(all)
    [08:57:15] Switching to intensity: pool = 8, default =
    [08:57:15] intensity -> 8
    [08:57:15] Set GPU 0 to lbry
    [08:57:15] Allocate new threads...
    [08:57:15] Assign threads for device 0
    [08:57:15] Thread 0 set pool = 0 (lbry.suprnova.cc)
    [08:57:15] Init GPU thread 0 GPU 0 virtual GPU 0
    [08:57:15] CL Platform vendor: Apple
    [08:57:15] CL Platform name: Apple
    [08:57:15] CL Platform version: OpenCL 1.2 (May 26 2017 12:59:48)
    [08:57:15] Platform devices: 1
    [08:57:15] 0 AMD Radeon Pro 580 Compute Engine
    [08:57:15] List of devices:
    [08:57:15] 0 AMD Radeon Pro 580 Compute Engine
    [08:57:15] Selected 0: AMD Radeon Pro 580 Compute Engine
    [08:57:15] Preferred vector width reported 1
    [08:57:15] Max work group size reported 256
    [08:57:15] Maximum work size for this GPU (0) is 256.
    [08:57:15] Your GPU (#0) has 36 compute units, and all AMD cards in the 7 series or newer (GCN cards) have 64 shaders per compute unit - this means it has 2304 shaders.
    [08:57:15] Max mem alloc size is 2147483648
    [08:57:15] Using source file lbry.cl
    [08:57:15] GPU 0: selecting lookup gap of 2
    [08:57:15] GPU 0: selecting thread concurrency of 16320
    [08:57:15] Setting worksize to 256
    [08:57:15] Using binary file lbryAMD Radeon Pro 580 Compute Enginegw256l8.bin
    [08:57:15] No binary found, generating from source
    [08:57:15] Building binary lbryAMD Radeon Pro 580 Compute Enginegw256l8.bin
    [08:57:15] Trying to open /Applications/MacMiner.app/Contents/Resources/sgminer/bin/lbry.cl...
    [08:57:15] Using /Applications/MacMiner.app/Contents/Resources/sgminer/bin/lbry.cl
    [08:57:16] CompilerOptions: -I "." -I "./kernel" -I "." -D WORKSIZE=256 -I "/Applications/MacMiner.app/Contents/Resources/sgminer/bin"
    [08:57:16] Error -11: Building Program (clBuildProgram)
    [08:57:16] In file included from :4:
    /Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:55:7: warning: no previous prototype for function 'FAST_ROTR64_LO'
    ulong FAST_ROTR64_LO(const uint2 x, const uint y) { return(as_ulong(amd_bitalign(x.s10, x, y))); }
    ^
    /Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:55:69: warning: implicit declaration of function 'amd_bitalign' is invalid in C99
    ulong FAST_ROTR64_LO(const uint2 x, const uint y) { return(as_ulong(amd_bitalign(x.s10, x, y))); }
    ^
    /System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4274:43: note: expanded from macro 'as_ulong'

define as_ulong( _x ) __builtin_astype( _x, ulong )

                                      ^

In file included from :4:
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:55:60: error: invalid reinterpretation: sizes of 'ulong' (aka 'unsigned long') and 'int' must match
ulong FAST_ROTR64_LO(const uint2 x, const uint y) { return(as_ulong(amd_bitalign(x.s10, x, y))); }
^ ~~~~~
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4274:25: note: expanded from macro 'as_ulong'

define as_ulong( _x ) __builtin_astype( _x, ulong )

                    ^

In file included from :4:
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:56:7: warning: no previous prototype for function 'FAST_ROTR64_HI'
ulong FAST_ROTR64_HI(const uint2 x, const uint y) { return(as_ulong(amd_bitalign(x, x.s10, (y - 32)))); }
^
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:56:60: error: invalid reinterpretation: sizes of 'ulong' (aka 'unsigned long') and 'int' must match
ulong FAST_ROTR64_HI(const uint2 x, const uint y) { return(as_ulong(amd_bitalign(x, x.s10, (y - 32)))); }
^ ~~~~~~~~
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4274:25: note: expanded from macro 'as_ulong'

define as_ulong( _x ) __builtin_astype( _x, ulong )

                    ^

In file included from :4:
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:73:6: warning: no previous prototype for function 'SHA2_512_STEP2'
void SHA2_512_STEP2(const ulong *W, uint ord, ulong *r, int i)
^
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./wolf-sha512.cl:86:6: warning: no previous prototype for function 'SHA512Block'
void SHA512Block(ulong *data, ulong *buf)
^
In file included from :5:
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./ripemd160.cl:5:9: warning: 'F1' macro redefined

define F1(x, y, z) ((x) ^ (y) ^ (z))

    ^

/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./sha256.cl:18:9: note: previous definition is here

define F1(x, y, z) bitselect(z, y, x)

    ^

In file included from :5:
/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./ripemd160.cl:235:6: warning: no previous prototype for function 'RIPEMD160_ROUND_BODY'
void RIPEMD160_ROUND_BODY(uint *in, uint *h)
^
:7:9: warning: 'SWAP32' macro redefined

define SWAP32(x) as_uint(as_uchar4(x).s3210)

    ^

/Users/Marco/Applications/sgminer-macOS/sgminer/bin/./sha256.cl:3:9: note: previous definition is here

define SWAP32(a) (as_uint(as_uchar4(a).wzyx))

    ^

[08:57:16] Failed to init GPU thread 0, disabling device 0
[08:57:16] Restarting the GPU from the menu will not fix this.
[08:57:16] Re-check your configuration and try restarting.
[08:57:24] thread_prepare failed for thread 0
[08:57:24] Starting device 0 mining thread 0...

Comments

  • Unfortunately the nicehash sgminer wasn't built with macOS in mind so it had to be patched up even to work to the extent it does - but it really needs someone to take a look at wolf-sha512.cl and get it working for Mac. You can see the pull requests for Mac support made so far and get the source here:
    https://github.com/nicehash/sgminer/pulls

    Hopefully someone with more experience can make a quick fix of it! If not I'll probably eventually get around to looking at it in more depth.

    In the meantime, I'd suggest mining a different algorithm if you want to GPU mine. It's been tested successfully with decred and keccak.

  • Oh but you could try running this before sgminer at the command line to solve the first two warnings

    export GPU_MAX_ALLOC_PERCENT=100
    export GPU_USE_SYNC_OBJECTS=1

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file