opencl with wine apps

Questions about Wine on Linux
Post Reply
tmdag
Newbie
Newbie
Posts: 4
Joined: Fri Jul 06, 2018 10:10 am

opencl with wine apps

Post by tmdag » Fri Jul 06, 2018 10:37 am

Hi,

As a noob in wine and virtualization, I am trying to run one win program that uses GPU acceleration via opencl.

Using 'wine configuration/libraries/' I've added openCL and my windows application seems to recognize opencl library but it states that there is no GPU / no supported GPU device avaiable.
What are the best methods to debug this and maybe someone have some suggestions of trying to make it work?

Application I'm running: PTGui Pro
Wine 3.11 under Fedora 27
GPU
> nvidia-smi
Fri Jul 6 08:36:21 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.24 Driver Version: 396.24 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX TIT... Off | 00000000:03:00.0 On | N/A |
| 22% 48C P8 19W / 250W | 881MiB / 12212MiB | 3% Default |
+-------------------------------+----------------------+----------------------+

User avatar
Bob Wya
Level 12
Level 12
Posts: 2768
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: opencl with wine apps

Post by Bob Wya » Fri Jul 06, 2018 9:39 pm

@ tmdag

Ensure you have the 32-bit OpenCL libraries installed (should be in some Fedora nvidia sub-package).

Run:

Code: Select all

export WINEDEBUG=+opencl
Before you run the application with Wine (in a terminal) to log what is going wrong with OpenCL.

Bob

tmdag
Newbie
Newbie
Posts: 4
Joined: Fri Jul 06, 2018 10:10 am

Re: opencl with wine apps

Post by tmdag » Mon May 06, 2019 1:13 am

Thanks!

So at least I know that I am getting errors:

Code: Select all

019c:fixme:dbghelp:fetch_thread_info Couldn't open thread 691 (87)
01e4:fixme:dbghelp:fetch_thread_info Couldn't open thread 768 (87)
01e4:fixme:dbghelp:fetch_thread_info Couldn't open thread 201 (87)
01e4:fixme:dbghelp:fetch_thread_info Couldn't open thread 691 (87)
0130:fixme:ver:GetCurrentPackageId (0x34fdc0 (nil)): stub
01a8:trace:opencl:DllMain opencl.dll: 0x7fa4a3280000,0,0x1
00cc:fixme:ver:GetCurrentPackageId (0x34fdc0 (nil)): stub
0243:fixme:ver:GetCurrentPackageId (0x34fdc0 (nil)): stub
I'm currently using:
wine-4.6 (Staging)
5.0.10-200.fc29.x86_64
Driver Version: 418.39
CUDA Version: 10.1

Any ideas where to take that further ?

User avatar
Bob Wya
Level 12
Level 12
Posts: 2768
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: opencl with wine apps

Post by Bob Wya » Mon May 06, 2019 10:13 am

tmdag wrote:...
I'm currently using:
wine-4.6 (Staging)
5.0.10-200.fc29.x86_64
Driver Version: 418.39
CUDA Version: 10.1

Any ideas where to take that further ?
CUDA != OpenCL

So make sure you have the Fedora mutli-lib (32-bit + 64-bit) native Linux opencl libraries installed.
Then please re-test.

Thanks
Bob

Cybermax
Level 4
Level 4
Posts: 189
Joined: Fri Dec 01, 2017 5:26 pm

Re: opencl with wine apps

Post by Cybermax » Mon May 06, 2019 3:20 pm

tmdag wrote: I'm currently using:
wine-4.6 (Staging)
5.0.10-200.fc29.x86_64
Driver Version: 418.39
CUDA Version: 10.1

Any ideas where to take that further ?
Yeah, you need something like "ocl-icd-libopencl1" both amd64 and i386 libraries installed for nVidia.

You can install CUDA inside the wineprefix tho, but it still depends on having the correct library supported in linux.

nVidia calls their OpenCL implementation "cuda", so its not really "wrong" to have cuda..
When i type "clinfo" (from the clinfo package) i get:

Code: Select all

Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 10.1.131
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer
  Platform Extensions function suffix             NV

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     GeForce RTX 2070
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.2 CUDA
  Driver Version                                  418.52.05
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, 01:00.0
  Device Profile                                  FULL_PROFILE
https://apps.fedoraproject.org/packages/clinfo

I dont use Fedora, so cant really verify this package tho :)

User avatar
Bob Wya
Level 12
Level 12
Posts: 2768
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: opencl with wine apps

Post by Bob Wya » Mon May 06, 2019 3:57 pm

@tmdag

You'll also want to ensure you install the: Fedora Packages: wine-opencl.
If you haven't done so already...

Bob

tmdag
Newbie
Newbie
Posts: 4
Joined: Fri Jul 06, 2018 10:10 am

Re: opencl with wine apps

Post by tmdag » Fri May 10, 2019 10:30 am

yep, got that installed already

Code: Select all

wine-opencl.i686                                  4.7-1.fc29                                                 @updates                   
wine-opencl.x86_64                                4.7-1.fc29                                                 @updates

Post Reply