Forum

Author Topic: GPU not detected on Linux  (Read 5750 times)

jooles

  • Newbie
  • *
  • Posts: 13
    • View Profile
GPU not detected on Linux
« on: March 21, 2017, 07:09:48 PM »
Hi,

my graphic card GPU is not anymore supported on photoscan on Linux.

Here is the message log when I try to activate OpenCL device :


2017-03-21 17:02:29 Agisoft PhotoScan Version: 1.2.6 build 2834 (64 bit)
2017-03-21 17:02:29 OpenGL Vendor: X.Org
2017-03-21 17:02:29 OpenGL Renderer: Gallium 0.4 on AMD HAWAII (DRM 2.43.0 / 4.4.0-67-generic, LLVM 3.8.0)
2017-03-21 17:02:29 OpenGL Version: 3.0 Mesa 12.0.6
2017-03-21 17:02:29 Maximum Texture Size: 16384
2017-03-21 17:02:29 Quad Buffered Stereo: not enabled
2017-03-21 17:02:29 ARB_vertex_buffer_object: supported
2017-03-21 17:02:29 ARB_texture_non_power_of_two: supported
2017-03-21 17:02:36 Can't load OpenCL library
>>>

Should I load a specific driver or is there any workaround?

regards,
Jules

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15159
    • View Profile
Re: GPU not detected on Linux
« Reply #1 on: March 21, 2017, 07:22:19 PM »
Hello Jules,

You probably need to reinstall the drivers for your GPU. According to this log it is not properly recognized neither for the OpenGL rendering, nor for OpenCL computations.

Or if you are using x-forwarding session, in some cases it may also use software emulation of the OpenGL rendering device instead of GPU of the remote computer.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jlavi

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: GPU not detected on Linux
« Reply #2 on: March 21, 2017, 09:33:39 PM »
Does "clinfo -l" find the card? Having just played a lot with these.

The chain is like this. You have a config file in /etc/OpenCL/vendors
containing the name of shared library that needs to be visible and loadable.

In my case the vendor is AMD and the config file is
  /etc/OpenCL/vendors/amdocl64.icd
and it has just the string "libamdocl64.so" 

The library must be visible for the linker. It could be in location not listed in /etc/ld.so.conf.d config files. Then linker cannot find it. This can be overruled with LD_LIBRARY_PATH but photoscan.sh set its own value and thus ignores the user defined value. Clinfo should nevertheless work.

Then the library referred must be loadable. I have custom installed things and your library locationis likely different.

$ ldd /opt/amdgpu-pro/lib64/libamdocl64.so
        linux-vdso.so.1 (0x00007ffe937bb000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6b56957000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6b56653000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6b5644f000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6b56232000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6b55e94000)
        /lib64/ld-linux-x86-64.so.2 (0x000055fe7d191000)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15159
    • View Profile
Re: GPU not detected on Linux
« Reply #3 on: March 21, 2017, 11:52:19 PM »
Hello Jules,

Maybe you find the solution in the following thread:
http://www.agisoft.com/forum/index.php?topic=6741
Best regards,
Alexey Pasumansky,
Agisoft LLC

jooles

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: GPU not detected on Linux
« Reply #4 on: March 22, 2017, 08:47:03 PM »
Great, the solution was in the thread. I had to download the AMDGPU-PRO driver (which was tricky for a while because the download was not working properly... I had to try several times).

Thanks Alexey and jlavi for your quick and efficient replies!

here is the new log to be sure it works properly now:

2017-03-22 20:30:59 Agisoft PhotoScan Professional Version: 1.3.0 build 3772 (64 bit)
2017-03-22 20:30:59 Platform: Linux
2017-03-22 20:30:59 OpenGL Vendor: ATI Technologies Inc.
2017-03-22 20:30:59 OpenGL Renderer: AMD Radeon R9 200 Series
2017-03-22 20:30:59 OpenGL Version: 4.5.13468 Compatibility Profile Context 16.60.3
2017-03-22 20:30:59 Maximum Texture Size: 16384
2017-03-22 20:30:59 Quad Buffered Stereo: not enabled
2017-03-22 20:30:59 ARB_vertex_buffer_object: supported
2017-03-22 20:30:59 ARB_texture_non_power_of_two: supported

regards,
Jules