Where do I assign GPU for Houdini?

   25209   8   3
User Avatar
Member
17 posts
Joined: Feb. 2016
Offline
I have two different GPU cards on my computer. Checking and unchecking “Use OpenCL” when doing a sand simulation had absolutely no effect. So I thought maybe Houdini is using the wrong GPU (or is not using any GPU at all). So where do I decide which of my two different GPUs Houdini will use?

Second question: It is all about design speed for me, test out different sim settings and see the result as soon as possible. I don't care about render time now. In fact, rendering will be carries out in C4D. Is there a dedicated tutorial which will teach me how to make fast test simulations of sand, fluids, smoke etc? I have seen posts about memory being copied between the CPU and the GPU, what switches to turn on, what to turn off, but this is way to advanced for me, I am a Houdini beginner.
-Ingvar
User Avatar
Member
32 posts
Joined: Nov. 2014
Offline
Edit your “Houdini Environment Variables a.k.a. houdini.env” file, look for HOUDINI_OCL_DEVICENUMBER & HOUDINI_OCL_DEVICETYPE to assign your GPU, or alternatively use a GPU switcher app.

Attached a text file containing some descriptions for reference. Hope this was helpful.

Attachments:
Houdini Environment Variables.txt (73.6 KB)

Houdini Indie 15.5.547
NVidia GeForce GT 650M-1GB-GDDR5 OGL 4.1_OCL 1.2
MacBook Pro Retina 15.4"_OSX 10.11.6_Intel Quad i7 @ 2.3GHz x8(Auto-Overclock 3.3GHz Turbo Boost)_16GB-1600MHz DDR3L_256GB-SSD
Magic Mouse2
User Avatar
Member
17 posts
Joined: Feb. 2016
Offline
Hi and thanks, I did find the houdini.env file, but apart from the commented description in the start of the file, it is empty.
I have no idea how to do this, despite your description.
Here are my GPU data, which I get when running msinfo32 from the command line. Again - no idea what to do in order to assign a GPU.
==========
Name NVIDIA GeForce GTX 760
PNP Device ID PCI\VEN_10DE&DEV_1187&SUBSYS_27633842&REV_A1\6&54FAA6E&0&00000018
Adapter Type GeForce GTX 760, NVIDIA compatible
Adapter Description NVIDIA GeForce GTX 760
Adapter RAM (2 147 483 648) bytes
Installed Drivers nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
Driver Version 9.18.13.4752
INF File oem134.inf (Section035 section)
Color Planes Not Available
Color Table Entries 4294967296
Resolution 1600 x 1200 x 60 hertz
Bits/Pixel 32
Memory Address 0xF8000000-0xF8FFFFFF
Memory Address 0xD8000000-0xDFFFFFFF
Memory Address 0xD6000000-0xD7FFFFFF
I/O Port 0x0000EF80-0x0000EFFF
IRQ Channel IRQ 24
I/O Port 0x000003B0-0x000003BB
I/O Port 0x000003C0-0x000003DF
Memory Address 0xA0000-0xBFFFF
Driver c:\windows\system32\drivers\nvlddmkm.sys (9.18.13.4752, 9,81 MB (10 284 872 bytes), 20.02.2015 00:18)

Name NVIDIA GeForce GTX 470
PNP Device ID PCI\VEN_10DE&DEV_06CD&SUBSYS_080110B0&REV_A3\6&7B3AB70&0&00000038
Adapter Type GeForce GTX 470, NVIDIA compatible
Adapter Description NVIDIA GeForce GTX 470
Adapter RAM 1,25 GB (1 342 177 280 bytes)
Installed Drivers nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
Driver Version 9.18.13.4752
INF File oem134.inf (Section002 section)
Color Planes Not Available
Color Table Entries 4294967296
Resolution 1920 x 1200 x 59 hertz
Bits/Pixel 32
Memory Address 0xF4000000-0xF7FFFFFF
Memory Address 0xC8000000-0xD3FFFFFF
Memory Address 0xD0000000-0xD3FFFFFF
I/O Port 0x0000DF80-0x0000DFFF
IRQ Channel IRQ 30
Driver c:\windows\system32\drivers\nvlddmkm.sys (9.18.13.4752, 9,81 MB (10 284 872 bytes), 20.02.2015 00:18)
===========

-Ingvar
User Avatar
Member
32 posts
Joined: Nov. 2014
Offline
Try inserting:

HOUDINI_OCL_DEVICENUMBER = 0 {or 1 to default to your 2nd GPU}

HOUDINI_OCL_DEVICETYPE = GPU {or CPU}

Into your Houdini.env file.
Houdini Indie 15.5.547
NVidia GeForce GT 650M-1GB-GDDR5 OGL 4.1_OCL 1.2
MacBook Pro Retina 15.4"_OSX 10.11.6_Intel Quad i7 @ 2.3GHz x8(Auto-Overclock 3.3GHz Turbo Boost)_16GB-1600MHz DDR3L_256GB-SSD
Magic Mouse2
User Avatar
Member
17 posts
Joined: Feb. 2016
Offline
Thanks a lot, kwiknip!
This cleared it up.
The interesting thing, is that when setting the value to 0 (first GPU) all is fine, when setting it to 1, then I get this error:
Open CL exceptiom clCreateKernelsInProgram
I am not sure what GPU is 0 and what is 1 in this case.
So I have to use 0 then.

The time saved using OCL in a sand simulation of 100 frames is in my case about 20 seconds, which means an improvement of approx 30%.

-Ingvar

Attachments:
performance.png (24.5 KB)

User Avatar
Member
32 posts
Joined: Nov. 2014
Offline
Outstanding and inspiring :!:
Houdini Indie 15.5.547
NVidia GeForce GT 650M-1GB-GDDR5 OGL 4.1_OCL 1.2
MacBook Pro Retina 15.4"_OSX 10.11.6_Intel Quad i7 @ 2.3GHz x8(Auto-Overclock 3.3GHz Turbo Boost)_16GB-1600MHz DDR3L_256GB-SSD
Magic Mouse2
User Avatar
Member
4 posts
Joined: May 2016
Offline
This is a really cool thing to do. I just got 2 cards working in my system. I wanted to try this. I want my 1080 to be the openCL card and the 970 to be the main interface card. The 1080 is in position 0 and the 970 is in position 1. By default the the 1080 is the main card and the 970 is the openCL card. The instructions make the 1080 both of the settings. I'm looking for the coding that would let me set the 970 to the interface card.

Thank you,
User Avatar
Member
76 posts
Joined: Sept. 2011
Online
You can set it in the preferences now

Edit -> Preferences -> Miscellaneous
OpenCL Device Dropdown

Restart Houdini for it to take effect.
User Avatar
Member
1 posts
Joined: Sept. 2019
Offline
ingvarius
... when setting the value to 0 (first GPU) all is fine, when setting it to 1, then I get this error:
Open CL exceptiom clCreateKernelsInProgram
I am not sure what GPU is 0 and what is 1 in this case.
So I have to use 0 then.
...

I am getting this error when trying to change GPUs.

My 2013 Mac Pro has 2 GPUs, and in the OpenCL Device dropdown, both are listed. With the default setting, the About Houdini window (with Show Details checked) lists the GPU as expected. But when I change to the other listed GPU and restart Houdini, the About Houdini window says that there is no OpenCL device configured.

The same happens when I try setting HOUDINI_OCL_DEVICENUMBER in the .env file: When I set that to 0, it's fine, but when I set it to 1, it's not fine.

Is there anything else to try, or is this a bug?
  • Quick Links