I’m trying to run RX580 GPUs to mine grin. So far I have done the following.
ran ./install_ocl_plugins.sh
commented out the [[mining.miner_plugin_config]] to the end of the file in grin-miner.toml
compiled grin-miner
Is the above all that needs done ( above and beyond the basic grin-miner install instructions ) to get grin-miner working with AMD GPUs? I ask because when I run grin-miner I get the following error:
Unable to get platform id list after 10 seconds of waiting. ', libcore/result.rs:10095Size
you have to comment out the cpu plugin(s) in grin-miner.toml
cpu mining does not make sense at all and you will need some cpu power for the amd ocl plugin as well.
the correct plugin for AMD is ocl_cuckaroo (not ocl_cuckatoo) and you have to specify the plugin for each gpu in grin-miner.toml
example for 4 gpu (maybe you will need to change the platform value from 0 to 1 or 2):
I’m having troubles mining with a rig containing five RX580s.
Using the config above (plus the latest amdgpu drivers described below) I’m able to mine with a single GPU. I’m getting a hash rate of about 16 GPS, which I believe is in line with what other RX580s miner. I also confirmed that it is indeed a GPU that is running, not the CPU.
When I add multiple GPU to the configuration file like below, I will still see only 1 GPU mining, until I add more four or more GPUs in the config file. When the config file contains four or more GPUs, none of the GPUs hash.
(I am using the GrintMint mining pool, and do see correct RPC messages in the Grin client and a confirmation in the GrinMint dashboard that GrinMint is receiving hashes from the rig. When mining other coins like Ethereum, all five GPUs work.)
Is this is an issue that anyone is familiar with? How do I get all to mine using all five RX580s?
[[mining.miner_plugin_config]]
plugin_name = "ocl_cuckaroo"
[mining.miner_plugin_config.parameters]
platform = 1 # according to docs AMD is platform 1, but changing it to 0 doesn't have any effect
device = 0
[[mining.miner_plugin_config]]
plugin_name = "ocl_cuckaroo"
[mining.miner_plugin_config.parameters]
platform = 1
device = 1
etc...
add gpus to the config one by one and see when the miner stops to work. i guess the miner hangs on one of the gpu. lower the mem clock as well, start with the stock memory clock. this algo utilises the gpu memory differently compared to ethash.
Hello,
Thanks for the great guide.
Is it possible to use RX 580/480 8GB to mine C31?
I followed your guide and while running “cargo build --release --features opencl”
is have an error:
= note: /usr/bin/ld: cannot find -lOpenCL
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
error: aborting due to previous error
error: Could not compile ocl_cuckaroo.
warning: build failed, waiting for other jobs to finish…
error: build failed
But, I use not the official driver, I installed ROCm 2.0 - is it the problem?
you can mine c31 with the lean miner included in grin-miner (ocl_cuckatoo)
the compiler is searching libOpenCL.so in /usr/lib/x86_64-linux-gnu directory.
on ubuntu, you can install package ocl-icd-libopencl1 or create a symlink in the mentioned dir to libOpenCL.so provided by ROCm.
ROCm requires PCIe atomics for Polaris and will only work on RX580/480 connected to the first or second PCIe x16 slots (depends on chipset).
Thank you for the explanation. I have 1GPU in my system based on Ryzen 1900. I’ve played with the different settings and setups. The only problem I have is to run original grin miner for C31 with ROCm:
Linux Ubuntu 18.04.1 desktop + ROCm 2.1
GrinGoldMiner 2.9 C29 = 2.15
Grin Miner 1.0.2 downloaded C29 = 2.05
Grin Miner 1.0.2 downloaded C31 = ERROR
Here I have an error:
Waiting for solvers to shutdown...
/tmp/AMD_3741_18/t_3741_20.cl:55:15: error: variables in the local address space can only be declared in the outermost
scope of a kernel function
__local u32 el[256][8];
^
1 error generated.
thread '<unnamed>' panicked at 'can't build trimmer:
###################### OPENCL PROGRAM BUILD DEBUG OUTPUT ######################
Error: Failed to compile opencl source (from CL to LLVM IR).
###############################################################################
', src/libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Have no idea how to fix. Tried to setup LLVM_BIN=/opt/rocm/opencl/bin/x86_64 - didn’t work.
you have two options,
you can use my guide below to install the pre compilled version of Grin-Miner (from original Github), or you could edit i think is the trimmer.rs file on the ocl_cuckatoo/src folder
you edit to move the definition of that variable to outer scope! (you may find another error with the ‘util’ not being defined, if so, just say and i’ll help you)
this is a guide on how to do it with the pre compiled version, that I’ve tested with ROCm on Ubuntu 18.04.1:
sudo apt-get update
sudo apt-get install wget
cd ~
mkdir grin
cd grin
wget https://github.com/mimblewimble/grin-miner/releases/download/v1.0.2/grin-miner-v1.0.2-480780314-linux-amd64.tgz
tar -vxzf grin-miner-v1.0.2-480780314-linux-amd64.tgz
cd grin-miner-v1.0.2
nano grin-miner.toml
(EDIT YOUR CONFIG! with nano or use something better)
./grin-miner
BTW, i’m in no way directly connected to the GRIN team, i’m just trying to help…
if any of you need to install amd drivers first, follow this(assuming you already crated the grin directory):
cd ~/grin
wget https://drivers.amd.com/drivers/linux/amdgpu-pro-18.50-725072-ubuntu-18.04.tar.xz
tar -vxJf amdgpu-pro-18.50-725072-ubuntu-18.04.tar.xz
cd amdgpu-pro-18.50-725072-ubuntu-18.04
./amdgpu-pro-install
or
./amdgpu-install
just did this without testing it but it should work!
This will install OpenCL and resto of the driver and features for normal Graphics Cards under 18.04.1.
Hey. Thanks. This works for me - edit .rs and rebuild plugin.
Actually that’s interesting, because I have no errors with Official AMD + Pre-Compiled/Compiled, but had only the issue with the ROCm and C31.
P.s.: I’m planning to buy Radeon VII. Which plugin should I use for it for C31 to use all the 16GB of memory?
Well i don’t think there is an AMD miner that can take advantage of more than 8GB RAM, that would be great actually.
I think your best shot for now is the MinerBabe’s KBminer, but it uses the lean approach if I’m not mistaken, it would be great to have an alternative with the mean approach for AMD…