Bug#763655: boinc-amd-opencl: wrong dependencies regarding OpenCL
Vincent Danjean
vdanjean.ml at free.fr
Thu Oct 2 11:24:08 UTC 2014
On 02/10/2014 10:18, Gianfranco Costamagna wrote:
> Hi Vincent and Andrei (thanks for your help in making BTS notify us the bug).
>
> The graphic stuff is something that worries me a lot, unfortunately the delta
> between debian/ubuntu, and the lack of a proper dev package to link against
> is something that makes me having *many* difficulties in fixing the problem.
> (honestly my focus now is for the upcoming freeze, and I almost gave up on
> this because of the lack of time to look and ask for proper help)
>
> Unfortunately the shlibs stuff I don't think can work, since upstream doesn't
> link the gpu libraries, but uses dlopen to handle them.
Argh :-(
> grep dlopen client -R
> ./gpu_nvidia.cpp: handle = dlopen("libnvidia-ml.so", RTLD_NOW);
> ./gpu_nvidia.cpp: cudalib = dlopen("libcuda.so", RTLD_NOW);
These two are NVidia specific. So, you should probably add nvidia packages
explicitely to your Depends.
> ./gpu_amd.cpp: callib = dlopen("libaticalrt.so", RTLD_NOW);
Same but for AMD.
> ./gpu_opencl.cpp: opencl_lib = dlopen("libOpenCL.so", RTLD_NOW);
Here, the program request one implementation of OpenCL. We can expect
that the program conforms itself to the OpenCL standard, so any
implementation should work.
As this is a usual situation in OpenCL world, we (in Debian) have
been developing a set of virtual packages do deal with this (and
avoid a hard-coded list of alternative implementations).
For this part, you should depend on libopencl1 and, depending on
the used OpenCL functions, libopencl-1.1-1, libopencl-1.2-1 or
libopencl-2.0-1. Looking quickly at the sources, they seem ok to
use NVidia OpenCL. So libopencl-1.1-1 should be enough (NVidia
does not implement 1.2 and 2.0).
It seems that they use dlopen so that they have only one client
that can be use on any system, whatever is installed between CUDA,
catalyst and/or OpenCL.
Another question is : do you want to use alternative depends and/or
various independent Recommends ?
Is I correctly read the code, the client can work either
- with AMD software (libfglrx-virtual provided by libfglrx and libfglrx-legacy)
and/or
- with NVidia cuda (libcuda1 + libnvidia-ml1 for card detection)
and/or
- with OpenCL 1.1 (libopencl-1.1-1) with ICD (opencl-icd) from
AMD (amd-opencl-icd or amd-opencl-icd-legacy),
NVidia (nvidia-opencl-icd)
Intel (not yet packaged)
and perhaps any other implementation (not sure)
The fact is that there is no good default: it really depends on the
hardware you have and it would be a pitty to *force* to install
all packages.
One proposal (for Debian) :
Depends: libopencl-1.1-1 | libfglrx-virtual | libcuda1
=> you can reorder depending on what you want to be "installed
by default", but, as said before, it depends on your hardware
Recommends: libopencl-1.1-1, opencl-icd, libfglrx-virtual, libcuda1, libnvidia-ml1
By default, most things are installed. But an admin can avoid to install it
if he knows the hardware is not here.
What do you think ?
Regards,
Vincent
> so this is why we added the libraries manually in the control file.
>
> This dlopen stuff I think is also preventing gpu to be found when the service starts before the graphic module, leading to a needs of a service reboot to correctly find the gpu stuff. (cfr lp: #933354 #1177433 #1077316)
>
> I'm open to help, I don't really know how to properly handle the dlopen stuff
>
> on debian:
>
> apt-file search libnvidia-ml.so
> libnvidia-ml1: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so
> libnvidia-ml1: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1
> libnvidia-ml1: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.340.32
> pcp-testsuite: /var/lib/pcp/testsuite/src/libnvidia-ml.so
>
> apt-file search libcuda.so
> libcuda1: /usr/lib/x86_64-linux-gnu/libcuda.so
> libcuda1: /usr/lib/x86_64-linux-gnu/libcuda.so.1
> libcuda1: /usr/lib/x86_64-linux-gnu/libcuda.so.340.32
>
> apt-file search libaticalrt.so
> libfglrx: /usr/lib/x86_64-linux-gnu/libaticalrt.so
> libfglrx-legacy: /usr/lib/x86_64-linux-gnu/libaticalrt.so
>
> apt-file search libOpenCL.so
> amd-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> amd-opencl-dev: /usr/lib/x86_64-linux-gnu/libOpenCL.so
> nvidia-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> nvidia-opencl-dev: /usr/lib/x86_64-linux-gnu/libOpenCL.so
> ocl-icd-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> ocl-icd-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> ocl-icd-libopencl1: /usr/share/man/man7/libOpenCL.so.7.gz
> ocl-icd-opencl-dev: /usr/lib/x86_64-linux-gnu/libOpenCL.so
>
> on ubuntu:
> apt-file search libnvidia-ml.so
> nvidia-304: /usr/lib/nvidia-304/libnvidia-ml.so
> nvidia-304: /usr/lib/nvidia-304/libnvidia-ml.so.1
> nvidia-304: /usr/lib/nvidia-304/libnvidia-ml.so.304.117
> nvidia-304: /usr/lib32/nvidia-304/libnvidia-ml.so
> nvidia-304: /usr/lib32/nvidia-304/libnvidia-ml.so.1
> nvidia-304: /usr/lib32/nvidia-304/libnvidia-ml.so.304.117
> nvidia-304-updates: /usr/lib/nvidia-304-updates/libnvidia-ml.so
> nvidia-304-updates: /usr/lib/nvidia-304-updates/libnvidia-ml.so.1
> nvidia-304-updates: /usr/lib/nvidia-304-updates/libnvidia-ml.so.304.117
> nvidia-304-updates: /usr/lib32/nvidia-304-updates/libnvidia-ml.so
> nvidia-304-updates: /usr/lib32/nvidia-304-updates/libnvidia-ml.so.1
> nvidia-304-updates: /usr/lib32/nvidia-304-updates/libnvidia-ml.so.304.117
> nvidia-331: /usr/lib/nvidia-331/libnvidia-ml.so
> nvidia-331: /usr/lib/nvidia-331/libnvidia-ml.so.1
> nvidia-331: /usr/lib/nvidia-331/libnvidia-ml.so.331.38
> nvidia-331: /usr/lib32/nvidia-331/libnvidia-ml.so
> nvidia-331: /usr/lib32/nvidia-331/libnvidia-ml.so.1
> nvidia-331: /usr/lib32/nvidia-331/libnvidia-ml.so.331.38
> nvidia-331-updates: /usr/lib/nvidia-331-updates/libnvidia-ml.so
> nvidia-331-updates: /usr/lib/nvidia-331-updates/libnvidia-ml.so.1
> nvidia-331-updates: /usr/lib/nvidia-331-updates/libnvidia-ml.so.331.38
> nvidia-331-updates: /usr/lib32/nvidia-331-updates/libnvidia-ml.so
> nvidia-331-updates: /usr/lib32/nvidia-331-updates/libnvidia-ml.so.1
> nvidia-331-updates: /usr/lib32/nvidia-331-updates/libnvidia-ml.so.331.38
>
> apt-file search libcuda.so
> libcuda1-304: /usr/lib/i386-linux-gnu/libcuda.so
> libcuda1-304: /usr/lib/i386-linux-gnu/libcuda.so.1
> libcuda1-304: /usr/lib/i386-linux-gnu/libcuda.so.304.117
> libcuda1-304: /usr/lib/x86_64-linux-gnu/libcuda.so
> libcuda1-304: /usr/lib/x86_64-linux-gnu/libcuda.so.1
> libcuda1-304: /usr/lib/x86_64-linux-gnu/libcuda.so.304.117
> libcuda1-304-updates: /usr/lib/i386-linux-gnu/libcuda.so
> libcuda1-304-updates: /usr/lib/i386-linux-gnu/libcuda.so.1
> libcuda1-304-updates: /usr/lib/i386-linux-gnu/libcuda.so.304.117
> libcuda1-304-updates: /usr/lib/x86_64-linux-gnu/libcuda.so
> libcuda1-304-updates: /usr/lib/x86_64-linux-gnu/libcuda.so.1
> libcuda1-304-updates: /usr/lib/x86_64-linux-gnu/libcuda.so.304.117
> libcuda1-331: /usr/lib/i386-linux-gnu/libcuda.so
> libcuda1-331: /usr/lib/i386-linux-gnu/libcuda.so.1
> libcuda1-331: /usr/lib/i386-linux-gnu/libcuda.so.331.38
> libcuda1-331: /usr/lib/x86_64-linux-gnu/libcuda.so
> libcuda1-331: /usr/lib/x86_64-linux-gnu/libcuda.so.1
> libcuda1-331: /usr/lib/x86_64-linux-gnu/libcuda.so.331.38
> libcuda1-331-updates: /usr/lib/i386-linux-gnu/libcuda.so
> libcuda1-331-updates: /usr/lib/i386-linux-gnu/libcuda.so.1
> libcuda1-331-updates: /usr/lib/i386-linux-gnu/libcuda.so.331.38
> libcuda1-331-updates: /usr/lib/x86_64-linux-gnu/libcuda.so
> libcuda1-331-updates: /usr/lib/x86_64-linux-gnu/libcuda.so.1
> libcuda1-331-updates: /usr/lib/x86_64-linux-gnu/libcuda.so.331.38
>
> apt-file search libaticalrt.so
> fglrx: /usr/lib/fglrx/libaticalrt.so
> fglrx: /usr/lib/pxpress/lib/libaticalrt.so
> fglrx: /usr/lib32/fglrx/libaticalrt.so
> fglrx: /usr/lib32/pxpress/lib/libaticalrt.so
> fglrx-updates: /usr/lib/fglrx/libaticalrt.so
> fglrx-updates: /usr/lib/pxpress/lib/libaticalrt.so
> fglrx-updates: /usr/lib32/fglrx/libaticalrt.so
> fglrx-updates: /usr/lib32/pxpress/lib/libaticalrt.so
>
> apt-file search libOpenCL.so
> fglrx: /usr/lib/fglrx/libOpenCL.so
> fglrx: /usr/lib/fglrx/libOpenCL.so.1
> fglrx: /usr/lib/pxpress/lib/libOpenCL.so
> fglrx: /usr/lib/pxpress/lib/libOpenCL.so.1
> fglrx: /usr/lib32/fglrx/libOpenCL.so.1
> fglrx: /usr/lib32/pxpress/lib/libOpenCL.so.1
> fglrx-updates: /usr/lib/fglrx/libOpenCL.so
> fglrx-updates: /usr/lib/fglrx/libOpenCL.so.1
> fglrx-updates: /usr/lib/pxpress/lib/libOpenCL.so
> fglrx-updates: /usr/lib/pxpress/lib/libOpenCL.so.1
> fglrx-updates: /usr/lib32/fglrx/libOpenCL.so.1
> fglrx-updates: /usr/lib32/pxpress/lib/libOpenCL.so.1
> nvidia-libopencl1-304: /usr/lib/i386-linux-gnu/libOpenCL.so
> nvidia-libopencl1-304: /usr/lib/i386-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-304: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-304: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-304: /usr/lib/x86_64-linux-gnu/libOpenCL.so
> nvidia-libopencl1-304: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-304: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-304: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-304-updates: /usr/lib/i386-linux-gnu/libOpenCL.so
> nvidia-libopencl1-304-updates: /usr/lib/i386-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-304-updates: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-304-updates: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-304-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so
> nvidia-libopencl1-304-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-304-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-304-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-331: /usr/lib/i386-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-331: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-331: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-331: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-331: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-331: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-331-updates: /usr/lib/i386-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-331-updates: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-331-updates: /usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0
> nvidia-libopencl1-331-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> nvidia-libopencl1-331-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0
> nvidia-libopencl1-331-updates: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> nvidia-opencl-dev: /usr/lib/x86_64-linux-gnu/libOpenCL.so
> ocl-icd-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so
> ocl-icd-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
> ocl-icd-libopencl1: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
> ocl-icd-libopencl1: /usr/share/man/man7/libOpenCL.so.7.gz
>
>
> Do you have any advice for me?
> the whole boinc community will benefit a lot from this bug fix, since GPUs are more powerful on computation even than CPUs :)
>
>
> have many thanks for the help,
>
>
> Gianfranco
>
--
Vincent Danjean GPG key ID 0xD17897FA vdanjean at debian.org
GPG key fingerprint: 621E 3509 654D D77C 43F5 CA4A F6AE F2AF D178 97FA
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo: deb http://people.debian.org/~vdanjean/debian unstable main
More information about the pkg-boinc-devel
mailing list