-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clinfo gives terminate called after throwing an instance of 'cl::Error' #511
Comments
Just to test the simple stuff first: is your user in the 'video' group? |
Yes. my user is in video group. |
if i run as sudo i get: :~$ sudo clinfo |
OK, let's run some tests then to see where things are breaking. :) Could I get you to run the following sets of commands and show me their output? cp -R /opt/rocm/hip/samples/1_Utils/hipInfo/ ~
cd ~/hipInfo
make hipInfo
./hipInfo cp -R /opt/rocm/hip/samples/0_Intro/square/ ~
cd ~/square/
make
./square.out cd ~
git clone https://github.com/ROCm-Developer-Tools/clARMOR.git -b develop
cd ~/clARMOR
export OCL_INCLUDE_DIR=/opt/rocm/opencl/include/
export OCL_LIB_DIR=/opt/rocm/opencl/lib/x86_64/
make info_check
./bin/clarmor-info -g -b This one relies on having done the one above: cd ~/clARMOR/tests/good_cl_mem
make build_test
./good_cl_mem.exe |
First:
Second:
3rd (all output):
|
I edited your message to enclose the outputs in code blocks. This should help formatting. :) OK, looks like ROCm and HSA stuff works, but OpenCL is broken. It's not I seem to remember that "-1001" is a non-standard OpenCL error code frequently returned by the Nvidia OpenCL runtime as a generic "failed but we don't specify why" marker. Did your system previously have Nvidia GPUs in it, and/or do you have the CUDA SDK installed? Could you run the following commands and show me the output?
|
thankyou, apologies.. im formatting Git noob :-)
i assume it cant find dir or there is error in the loop here? |
Oops, speaking of GitHub formatting noob, looks like I forgot that putting backticks in a bash command is going to make things throw up. The third command should have been: for i in `ls -1 /etc/OpenCL/vendors`; do echo -n "$i : "; cat /etc/OpenCL/vendors/$i; done That said, it's a bit weird that you don't have anything in /etc/OpenCL/vendors. This should be set up by default when installing ROCm, I believe. What steps did you go through to install ROCm and OpenCL? Did you just install the Try this: sudo mkdir -p /etc/OpenCL/vendors/
echo 'libamdocl64.so' | sudo tee /etc/OpenCL/vendors/amdocl64.icd
/opt/rocm/opencl/bin/x86_64/clinfo If the final line doesn't work, perhaps try it with |
Oh and no this was a clean install of 16.04 Desktop LTS, no other Nvidia cards were installed in this unit period. its only ever seen the 6x Vegas and no other AMD cards. |
i followed this guide: |
I was able to reproduce the "-1001" value using the standard libOpenCL.so ICD loader that ships with Ubuntu 16.04 LTS. I see that error if I remove the AMD vendor ICD from /etc/OpenCL/vendors/, so I suspect that's part of the problem here. To make sure I haven't messed up any of the directions on that page, could you also run: |
its strange because it looks like there is nothing inside the dir?
results of PATH:
|
Erk, sorry. I had a typo in a line. The first line should've been |
ok cool, here you go: all the sets just to be sure ;-)
|
Great, looks like things are working as expected now. You may want to go try the 'good_cl_mem.exe" test again just to be sure a real application runs, but if clinfo works, you're probably good to go. I am unsure why your ICD was not installed correctly by default; I've done a dozen (or more) ROCm installed since the last time we updated the ROCm repo, and it's worked every time on my systems. Odd. By the way, you may want to run these commands so that in the future your ROCm-focused applications we all the right binaries and library directories: echo 'export LD_LIBRARY_PATH=/opt/rocm/opencl/lib/x86_64:/opt/rocm/hsa/lib:$LD_LIBRARY_PATH' | sudo tee -a /etc/profile.d/rocm.sh
echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64' | sudo tee -a /etc/profile.d/rocm.sh This is totally optional, though. |
Great, thankyou, the result from 'good_cl_mem.exe" is:
and i have run the commands you suggest..
let see what the miner program says on launch.. ( standby... ) |
excellent! thankyou very much for the help! what was the issue at the end of the day? ROCm and ICD not installign correctly? what is ICD ?
|
All OpenCL programs (or at least well-formed ones) will link against libOpenCL.so. However, it's possible that you might have multiple OpenCL runtime installations from multiple vendors. Imagine, for instance, if you wanted to use Intel's OpenCL runtime for CPUs (I think this still exists?) and AMD's OpenCL runtime for GPUs at the same time. You wouldn't want to write your program to try to load libOpenCL.intel.so and libOpenCL.amd.so (what if 20 more OpenCL implementations appeared overnight?) So instead, libOpenCL.so is actually an Installable Client Driver loader. It goes off into system-standard locations (like /etc/OpenCL/vendors/) and finds all of the OpenCL "platforms" in the system by looking into the .icd files to say "which file is the actual OpenCL platform runtime". Then it can enumerate all of these platforms, and your application can choose which one it wants. For some reason, your ROCm installation put AMD's OpenCL runtime in the correct place (/opt/rocm/opencl/lib/x86_64/libamdocl64.so), but it did not install the proper .icd files. As such, your libOpenCL.so didn't see any platforms, because there were no .icd files to load. Again, I'm not sure why that happened, and I've been unable to repeat this issue when doing a fresh ROCm installation. Glad we were able to get this working! |
Hmm interesting. i will try do another fresh install on another PC with a Vega and let you know the results. i wonder if it would be wise to post a script to check and install the correct .icd files while doing or after the ROCm install ? or do you think this issue was concentrated to this particular install, i may have screwed something up along the way when installing ROCm in the first place.. so it could be as simple as a user (me) error. |
Installing this .icd file is done as part of installing the do_ldconfig() {
echo /opt/rocm/opencl/lib/x86_64 > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig
mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/amdocl64.icd)
} As such, I'm not sure how it's possible to get that package installed and yet not have the ICD correctly installed. It's a mystery to me. :) If this turns out to be a common problem, I'll look into a way to detect that this happened. As it stands, I'm not sure if this isn't just a fluke. |
any idea after shutting down the rig and then restarting why tdx miner runs but GPU load is 0% and the miner does not do any hashing the miner can see all 6 GPU's and it connects to pool and receives jobs but there is no hashing going on? i dont understand what would have changed? 'clinfo' reports correctly and Running Good cl_mem Test is fine. |
|
ok, |
Ok im back to square one on this. rig was running find, then anotehr reboot and no devices found.
|
Please show the outputs of the non-OpenCL tests (rocminfo, hipinfo, the square example). |
for "dmesg | grep kfd":
for "rocminfo" :
for hipinfo:
for "square":
also checking kernel version:
|
Oh, yeah, I see the problem. At the moment (#510), ROCm 1.8.2 is broken on Ubuntu kernel 4.15.0-33. It looks like between upgrades your system updated its kernel and you're falling back to a non-working KFD. As mentioned in #510, we are working on solving this issue with a hotfix or point release. For now, I would recommend downgrading your kernel to 4.15.0-32. |
ok cool, selecting kernel 4.15.0-32 on startup, everything is fine now. Thankyou for the quick reply, much appreciated :-) |
Hi All,
im having some issues getting Vega 56/64 GPUs to show up in platforms
Ubuntu 16.04 with kerenl 4.13
mainboard/ CPU are all PCIE 3.0 compatible.
i can sun "/opt/rocm/bin/rocminfo " successfully and lists all the GPUs. however when running "/opt/rocm/opencl/bin/x86_64/clinfo" i get:
:~$ /opt/rocm/opencl/bin/x86_64/clinfo
terminate called after throwing an instance of 'cl::Error'
what(): clGetPlatformIDs
Aborted (core dumped)
running "/opt/rocm/bin/rocm-smi -hw" gives:
GPU DID ECC VBIOS
5 687f N/A 113-D0500100-103
3 687f N/A 113-D0500300-102
1 687f N/A 113-D0500100-104
6 687f N/A 113-D0500100-102
4 687f N/A 113-D0500350-102
2 687f N/A 113-D0500100-104
0 1902 N/A None
i can verify the installation of ROCm:
:~$ apt show rocm-libs -a
Package: rocm-libs
Version: 1.8.192
Priority: optional
Section: devel
Maintainer: Advanced Micro Devices Inc.
Installed-Size: 13.3 kB
Depends: rocfft, rocrand, hipblas, rocblas
Homepage: https://github.com/RadeonOpenCompute/ROCm
Download-Size: 772 B
APT-Sources: http://repo.radeon.com/rocm/apt/debian xenial/main amd64 Packages
Description: Radeon Open Compute (ROCm) Runtime software stack
:~$ dmesg | grep kfd
[ 1.618386] kfd kfd: Initialized module
[ 3.753602] kfd kfd: Allocated 3969056 bytes on gart
[ 3.753739] kfd kfd: added device 1002:687f
[ 5.742944] kfd kfd: Allocated 3969056 bytes on gart
[ 5.743203] kfd kfd: added device 1002:687f
[ 7.775265] kfd kfd: Allocated 3969056 bytes on gart
[ 7.775648] kfd kfd: added device 1002:687f
[ 9.754696] kfd kfd: Allocated 3969056 bytes on gart
[ 9.755192] kfd kfd: added device 1002:687f
[ 11.800216] kfd kfd: Allocated 3969056 bytes on gart
[ 11.800847] kfd kfd: added device 1002:687f
[ 13.807090] kfd kfd: Allocated 3969056 bytes on gart
[ 13.807851] kfd kfd: added device 1002:687f
any help would be much appreciated
The text was updated successfully, but these errors were encountered: