Unfortunately, it appears that AMD's implementation of OpenCL relies
upon a special X extension (ATIFGLEXTENSION) in order to access the
GPU. This is similar to the NV-CONTROL extension provided by the nVidia
drivers. TurboVNC 2.1 includes limited support for redirecting
NV-CONTROL requests from the X proxy to the 3D X server, so assuming the
spec for ATIFGLEXTENSION is open, it should be possible to provide a
similar sort of redirector for that extension. Please contact me
off-list to discuss specifics, if you are interested in pursuing that
project. Otherwise, without the ability to access the GPU, there isn't
much point to running OpenCL applications in VirtualGL (unless the
application in question also needs OpenGL.)
Apparently someone else encountered the same issue:
https://software.intel.com/en-us/forums/opencl/topic/328091
I've confirmed that adding the Intel OpenCL path to LD_LIBRARY_PATH:
vglrun -ld /opt/intel/opencl/lib64 clinfo
works around the issue. If you are running an application that links
directly with libGL (as opposed to indirectly loading libGL with
dlopen()/dlsym()), then you can also work around the issue by running:
vglrun -nodl clinfo
And, of course, if your application doesn't use OpenGL, then there is no
need to use vglrun at all.
I'd be happy to fix the segfault if I had a better understanding of
what's causing it. The poster on the Intel forum seemed to think that
VirtualGL's interposed version of dlopen() breaks rpath when it is set
to $ORIGIN, but I noticed that the rpath within Intel's OpenCL libraries
is set to
"$ORIGIN::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::".
That seems incorrect, so this may be a bug in their libraries that is,
for whatever reason, only exposed when using VirtualGL.
On 6/27/16 10:23 AM, Jeff McWilliams wrote:
>
> Can one use OpenCL when running under VirtualGL?
>
>
>
> I noticed that clinfo segfaults if I invoke it with:
>
>
>
> “vglrun clinfo”
>
>
>
> I’m using the latest VirtualGL 2.5, CentOS 6.7 64-bit, AMD FirePro
> W8000 graphics.
>
>
>
> Core was generated by `clinfo'.
>
> Program terminated with signal SIGSEGV, Segmentation fault.
>
> #0 0x00007f6e9fd77fcd in ?? () from
> /opt/intel/opencl-1.2-4.4.0.117/lib64/libintelocl.so
>
> Missing separate debuginfos, use: debuginfo-install
> VirtualGL-2.5-20160215.x86_64 glibc-2.12-1.166.el6_7.7.x86_64
> libX11-1.6.0-6.el6.x86_64 libXau-1.0.6-4.el6.x86_64
> libXext-1.3.2-2.1.el6.x86_64 libXv-1.0.9-2.1.el6.x86_64
> libgcc-4.4.7-16.el6.x86_64 libstdc++-4.4.7-16.el6.x86_64
> libxcb-1.9.1-3.el6.x86_64 mesa-libGL-10.4.3-1.el6.x86_64
> numactl-2.0.9-2.el6.x86_64 opencl-1.2-intel-cpu-4.4.0.117-1.x86_64
>
> (gdb) bt
>
> #0 0x00007f6e9fd77fcd in ?? () from
> /opt/intel/opencl-1.2-4.4.0.117/lib64/libintelocl.so
>
> #1 0x00007f6e9fcf1e81 in clGetPlatformInfo () from
> /opt/intel/opencl-1.2-4.4.0.117/lib64/libintelocl.so
>
> #2 0x000000000040e8be in int
> cl::detail::getInfoHelper<cl::detail::GetInfoFunctor0<int
> (*)(_cl_platform_id*, unsigned int, unsigned long, void*, unsigned
> long*), _cl_platform_id*> >(cl::detail::GetInfoFunctor0<int
> (*)(_cl_platform_id*, unsigned int, unsigned long, void*, unsigned
> long*), _cl_platform_id*>, unsigned int, std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> >*, long)
> [clone .isra.35] [clone .constprop.213] ()
>
> #3 0x000000000040fd57 in
> cl::detail::param_traits<cl::detail::cl_platform_info,
> 2308>::param_type cl::Platform::getInfo<2308>(int*) const ()
>
> #4 0x0000000000407fc3 in main ()
>
>
>
>
>
> If I rename /etc/OpenCL/vendors/intel64.icd I can then run “vglrun
> clinfo”, and it does not crash. I get a list indicating AMD APP is
> the provider, with one CPU device. The GPU device is not listed. If
> I run clinfo without using vglrun, the AMD APP provider lists both a
> CPU device and a GPU device.
>
>
>
>
>
>
>
> Thanks,
>
>
>
> Jeff McWilliams
>
> Software Development Manager – Altair HyperView
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
>
>
> _______________________________________________
> VirtualGL-Users mailing list
> VirtualGL-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtualgl-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users