How to install Houdini/Hqueue on Ubuntu and an AMD GPU

   1782   2   2
User Avatar
Member
3 posts
Joined: March 2021
Online
After a few weeks of struggling, I was finally able to install Houdini and Hqueue on a dedicated Ubuntu machine, the purpose being to help offload some rendering tasks from my workstation.

I thought I knew how to use Linux, but getting this setup to work definitely put some hair in my chest. There are lots of problems that may not be trivial to resolve, and to top it off, the Houdini documentation on this is quite telegraphic, so there are some pieces of crucial information that can be misleading, or plain off omitted.

In this post, I'll describe what I did to get it working. This can hopefully help you if you want to do the same thing or something similar. The instructions might have some differences if you're using a different Linux distribution, or a different GPU manufacturer.

This post won't include basic Linux commands. There are plenty of sites online that can help you if this is your first time using Linux.

Step 1: The machine

I wanted to a machine exclusively for rendering. I could either build a physical machine, or use a VM with a cloud provider like AWS, GCP or Azure. In the end, I chose a physical machine, since my renders have multi-TB input and output data, which would kill me with storage and network charges.

Next up is the hardware/OS. I wanted a small machine, so a Mac Mini was my first choice. Unfortunately, it's not clear how compatible Houdini is with the new M1 Apple Silicon SoC. It's also not clear how compatible it is with the Intel CPUs, and to top it off, the Mac Mini is quite RAM limited, so I ended up discarding it.

The next choice was to build an x64 machine with a barebones kit. The choices for CPU/GPU are Intel and AMD. There are some kits with NVIDIA GPUs, but they were much larger and more expensive. I ended up with a DeskMini X300 kit, with an AMD Ryzen 7 PRO 4750G, 64GB RAM, and a 512 GB SSD , which should be quite good for my needs.

