Multiple OpenCL devices - how to select

   11787   7   2
User Avatar
Member
96 posts
Joined: May 2008
Offline
Hi guys,

so, afaik, Houdini is only using a single OpenCL device at the moment. The problem is, I have two (a 680 and a Titan) in my workstation, and for obvious reasons I'd like to make sure that the Titan is being used for computations. However, I have yet to find a setting anywhere where I can choose the device - is there one?

Michael
User Avatar
Member
1390 posts
Joined: July 2005
Offline
There is a family of environmental variables controlling OpenCL related behavior, from which HOUDINI_OCL_DEVICENUMBER might be the one you are interested in.

There is also *_DEVICETYPE, *_VENDOR among others.
User Avatar
Member
96 posts
Joined: May 2008
Offline
Awesome, thanks, I'll give that a try on Monday

Cheers
Michael
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
You can also do this in the nvidia drivers. just select the right card for opencl
Help>About Houdini and the show details, scroll down until you see opencl, there you can check if it worked
User Avatar
Staff
5185 posts
Joined: July 2005
Offline
Also, if you have a Telsa+Quadro combination, Nvidia's Maximus feature will kick in and automatically route compute and graphics traffic to the right card. This doesn't work with GEForce cards, though.
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Has anyone got the HOUDINI_OCL_DEVICENUMBER variable working?

There is an AMD card and Nvidia in the machine/Windows7. The Nvidia is device 0 and the Amd is device 1. When I try to switch to the AMD there is an error -33. I'm using 'set HOUDINI_OCL_DEVICENUMBER=1" to try to use the AMD card

The only way I have got OpenCL onto the AMD is to rip the Nvidia card out of the machine. It then works perfectly

Houdini 12.5.517, Windows 7 64bit
User Avatar
Staff
818 posts
Joined: July 2006
Offline
MartybNz
Has anyone got the HOUDINI_OCL_DEVICENUMBER variable working?

There is an AMD card and Nvidia in the machine/Windows7. The Nvidia is device 0 and the Amd is device 1. When I try to switch to the AMD there is an error -33. I'm using 'set HOUDINI_OCL_DEVICENUMBER=1" to try to use the AMD card

The only way I have got OpenCL onto the AMD is to rip the Nvidia card out of the machine. It then works perfectly

You probably also need to set HOUDINI_OCL_VENDOR when they're both in the machine, as it's picking up the Nvidia one. When it's working without NVIDIA, find the exact vendor string as reported in Houdini About…, then set the environment variable to that. I believe it's:
Advanced Micro Devices, Inc.
with all the spaces and such.

The device number is per vendor, so you probably don't need to set the DEVICENUMBER once the VENDOR string is working.

The OCL environment variables are the following:

$ hconfig -a | grep OCL
HOUDINI_OCL_DEVICENUMBER := 0
HOUDINI_OCL_DEVICETYPE := ‘GPU’
HOUDINI_OCL_MEMORY_POOL_SIZE := 0.125
HOUDINI_OCL_PATH := ‘<not defined>’
HOUDINI_OCL_REPORT_MEMORY_USE := 0
HOUDINI_OCL_VENDOR := ‘<not defined>’

And you can get help for each one with:

$ hconfig -h HOUDINI_OCL_VENDOR
HOUDINI_OCL_VENDOR
Specifies the platform vendor to choose when creating the OpenCL
context Houdini uses for OpenCL processing.
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Thanks johner - that works perfectly.
  • Quick Links