xmrig / xmrig-amd

Monero AMD (OpenCL) miner
GNU General Public License v3.0
415 stars 227 forks source link

Change intensity #151

Closed LearnMiner closed 5 years ago

LearnMiner commented 6 years ago

How can i change intesity inside code?

bananajamma commented 6 years ago

Either with the config file, which you can generate here: https://config.xmrig.com/amd

Or as command line options.

Example of two cards, with 2 threads each, 1280 intensity, with worksize 8:

--opencl-platform 0 --opencl-devices 0,0,1,1 --opencl-launch 1280x8,1280x8,1280x8,1280x8
Zeruel1805 commented 5 years ago

Is there a way to set intensify to all gpu without gpu count (--opencl-devices 0,1,....) just like (--opencl-devices *all) in the command line? Because i have multiple rig with not the same amount of GPU.

kilid commented 5 years ago

Either with the config file, which you can generate here: https://config.xmrig.com/amd

Or as command line options.

Example of two cards, with 2 threads each, 1280 intensity, with worksize 8:

--opencl-platform 0 --opencl-devices 0,0,1,1 --opencl-launch 1280x8,1280x8,1280x8,1280x8

what if I want to run two threads for all GPU with specifying specific gpu because I need universal command line for all my rigs

jkelly99 commented 5 years ago

I am looking / hoping for this option as well. I too have rigs booted from PXE with varying numbers of cards. It would be great to say "use these settings for all cards."

bananajamma commented 5 years ago

Here's a stopgap bash one-liner that would generate the arguments for you:

intensity=1280x8; i_ceil=$(sudo find /sys/kernel/debug/dri/ -name "amdgpu_pm_info" |wc -l); echo $({ echo "--opencl-devices"; i=0; while [[ $i -lt $i_ceil ]]; do echo "$i,$i"; i=$((i+1)); done | paste -sd , -; echo "--opencl-launch"; i=0; while [[ $i -lt $i_ceil ]]; do echo "$intensity,$intensity"; i=$((i+1)); done | paste -sd , - })

Example output:

--opencl-devices 0,0,1,1,2,2,3,3,4,4,5,5 --opencl-launch 1280x8,1280x8,1280x8,1280x8,1280x8,1280x8,1280x8,1280x8,1280x8,1280x8,1280x8,1280x8

You can put the one-liner in a bash script wrapper for launching xmrig, or just use it inline as a subshell:

xmrig --donate-level 10 -o gulf.moneroocean.stream:10128 --opencl-platform 0 $(intensity=1280x8; i_ceil=$(sudo find /sys/kernel/debug/dri/ -name "amdgpu_pm_info" |wc -l); echo $({ echo "--opencl-devices"; i=0; while [[ $i -lt $i_ceil ]]; do echo "$i,$i"; i=$((i+1)); done | paste -sd , -; echo "--opencl-launch"; i=0; while [[ $i -lt $i_ceil ]]; do echo "$intensity,$intensity"; i=$((i+1)); done | paste -sd , - })) -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD -p x -k
xmrig commented 5 years ago

https://github.com/xmrig/xmrig/releases/tag/v4.0.0-beta