enerc / VulkanXMRMiner

Vulkan SPIR-V miner for Cryptonight
GNU General Public License v3.0
32 stars 17 forks source link

Can't generate config.json #12

Closed cl4r0s closed 5 years ago

cl4r0s commented 5 years ago

On my linux, debian_version 9.8 uname -a Linux 4.19.0-0.bpo.1-amd64 #1 SMP Debian 4.19.12-1~bpo9+1 (2018-12-30) x86_64 GNU/Linux I can't generate the config:

./miner

Vulkan SPIR-V XMR Miner 0.3

Please use recent drivers for better support and performance. Vulkan is a pretty new API. You can get more about Vulkan at https://www.amd.com/en/technologies/vulkan or https://developer.nvidia.com/vulkan-driver

No config.json file found, entering configuration setup... Select a crypto: 0 for Monero 1 for Wownero 2 for Aeon,Bittorium - cryptonight light 3 for TurtleCoin Your crypto: 0


| \/ |
| |\/| |/
| ' \ / \ '
/ \
| | | | (
) | | | | / | | () | || ||\/|| ||_|| \/

Mining pool address (hostname/IP): pool.supportxmr.com
Mining pool port: 5555 Illegal instruction


miner exit and no config file is written. Please post a sample config.json so I can test your miner with the open source amdgpu driver, open source vulkan and mesa library without any amd proprietary driver.

cl4r0s commented 5 years ago

I've written from scratch a config.json, but running miner I got:

root:~/vulkanxmrminer-0.3# ./miner Vulkan SPIR-V XMR Miner 0.3

Illegal instruction

Debian Packages info of my config:

dpkg -l | grep vulkan

ii libvulkan-dev:amd64 1.0.39.0+dfsg1-1 amd64 Vulkan loader library -- development files ii libvulkan1:amd64 1.0.39.0+dfsg1-1 amd64 Vulkan loader library ii mesa-vulkan-drivers 13.0.6-1+b2 amd64 Mesa Vulkan graphics drivers ii vulkan-utils 1.0.39.0+dfsg1-1 amd64 Miscellaneous Vulkan utilities

enerc commented 5 years ago

Your processor is likely non aes/non avs. Please configure it with:

mkdir build
cd build
cmake -DSOFT_AES=1 ..
make

I will provide a build without aes in next release. Root is not needed :relaxed:

cl4r0s commented 5 years ago

This is the processor: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz stepping : 7 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr ss e sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_ts c cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2a pic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsa veopt dtherm ida arat pln pts flush_l1d

I've tried a lot but I don't know Vulkan libraries and I'm not able to compile the miner from github, a lot of errors starting with: /root/build/VulkanXMRMiner/src/mvulkan.cpp: In function ‘void shaderStats(VkDevice, VkPipeline)’: /root/build/VulkanXMRMiner/src/mvulkan.cpp:483:3: error: ‘PFN_vkGetShaderInfoAMD’ was not declared in this scope PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)vkGetDeviceProcAddr(vkDevice, "vkGetShaderInfoAMD"); ^~~~~~ In file included from /root/build/VulkanXMRMiner/src/mvulkan.cpp:31:0: /root/build/VulkanXMRMiner/src/mvulkan.cpp:485:79: error: ‘VK_SHADER_INFO_TYPE_STATISTICS_AMD’

I have to wait for your next release. Thank you for your support

enerc commented 5 years ago

Vulkan 1.0.39 in "Stretch" in a bit outdated (latest is 1.0.101). If you want to build it yourself, either use sid or set VULKAN_SDK to where you downloaded and extracted the sdk. Anyway, I have built and added file vulkanxmrMiner-noaes-latest.tgz in the release. Please tell me if it works for you. Thanks :smiley:

cl4r0s commented 5 years ago

Thank you for effort! Anyway, it doesn't work:


root@clarosrv:~/vulkanxmrminer-0.3# ./miner --version Vulkan SPIR-V XMR Miner 0.3

Illegal instruction


First try without config.json:


root@clarosrv:~/vulkanxmrminer-0.3# ./miner Vulkan SPIR-V XMR Miner 0.3

Please use recent drivers for better support and performance. Vulkan is a pretty new API. You can get more about Vulkan at https://www.amd.com/en/technologies/vulkan or https://developer.nvidia.com/vulkan-driver

No config.json file found, entering configuration setup... Select a crypto: 0 for Monero 1 for Wownero 2 for Aeon,Bittorium - cryptonight light 3 for TurtleCoin Your crypto: 0


| \/ |
| |\/| |/
| ' \ / \ '
/ \
| | | | (
) | | | | / | | () | || ||\/|| ||_|| \/

Mining pool address (hostname/IP): pool.supportxmr.com Mining pool port: 7777 Illegal instruction


Second try with an handmade config.json: root@clarosrv:~/vulkanxmrminer-0.3# ./miner Vulkan SPIR-V XMR Miner 0.3

Illegal instruction


I'm avaliable to test any other version you will provide. Best Regards

enerc commented 5 years ago

Could you try to download the sdk from https://www.lunarg.com/vulkan-sdk, unpack it, and the set VULKAN_SDK to where you downloaded the sdk (export VULKAN_SDK-...). Then cmake -DSOFT_AES=1 ..

enerc commented 5 years ago

Hi, I have updated the build to be core2 compatible. That should fix this issue

cl4r0s commented 5 years ago

Unfortunately it is not true, but we achived some progress:


root@clarosrv:~/vulkanxmrminer-0.3# ./miner Vulkan SPIR-V XMR Miner 0.3

