Jump to content

Heightfields causing OpenCL issues on Farm

Recommended Posts

In H16.0.573 I created a terrain using Heightfields without caching the end result, as everything computed fairly quick. Unfortunately, that scene didn't seem to work on the farm due to an OpenCL issue, clCreateProgramWithSource() failed.

The machines on the farm do not have graphics cards, so OpenCL won't work in this environment. Therefore I debugged my scene and it seems like some Heightfield SOPs are using OpenCL. I was too lazy to inspect the individual nodes, but it was great if it was easier to see if a certain node will try using OpenCL, as this won't work on many farms.




Edited by Whatsinaname

Share this post

Link to post
Share on other sites

Can you try a heightfield convert at the end and then lock that node?

Share this post

Link to post
Share on other sites

There's supposed to be an intel opencl fallback for machines that don't have gpus. I thought it would be automatic, but try  HOUDINI_OCL_DEVICETYPE=CPU  as an environment variable on the farm machines and see if that fixes it.

Side note though, you should probably have your stuff baked to disk if it's going to the farm, unless you're simming out the erosion and such which use opencl.

Share this post

Link to post
Share on other sites
Guest tar

Take a look at jlait's answers from this thread:




CPU with GPU counts as a GPU device as far as OpenCL is concerned.

Ideally, your GPU-less servers will just automatically fall back to the Intel OpenCL CPU drivers. These should work on all i-series processors and the post-Phenom AMD processors


To repeat, you do *NOT* need a CPU with a GPU core.

One of the awesome things about OpenCL is that it has a CPU runtime that can run on the CPU without touching the GPU. This gets confusing when you do have a CPU with a GPU core, as you'll have two different OpenCL drivers available for the same chip. But in your case, it should be straightforward. If you are running Houdini 16.0, we include the Intel OpenCL CPU drivers with the install. So when a job that needs OpenCl runs on your servers, it should just fallback to the CPU. If it isn't, there is something else going wrong. (Look for a “Failed to load HFS OpenCL driver” on startup, or similar.)


Share this post

Link to post
Share on other sites
42 minutes ago, Whatsinaname said:

I presume the machines on the farms are mostly Xeons, running on Linux.

There's a driver from Intel for using OpenCL on Xeon processors. Most Linux distributions don't have this in their repositories nor is it part of the kernel at this point.


Share this post

Link to post
Share on other sites
17 minutes ago, Solitude said:

Houdini 16 comes with the Intel opencl driver now.

Is that documented somewhere? Does that include Linux and not just Windows? Asking because the evidence would seem to indicate otherwise. I'm curious is all, not flinging poo.

  • Like 1

Share this post

Link to post
Share on other sites

Yes, Houdini 16 ships with a built-in Intel OpenCL CPU driver on Linux and Windows, and should fall back to in on any machine where a GPU is not present (e.g. a render farm machine).  We have seen a few cases where library conflicts prevent it from loading, but you should see "Unable to load HFS OpenCL driver" if that's the case.

Usually you can do:

$ hgpuinfo -l
[*HFS OpenCL Platform*]   Intel(R) OpenCL
Platform Vendor           Intel(R) Corporation
Platform Version          OpenCL 1.2 LINUX
OpenCL Device             Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
OpenCL Type               CPU
Device Version            OpenCL 1.2 (Build 57)
Frequency                 2670 MHz
Compute Units             24
Device Address Bits       64
Global Memory             24102 MB
Max Allocation            6025 MB
Global Cache              256 KB
Max Constant Args         480
Max Constant Size         128 KB
Local Mem Size            32 KB
2D Image Support          16384x16384
3D Image Support          2048x2048x2048

That HFS driver should always be first, so that if you do HOUDINI_OCL_DEVICETYPE=CPU it will be the device chosen.  Also:

$ hconfig -h HOUDINI_USE_HFS_OCL
    Set to its default value of 1, this variable tells Houdini to load
    the built-in CPU OpenCL driver that is shipped in $HFS (64-bit
    Windows and Linux only). This built-in CPU device can be selected
    using the regular OpenCL device specifications, e.g.
    Houdini will also fall back to using this driver if the usual OpenCL
    device selection process fails, making it safer to submit OpenCL
    jobs to a renderfarm that has no GPUs. Set this variable to 2 to
    disable this fallback mechanism, or 0 to disable the built-in device
    On OSX this variable has no effect.


Edited by johner
  • Like 2

Share this post

Link to post
Share on other sites

This is very good to know, Thanks a lot.


It also seems like OpenCL issues are affecting Flipbooks (= Flipbook crashing) on some constellations (speaking about Xeons running Linux).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now