Closed minzak closed 6 years ago
When recompiling or running any different version (new/changed at all) please rm -rf /root/.openclcache/
before running changed executable.
It is loading a precompiled (with the other version) OpenCL kernel binary which must be incompatible with changed driver/SDK/compiler. Delete them and it will recompile and probably not crash.
That cache thing was probably the worst new feature in a while. Nice idea, causes too much dumb, saves only 10 seconds per GPU. Probably need to drop a .version
file in there and automatically delete everything if you run some other version than last one that created the .version
file, to make it less of a "just delete the cache constantly out of just making sure"
Yes, /.openclcache/ - always delete before run, previous i had bad screen
[2018-07-30 22:50:06] : Mining coin: cryptonight_v7
[2018-07-30 22:50:06] : Compiling code and initializing GPUs. This will take a while...
[2018-07-30 22:50:06] : Device 3 work size 8 / 32.
[2018-07-30 22:50:06] : OpenCL device 3 - Precompiled code /root/.openclcache/ec3329e6dc4ed1a7eb265d882b810a43ec443fcf29c456e67987c0ffdc57e3f6.openclbin not found. Compiling ...
[2018-07-30 22:50:18] : OpenCL device 3 - Precompiled code stored in file /root/.openclcache/ec3329e6dc4ed1a7eb265d882b810a43ec443fcf29c456e67987c0ffdc57e3f6.openclbin
[2018-07-30 22:50:18] : Device 3 work size 8 / 32.
[2018-07-30 22:50:18] : OpenCL device 3 - Load precompiled code from file /root/.openclcache/ec3329e6dc4ed1a7eb265d882b810a43ec443fcf29c456e67987c0ffdc57e3f6.openclbin
Segmentation fault
Ok, i read about something not compatible with clang, but not fully understand (Ukrainian/Russian is my native language)
Ok i have 3 way, i'm right? 1- just apt purge previous clang - it must helps. 2- compile OpenCL and XMR-STAK with same compiler (gcc or clang7 or else..) 3- use Gentoo and recompile all whole system ))
Which way are you providing the alternate compiler to cmake?
I use similar to:
CC=/usr/bin/clang-7 CXX=/usr/bin/clang++-7 \
cmake -DCMAKE_BUILD_TYPE=Release -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF ..
I will test clang-7 and OpenCL it may not work / I only tested alternative compilers for CPU backend.
No reason to purge, I have 7 compilers installed, all work perfectly. Do try clang-3.8 though I think it does work with OpenCL. Maybe clang-7 is too new for AMD stuff.
EDIT: definitely using clang-3.8 for one of my xenial AMD rigs.
You could also try running with command line arg --noAMDCache
The entire cache hack is somewhat undocumented. It compiles on one GPU then dumps the memory using unofficial methods to a file, and to load a cache it just dumps that binary onto the other GPU. That could be easily broken while the rest of "normal" OpenCL usage is not, the technique is not AMD supported and happened to work but maybe not with other compilers/drivers than the standards.
clang-6.0
worked, I have trouble getting clang-7
on Ubuntu Xenial
Which driver are you trying? I use 17.50-552542 with this build command:
CC=/usr/bin/clang-6.0 CXX=/usr/bin/clang++-6.0 \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCUDA_ENABLE=OFF \
-DOpenCL_ENABLE=ON \
-DOpenCL_LIBRARY=/opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so \
..
My successful (with cache too) output:
[2018-07-30 14:16:46] : Mining coin: monero7
!!!! Doing only a benchmark and exiting. To mine, remove the '--benchmark' option. !!!!
[2018-07-30 14:16:46] : Prepare benchmark for block version 7
[2018-07-30 14:16:46] : Compiling code and initializing GPUs. This will take a while...
[2018-07-30 14:16:46] : Device 0 work size 8 / 32.
[2018-07-30 14:16:46] : OpenCL device 0 - Precompiled code /root/.openclcache/5a904bcadf5b454083f9787e13b8eae5206e090ee44af17d7721e5a2ecfce484.openclbin not found. Compiling ...
[2018-07-30 14:17:20] : OpenCL device 0 - Precompiled code stored in file /root/.openclcache/5a904bcadf5b454083f9787e13b8eae5206e090ee44af17d7721e5a2ecfce484.openclbin
[2018-07-30 14:17:20] : Device 1 work size 8 / 32.
[2018-07-30 14:17:21] : OpenCL device 1 - Load precompiled code from file /root/.openclcache/5a904bcadf5b454083f9787e13b8eae5206e090ee44af17d7721e5a2ecfce484.openclbin
[2018-07-30 14:17:21] : Device 2 work size 8 / 32.
[2018-07-30 14:17:21] : OpenCL device 2 - Load precompiled code from file /root/.openclcache/5a904bcadf5b454083f9787e13b8eae5206e090ee44af17d7721e5a2ecfce484.openclbin
[2018-07-30 14:17:21] : Device 3 work size 8 / 32.
[2018-07-30 14:17:21] : OpenCL device 3 - Load precompiled code from file /root/.openclcache/5a904bcadf5b454083f9787e13b8eae5206e090ee44af17d7721e5a2ecfce484.openclbin
[2018-07-30 14:17:21] : Device 4 work size 8 / 32.
[2018-07-30 14:17:22] : OpenCL device 4 - Precompiled code /root/.openclcache/54896cf94f10944a77d20e4f720146c0b5a35b7935080c784a64424cfcd5c084.openclbin not found. Compiling ...
[2018-07-30 14:17:58] : OpenCL device 4 - Precompiled code stored in file /root/.openclcache/54896cf94f10944a77d20e4f720146c0b5a35b7935080c784a64424cfcd5c084.openclbin
[2018-07-30 14:17:58] : Device 5 work size 8 / 32.
[2018-07-30 14:17:59] : OpenCL device 5 - Precompiled code /root/.openclcache/e1b56274bc8080c47cade4f242ff7d3799f68456adfc2d869a41a7c3961a95f3.openclbin not found. Compiling ...
[2018-07-30 14:18:35] : OpenCL device 5 - Precompiled code stored in file /root/.openclcache/e1b56274bc8080c47cade4f242ff7d3799f68456adfc2d869a41a7c3961a95f3.openclbin
[2018-07-30 14:18:35] : Starting AMD GPU (OpenCL) thread 0, no affinity.
[2018-07-30 14:18:35] : Starting AMD GPU (OpenCL) thread 1, no affinity.
[2018-07-30 14:18:35] : Starting AMD GPU (OpenCL) thread 2, no affinity.
[2018-07-30 14:18:35] : Starting AMD GPU (OpenCL) thread 3, no affinity.
[2018-07-30 14:18:35] : Starting AMD GPU (OpenCL) thread 4, no affinity.
[2018-07-30 14:18:35] : Starting AMD GPU (OpenCL) thread 5, no affinity.
[2018-07-30 14:18:35] : WARNING: backend CPU disabled.
[2018-07-30 14:18:35] : Wait 5 sec until all backends are initialized
[2018-07-30 14:18:40] : Start a 15 second benchmark...
[2018-07-30 14:18:55] : Benchmark Thread 0 amd: 706.8 H/S
[2018-07-30 14:18:55] : Benchmark Thread 1 amd: 731.7 H/S
[2018-07-30 14:18:55] : Benchmark Thread 2 amd: 677.2 H/S
[2018-07-30 14:18:55] : Benchmark Thread 3 amd: 678.3 H/S
[2018-07-30 14:18:55] : Benchmark Thread 4 amd: 328.9 H/S
[2018-07-30 14:18:55] : Benchmark Thread 5 amd: 269.1 H/S
[2018-07-30 14:18:55] : Benchmark Total: 3392.0 H/S
That was running at the same time as ethdcrminer64 -- kind of good rates really (I think it made the ETH rates really low though, during)
yes, i write previous, i build with this string:
CC=/usr/lib/llvm-7/bin/clang CXX=/usr/lib/llvm-7/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=ON -DCPU_ENABLE=ON ..
my driver is 17.40-514569, ok will try use latest 17.50.xx
Hm, purge clang, and recompile with no clang - not helps
apt purge clang-7 clang-tools-7 libclang-common-7-dev libclang-7-dev libclang1-7 libllvm7 lldb-7 llvm-7 llvm-7-dev llvm-7-examples llvm-7-runtime clang-format-7 python-clang-7 lld-7 libfuzzer-7-dev clang-7-doc llvm-7-doc -y
apt autoermove -y
reboot
Ok. i try to use clang6 on Debian
Hm, very intresting, when i delete cache and run - i see that cache build but not work, Maybe something leave in system from clang7 ?
root@ferma:/opt/xmr-stak# ./xmr-stak
-------------------------------------------------------------------
xmr-stak 2.4.7 c5f0505
Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).
Based on OpenCL mining code by wolf9466.
Configurable dev donation level is set to 2.0%
You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2018-07-30 23:18:02] : Mining coin: cryptonight_v7
[2018-07-30 23:18:02] : Compiling code and initializing GPUs. This will take a while...
[2018-07-30 23:18:02] : Device 3 work size 8 / 32.
[2018-07-30 23:18:02] : OpenCL device 3 - Precompiled code /root/.openclcache/ec3329e6dc4ed1a7eb265d882b810a43ec443fcf29c456e67987c0ffdc57e3f6.openclbin not found. Compiling ...
[2018-07-30 23:18:13] : OpenCL device 3 - Precompiled code stored in file /root/.openclcache/ec3329e6dc4ed1a7eb265d882b810a43ec443fcf29c456e67987c0ffdc57e3f6.openclbin
[2018-07-30 23:18:13] : Device 3 work size 8 / 32.
[2018-07-30 23:18:13] : OpenCL device 3 - Load precompiled code from file /root/.openclcache/ec3329e6dc4ed1a7eb265d882b810a43ec443fcf29c456e67987c0ffdc57e3f6.openclbin
Segmentation fault
But when i use --noAMDCache - it is works! But it is just every time compile cache, and work..
root@ferma:/opt/xmr-stak# ./xmr-stak --noAMDCache
-------------------------------------------------------------------
xmr-stak 2.4.7 c5f0505
Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).
Based on OpenCL mining code by wolf9466.
Configurable dev donation level is set to 2.0%
You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2018-07-30 23:20:11] : Mining coin: cryptonight_v7
[2018-07-30 23:20:11] : Compiling code and initializing GPUs. This will take a while...
[2018-07-30 23:20:11] : Device 3 work size 8 / 32.
[2018-07-30 23:20:23] : Device 3 work size 8 / 32.
[2018-07-30 23:20:34] : Device 4 work size 8 / 32.
[2018-07-30 23:20:46] : Device 4 work size 8 / 32.
[2018-07-30 23:20:57] : Device 0 work size 8 / 32.
[2018-07-30 23:21:08] : Device 0 work size 8 / 32.
[2018-07-30 23:21:20] : Device 1 work size 8 / 32.
[2018-07-30 23:21:31] : Device 1 work size 8 / 32.
[2018-07-30 23:21:43] : Device 2 work size 8 / 32.
[2018-07-30 23:21:55] : Device 2 work size 8 / 32.
[2018-07-30 23:22:06] : Device 5 work size 8 / 32.
[2018-07-30 23:22:17] : Device 5 work size 8 / 32.
[2018-07-30 23:22:29] : Device 6 work size 8 / 32.
[2018-07-30 23:22:40] : Device 6 work size 8 / 32.
[2018-07-30 23:22:51] : Device 7 work size 8 / 32.
[2018-07-30 23:23:03] : Device 7 work size 8 / 32.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 0, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 1, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 2, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 3, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 4, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 5, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 6, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 7, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 8, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 9, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 10, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 11, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 12, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 13, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 14, no affinity.
[2018-07-30 23:23:14] : Starting AMD GPU (OpenCL) thread 15, no affinity.
[2018-07-30 23:23:14] : Starting 1x thread, affinity: 0.
[2018-07-30 23:23:14] : hwloc: memory pinned
[2018-07-30 23:23:14] : Starting 1x thread, affinity: 1.
[2018-07-30 23:23:14] : hwloc: memory pinned
[2018-07-30 23:23:14] : Starting 1x thread, affinity: 2.
[2018-07-30 23:23:14] : hwloc: memory pinned
[2018-07-30 23:23:14] : Fast-connecting to monerov.ingest.cryptoknight.cc:9222 pool ...
[2018-07-30 23:23:14] : Fast-connecting to graft.ingest.cryptoknight.cc:9112 pool ...
[2018-07-30 23:23:14] : Pool monerov.ingest.cryptoknight.cc:9222 connected. Logging in...
[2018-07-30 23:23:14] : Pool graft.ingest.cryptoknight.cc:9112 connected. Logging in...
[2018-07-30 23:23:15] : Difficulty changed. Now: 150000.
[2018-07-30 23:23:15] : Pool logged in.
[2018-07-30 23:23:28] : Result accepted by the pool.
Oh, no, not work, but run and has a slow hashrate:
HASHRATE REPORT - AMD
| ID | 10s | 60s | 15m | ID | 10s | 60s | 15m |
| 0 | (na) | 63.4 | (na) | 1 | (na) | (na) | (na) |
| 2 | (na) | 63.4 | (na) | 3 | (na) | (na) | (na) |
Totals (AMD): 0.0 126.7 0.0 H/s
-----------------------------------------------------------------
Totals (ALL): 193.7 320.7 0.0 H/s
Highest: 0.0 H/s
-----------------------------------------------------------------
It is like AMD bug, when Card in 16xPCI slot, but i not use 16x.
How to see logs what OpenCL is compiled? I think It helps to detect this issue.
It looks like an issue we had also on OSX. As I remember the problem was a broken OpenCL driver.
@psychocrypt You right, it something wrong with driver, but many OpenCL work, But also interesting to see how almost half Cards are freezing, 0MHz CLCs and etc. Ok, thanks to all, i will reinstall whole system. And try to use clang 6)
Hm, very strange, all was worked, but no today. Latest Debian 9 x64. NO opencl-mesa I Add Clang7 in system (i read issues, where clang7 is better), i think/guess this reason of Segmentation fault:
My build is:
I run xmr with deleted amd.txt
In system opencl-amdgpu:
HelloWorld from example OpenCL is work.
Also Add my clinfo clinfo.txt
How to check it, what wrong? Thanks.