Please use recent drivers for better support and performance. Vulkan is a pretty new API. You can get more about Vulkan at https://www.amd.com/en/technologies/vulkan or https://developer.nvidia.com/vulkan-driver

No config.json file found, entering configuration setup... Select a crypto: 0 for Monero 1 for Wownero 2 for Aeon,Bittorium - cryptonight light 3 for TurtleCoin Your crypto: 0


| \/ |
| |\/| |/
| ' \ / \ '
/ \
| | | | (
) | | | | / | | () | || ||\/|| ||_|| \/

Mining pool address (hostname/IP): pool.supportxmr.com Mining pool port: 7777 Your address (with optional .something at the end): Password (or x if none): Monitoring listen port (0 if no JSON/graphic console): 3333 Console refresh rate (default 30s):
WARNING: radv is not a conformant vulkan implementation, testing use only. WARNING: radv is not a conformant vulkan implementation, testing use only.

Checking your cards Index:0 MemorySize:8188 Gb - AMD RADV POLARIS10 Index:1 MemorySize:8188 Gb - AMD RADV POLARIS10

Finding best configuration.... ../../../src/compiler/spirv/spirv_to_nir.c:2489 WARNING: Unsupported SPIR-V capability: Int64 Segmentation fault root@clarosrv:~/vulkanxmrminer-0.3#


config.json was not written, so tried with mine


root@clarosrv:~/vulkanxmrminer-0.3# cp config.json.bak config.json root@clarosrv:~/vulkanxmrminer-0.3# ./miner Vulkan SPIR-V XMR Miner 0.3

Connecting to pool.supportxmr.com:7777 ... done! WARNING: radv is not a conformant vulkan implementation, testing use only. WARNING: radv is not a conformant vulkan implementation, testing use only. Driver API version 1.0.5 Using XMR Variant: cn/r Mining started.... (Press q to stop) [Time] 'Total H/s' 'Good shares'/'Invalid shares'/'Expired shares' [GPU] H/s 'good hashes'/'bad hashes' [09:55:49] 0.0H/s 0/0/0 [09:56:19] 0.0H/s 0/0/0 [09:56:49] 0.0H/s 0/0/0


and so on... the miner run but no hashes. Just for your information, the graphic card on this system is an AMD Radeon (TM) Pro WX 5100 Graphics (Ellesmere) - 8 GB Ram - 28 Compute Units OD_SCLK: 0: 300MHz 800mV 1: 426MHz 815mV 2: 581MHz 817mV 3: 726MHz 819mV 4: 875MHz 887mV 5: 922MHz 918mV 6: 1004MHz 981mV 7: 1086MHz 1056mV OD_MCLK: 0: 300MHz 800mV 1: 1250MHz 900mV OD_RANGE: SCLK: 300MHz 1900MHz MCLK: 300MHz 2100MHz VDDC: 800mV 1150mV With overclock and undervolt It can perfom about 601 h/s with xmirg-amd, using the Debian amdgpu driver and firmware-amd

Best Regards

enerc commented 5 years ago

Radv (the Mesa Open Source Vulkan implementation) is no go for now. I have tried, but there are many missing functionalities like the one reported: "Int64". The only option is to use the driver provided with amdgpu-pro. Uninstall the mesa-vulkan package and install amdgpu-pro in headless mode. See "driver installation" in the readme and look at issue 1. Best regards

cl4r0s commented 5 years ago

Unfortunately AMD doesn't provide a driver for debian, just ubuntu. I've tried to compile the kernel module, but I got a lot of warning and the driver was unstable. So I'm using all the debian drivers with just a single amd opencl package. A vulkan miner working with all open source software could open mining to every linux distribution, not just ubuntu and redhat. Indeed, I could achive the same hashrate with that card on ubuntu/amd driver and with the new debian/amdgpu, at least with xmrig....
Please in the future try to make your miner compatible with the open source drivers. Thank you for your support!

enerc commented 5 years ago

I am running on Debian (nice distro 😄 )

You don't need to install any kernel driver. You just need two files on your machine:

You can get amdvlk64.so from the AMD vulkan debian package. I don't think I have the right to make it downloadable from this github.

That's all you need: standard debian + one library + one configuration file

cl4r0s commented 5 years ago

Followed your instruction, all ok but hash rejected


"cards" : [ { "index" : "0", "cu" : "28", "factor" : "144", "worksize" : "16" }
Play with the parameters for optimum hashrate.


| _| () | | | | | ' \ | |/ _ | | | | | | | |_| | | || | () | || | |_| |___|| ||/ |_/ _, | () |__/ |___/

Connecting to pool.supportxmr.com:7777 ... done! Driver API version 1.0.54 Using XMR Variant: cn/r Mining started.... (Press q to stop) [Time] 'Total H/s' 'Good shares'/'Invalid shares'/'Expired shares' [GPU] H/s 'good hashes'/'bad hashes' Hash rejected on GPU #0 [20:12:23] 526.2H/s 0/0/0 [0]:526.2H/s 0/1
Hash rejected on GPU #0


I'm mixing libvulkan.so.1 from debian and amdvlk64.so from amd because without libvulkan the miner refuses to start. Any suggestion?

enerc commented 5 years ago

Could be because you are too close to 8Gb of memory (28x144x2). Could you try 28x128? Did you take amdvlk64.so from Crimson 17.10.2 (1.0.54)? I am using amdvlk64.so from 18.50 and driver API version reports 1.1.86.