Finally: Windows or Linux. I went with Linux because of the price (can't beat free!), but with the option of moving to Windows if I were to find non-resolvable issues (I almost made the leap quite a few times). I chose Ubuntu, because I've worked with Ubuntu Server in the past for setting up web servers.

Step 2: Install OS

I will skip the instructions on installing Ubuntu, as there are plenty of sites dedicated to that. Something important to keep in mind is that I was using Ubuntu 20.04.2 LTS. That .2 at the end is quite important, so make sure you know what exact version of Linux you're using.

Next, remote access. I am quite used to headless machines with just SSH access, but from what I've seen so far, it's much better if you have a GUI. Some tools such as hkey (for managing your Houdini license) only run on a GUI. It might be possible to do this completely without a GUI, but the way I got it running was with a GUI.

To remote access my machine, there are many tools. I chose Chrome Remote Desktop, because it's free, quite stable, and runs across network boundaries. If you choose Chrome Remote Desktop, the default window manager (Unity) might get confused, so I suggest you also install LXDE as well.

At this point, I moved the machine to a dedicated corner, with no monitor, mouse or keyboard, and from this point on, everything was done through SSH and/or Chrome Remote Desktop.

Step 3: Install AMD drivers

This is where the fun begins. For starters, Googling "AMD Linux Drivers" might not give you results for the latest version of the drivers. It is important to notice that neither the 20.20 nor the 20.45 drivers support Ubuntu 20.04.2. When I did this, I found the 20.50 [www.amd.com] drivers, which did work, but as I'm writing this article, I found that there's also a newer version 21.10 [www.amd.com]. I don't know how to reach these pages through the official AMD site, but if you do, please write it as a comment.

Before going ahead and installing the drivers, make sure you read the documentation [amdgpu-install.readthedocs.io]. In particular, the default installation doesn't include the OpenCL drivers, which are necessary for Houdini to work. To install the drivers with the OpenCL drivers, this is the command line that I used.

$ ./amdgpu-pro-install -y --opencl=rocr,legacy

Even if the installation finished correctly, you're not done yet. You have to test OpenCL to make sure it works. To do so, use the clinfotool.

In my case, clinfowas working when I ran it as root, but it couldn't find the OpenCL device (error -1 and error -33) when I ran it as a regular user.

To fix this, the regular user has to be included in both the videoand rendergroups (not just videoas many sites suggest). In particular, it has to be able to access /dev/kfd, which in my case had renderas the group (thanks to this site [blender.stackexchange.com] for the hint).

After rebooting, clinfoshould work fine. If it does, then Houdini should be able to detect the GPU for OpenCL simulations.

Step 4: Install Houdini and Hqueue

The instructions [www.sidefx.com] pretty much cover what you have to do. There are some things that may not be obvious though.

  • The instructions might imply that you only need to install the Hqueue server and client. In fact, you do have to install the actual Houdini software in each client machine. This is a bit obvious, but the instructions only apply for the Hqueue part, and it may be confusing to think that this is all you have to do. In other words, install Houdini as well -- the Hqueue client won't work without Houdini .
  • An extension to the point above: you have to enable your Houdini license in the Hqueue client machine. You do this with the hkeytool. It might be possible to do this completely without a GUI, but I did it with the GUI tool.
  • The Hqueue server software is installed as root, but the Hqueue client and Houdini itself have to be installed as a normal user. The instructions mention this, but it is very easy to miss (I missed it the first time), and end up installing Hqueue as root. Make sure you install it as a normal user.

Step 4: Set up the server and client as daemons (optional)

Setting up the Hqueue server to start at boot is straightforward, and it works per the instructions [www.sidefx.com].

On the other hand, setting up the Hqueue client to start at boot is not as straightforward as the instructions suggest. There are two issues with the instructions:

  • Simply symlinking hqueuedto /etc/init.d/won't work. The script expects you to be in the script folder when running, but init.d will execute it from /etc/. It is possible to make some modifications to the script, or create a secondary script to fix this.
  • I haven't tried it, but I think hqueueddoesn't change the user to the specified user (I might be wrong). If this is the case, then after reboot, it will run the Hqueue client as root. It should be possible to modify the script to fix this though.

In any case, I don't plan on rebooting the machine very often, and restarting the client on reboot is not such a big deal, so I'd rather keep the standard files and not modify them, because I'm still facing other unrelated problems, and I just want to be double sure that the script modifications are not causing these problems.

Epilogue

If you have any experience running Houdini on Ubuntu that you want to share, or if you want to correct some of my points, please do leave a comment. I'm still a Houdini newbie, so I might be getting some parts wrong.

Thanks for reading, and good luck!

Footnotes

: Actually, I'm not rendering. I'm using Houdini to do several hundred of Alembic-to-Alembic simulations, each of which has several GB of input and output data.

: I don't need to do all the simulations at the same time, so 512GB is more than enough (for now).

: The Hqueue server should in theory work without a Houdini license, so it should be okay installing just the Hqueue server on a dedicated server. However, for my one-machine farm, the machine is working as both server and client.
User Avatar
Member
3 posts
Joined: Aug. 2016
Offline
Hey thanks for posting this. Not a lot of information on Hqueue installation in my experience. I'm trying to setup Hqueue currently to render in the background and I have some computers sitting around, and I'd feel like a badass. I'm using Houdini Indie, and I have 3 computers with different specs. There are no bleeding edge machines at my disposal but surely they can be of use, maybe? I have POP_OS 20.04 on two machines(I'm still rather new to Linux, but I have made it a point to use it on all of my personal computers sans my laptop because I still need to use other Mac applications) and MacOS(thinking about installing Ubuntu on it, it's 2012 MacPro) on the other. I was wondering am I limited to using only two machines or can I use all three? Also could a NAS house the shared folder for the server?
User Avatar
Member
3 posts
Joined: March 2021
Online
If you want to do offline renders/simulations, I'd suggest you consider setting them up with hqueue. This is not for everybody though, and if you're just wotking on one scene, having secondary render machines may not be very useful.

Just as an additional comment, my Houdini on Linux setup stopped working at some point for some unknown reason, so instead of redoing everything, I just bought a Windows license, and installed everything on Windows. It worked right out of the box with no additional configuration needed.

So my takeout from this whole experience, is that it just wasn't worth my time setting this all up to work on Linux. I won't consider Linux in the future, unless there are considerable improvements in the way Houdini is installed and configured on Linux.
  • Quick Links