Determine which GPU runs OPENCL support

   7801   18   0
User Avatar
Member
184 posts
Joined: March 2015
Offline
Hi,

does anyone know a way to determine which of the build in GPUS runs opencl? I want the card that isn' plugged to a monitor to work on that. Any way?
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Just set the env variable HOUDINI_OCL_DEVICENUMBER to 0,1,2 etc.
User Avatar
Member
184 posts
Joined: March 2015
Offline
Cool, where do I have to put this line? In the houdini.env file?

Tried to paste “HOUDINI_OCL_DEVICENUMBER=0” (or with a 1) but didn't change the device.
Edited by Rosko Ron - June 8, 2017 04:31:05
User Avatar
Member
4189 posts
Joined: June 2012
Offline
You may have to set the vendor too if you have disparate gpu cards.

HOUDINI_OCL_VENDOR
Specifies the platform vendor to choose when creating the OpenCL
context Houdini uses for OpenCL processing.
User Avatar
Member
184 posts
Joined: March 2015
Offline
So I have to copy “HOUDINI_OCL_VENDOR” somewhere in the env file or how do I set the “vendor”? And after that just the opencl devide code line?
Edited by Rosko Ron - June 20, 2017 15:13:34
User Avatar
Member
4189 posts
Joined: June 2012
Offline
well which gpus do you have?
User Avatar
Member
184 posts
Joined: March 2015
Offline
A titan x Hydro copper (Maxwell) and a gtx 1080 Ti (driving the display). Since the titan has effectively more available memory (by nature and by not having to drive a display) I want her to run opencl.
User Avatar
Member
4189 posts
Joined: June 2012
Offline
so they are both Nvidia devices, then the Vendor isn't needed to be set.
If you type ‘hgpuinfo -c’ in the Houdini shell what appears?
User Avatar
Member
184 posts
Joined: March 2015
Offline
Well, this:

Attachments:
cl.png (38.8 KB)

User Avatar
Member
4189 posts
Joined: June 2012
Offline
then do:

export HOUDINI_OCL_DEVICENUMBER=1 ; hgpuinfo -c

and screenshot it.
User Avatar
Member
184 posts
Joined: March 2015
Offline
Still not changing device
Edited by Rosko Ron - July 5, 2017 06:29:02

Attachments:
cl.png (14.9 KB)
env.png (15.4 KB)

User Avatar
Member
4189 posts
Joined: June 2012
Offline
hmmm - ‘export’ is for shells not the env file. Remove the ‘export’ bit
User Avatar
Member
184 posts
Joined: March 2015
Offline
Well, I had it without “export” beforre you told it to me. I also tried to paste it in the shell, put different numbers in the line etc.
User Avatar
Member
28 posts
Joined: March 2014
Offline
The command “export” does not exist in Windows “shell”. Use the command “set”. However, this will only last as long as the command window is open. In order to make a Windows environment variable permanent, you need to set using the control panel or Settings. In Windows 10 run Settings, then search for “environment variables”, this opens “System Properties” dialog which has an “Environment Variables” button, which opens yet another dialog where you can edit environment variables.

Now, I have no idea if this the correct method to fix your problem, but I just thought I would stick this in to help folks that need to set Windows environment variables.
User Avatar
Member
184 posts
Joined: March 2015
Offline
Ah, the set function actually worked. If I get this to work permanently: great!

So in the system variables I just have to paste “HOUDINI_OCL_DEVICENUMBER=1”, right?
User Avatar
Member
184 posts
Joined: March 2015
Offline
Well…no….the “hgpuinfo -c” tells me that the titan is used for opencl but the performance monitoring during a sim tells me that the 1080 is still used.
User Avatar
Member
184 posts
Joined: March 2015
Offline
Also its not accepting the variable in the windows properties. Did anyone ever get this to work correctly?
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Yes, multi-cpu setups are normally quite easy to setup and use, just not sure you are doing the normal things to test it, such as removing the 1080 card, swapping pcie slots et al.

If the environmental variable isn't working properly then its a bug and should be sent into SideFx. Much quicker than the piecemeal method being done here.
User Avatar
Member
184 posts
Joined: March 2015
Offline
Talked to the support.

The only thing that works is to extend the code a bit:

HOUDINI_OCL_DEVICETYPE = “GPU”
HOUDINI_OCL_VENDOR = “NVIDIA Corporation”
HOUDINI_OCL_DEVICENUMBER = 1


Now it works
  • Quick Links