Houdini 18.5 Nodes TOP nodes

HQueue Scheduler TOP node

Schedules work items using HQueue.

On this page
Since 17.5

This node schedules work items using HQueue in order to execute them on remote machines.

For more information on configuring HQueue, see Getting Started with HQueue or PDG For Design Work Pt. 3 - Setting Up Distributed PDG.

Cook Modes

This scheduler can operate in two different cook modes:

  • The normal cook mode connects to your HQueue scheduler and creates jobs for work items as they become ready to execute, and the jobs then communicate back to the submitting machine with status changes. This means that the submitting Houdini session must remain open for the duration of the cook.

    This mode is used whenever you select Cook from any of the menus or buttons in the TOP UI.

  • The standalone job mode cooks the entire TOP network as a standalone job. In this mode, the submitting Houdini session is detached from the cooking of the TOP network, the .hip file is copied if necessary, and a hython process executes the TOP network using the default scheduler for that topnet. You will also not see any updates to your current Houdini session. To check the progress of your job when using this mode, you will need to use the HQueue web portal.

    This mode is used whenever you click the Submit Graph As Job > Submit button in the HQueue Scheduler’s parameters.

Network Requirements

As part of the cook, a message queue (MQ) job is submitted. This job is used to communicate information from executing jobs back to the submitting machine. For this reason, your farm machines must be able to resolve the hostnames of other farm machines.

Tip

This is as simple as editing the /etc/hosts (Linux / macOS) or C:\Windows\System32\Drivers\etc\hosts (Windows).

In addition, farm machines must not have firewalls between them, or you need to use the Task Callback Port parameter to specify the open port to use.

When the cook starts, the submitting machine connects to the farm machine that is running the MQ job. So farm machines also must not have firewalls between them and the submitting machine, or you need to use the Relay Port parameter to specify the open port to use.

Warning

Windows Services cannot use mapped drives. Since HQueue jobs on Windows are executed by a Windows Service, you should only use UNC paths. For example, use //myserver/hq/project/myhip.hip instead of H:/project/myhip.hip. Also be careful with backslashes in paths, as they are interpreted as escape sequences when evaluated by Houdini or the command shell.

TOP Attributes

hqueue_jobid

integer

When the scheduler submits a work item to HQueue, it adds this attribute to the work item in order to track the HQueue job ID.

Parameters

Scheduler

These are the global parameters for all work items using this scheduler.

Submit Graph As Job

Submit

Cooks the entire TOP network as a standalone job. Displays the status URI for the submitted job. The submitting Houdini session is detached from the cooking of the TOP network. The .hip file is copied if necessary and a hython process executes the TOP network normally using the default scheduler for that topnet.

Tip

You can restart a finished standalone jobs using the HQueue Web UI. However, you should restart the child job named TOP Cook instead of the parent job.

Job Name

Specifies the name of the submitted job.

Data Layer Server

Enable Server

When on, turns on the data layer server for the TOP job that cooks on the farm. This allows PilotPDG or other WebSocket clients to connect to the cooking job remotely to view the state of PDG.

Server Port

Determines which server port to use for the data layer server.

This parameter is only available when Enable Server is on.

Automatic

A free TCP port selected by the node.

Custom

A custom TCP port specified by the user.

This is useful when there is a firewall between the farm machine and the monitoring machine.

Auto Connect

When on, the node will try to send a command to create a remote visualizer when the job starts. If successful, a remote graph is created and it automatically connects to the server executing the job.

The client submitting the job must be visible to the server running the job or the connection will fail.

This parameter is only available when Enable Server is on.

HQueue Server

URL of the HQueue server. For example, http://localhost:5000.

Job Name

The name of the top-level HQueue Job for submitted cooks.

Job Description

The description of the top-level HQueue job. This can be seen in the Job Properties for the job.

Paths

Working Directory

Specifies the directory where the cook generates intermediate files and output. The intermediate files are placed in a subdirectory named pdgtemp.

If you are opening your .hip file in Houdini from the shared network path (for example, from H:/myproj/myhip.hip), you can use $HIP here (the default). However, if you are opening your .hip file from a local directory (for example, from C:/temp/myhip.hip), you have to copy it to a shared network before it can be accessed by farm machines. In this case, the Working Directory should be an absolute or relative path to that shared network location (for example, //MYPC/Shared/myproj).

Path Mapping

Path Mapping

Global

If the PDG Path Map exists, then it is applied to file paths.

None

Delocalizes paths using the PDG_DIR token.

Path Map Zone

When on, specifies a custom mapping zone to apply to all jobs executed by this scheduler. Otherwise, the local platform is POSIX or WIN.

Load Path Map

Opens the PDG Path Map Panel and populates it with path mappings based on the configuration of your HQueue Server for the default zones of POSIX and WIN. If you are running on macOS it will use the HQueue Mac settings as POSIX instead of Linux.

Override Local Shared Root

When on, the location of the local shared root directory is overridden by the Local Shared Root Paths parameters.

Local Shared Root Paths

The HQueue farm should be configured with a shared network filesystem and the mount point of this shared file system is specified for each platform.

These parameters are only available when Override Local Shared Root is on.

Load from HQueue

Queries the HQueue server to retrieve the local shared root paths for each platform and fills the parameters below.

Windows

The local shared root path on Windows machines. For example, I:/.

macOS

The local shared root path on macOS machines. For example, /Volumes/hq.

Linux

The local shared root path on Linux machines. For example, /mnt/hq.

Executable Paths

Universal HFS

When on, a single path to the $HFS directory (the Houdini install directory) is used by all platforms. You can use $HQROOT and $HQCLIENTARCH to help specify the directory path.

Linux HFS Path

$HFS path for Linux.

This parameter is only available when Universal HFS is off.

macOS HFS Path

$HFS path for macOS.

Windows HFS Path

$HFS path for Windows.

This parameter is only available when Universal HFS is off.

Python

Determines which Python interpreter is used for your Python jobs. You can also specify this Python in a command using the PDG_PYTHON token.

From HFS

Use the Python interpreter that is installed with Houdini.

From HQClient

Use the same Python interpreter that HQClient is using on the farm machine.

Custom

Use the executable path specified by the Python Executable parameter.

Python Executable

This parameter is only available when Python is set to Custom.

The full path to the Python executable to use for your Python jobs.

Message Queue

Create Queue

Determines whether or not Message Queue jobs are created for interactive cooks.

The Message Queue is useful when the submitting Houdini session is not reachable by farm machines due to networking restrictions or firewalls.

Automatically

The Message Queue is created for interactive cooks.

Jobs on the farm communicate their status changes to the Message Queue, which in turn is connected to the submitting Houdini session.

Never

The Message Queue is not created for interactive cooks.

Jobs on the farm communicate their status changes directly back to the submitting Houdini session.

Task Callback Port

Sets the TCP Port used by the Message Queue Server for the XMLRPC callback API. This port must be accessible between farm clients.

Relay Port

Sets the TCP Port used by the Message Queue Server connection between PDG and the client that is running the Message Queue Command. This port must be reachable on farm clients by the PDG/user machine.

Advanced

Verbose Logging

Turn on printing output to console. Can be useful for debugging problems.

Submission Timing

Tick Period

Sets the minimum time (in seconds) between calls to the onTick callback.

Max Items Per Tick

Sets the maximum number of ready item onSchedule callbacks between ticks.

Job Parms

These job-specific parameters affect all submitted jobs, but can be overridden on a node-by-node basis. For more information, see Scheduler Job Parms / Properties.

Note

Many of these parameters correspond directly to the HQueue Job Properties.

Scheduling

Job Priority

The job’s HQueue priority.

Jobs with higher priorities are scheduled and processed before jobs with lower priorities. 0 is the lowest priority.

Assign To

Which clients to assign priority to.

Any Client

Assign to any client.

Listed Clients

Assign to specified clients.

Clients from Listed Groups

Assign to specified client groups.

Clients

Names of clients to assign jobs to separated by spaces.

This parameter is only available when Assign To is set to Listed Clients.

Select Clients

Selects clients from HQueue to populate the Clients list.

This parameter is only available when Assign To is set to Listed Clients.

Client Groups

Names of client groups to assign jobs to separated by spaces.

This parameter is only available when Assign To is set to Clients from Listed Groups.

Select Groups

Selects client groups from HQueue to populate the Client Groups list.

This parameter is only available when Assign To is set to Clients from Listed Groups.

CPUs per Job

The maximum number of CPUs that will be consumed by the job. If the number exceeds a client machine’s number of free CPUs, then the client machine will not be assigned the job.

Note that you can control the multi-threading of some jobs with Houdini Max Threads. You can also use the Tags parm to control if this job needs a dedicated machine.

Job Description

Description property for the job.

Tags

Space-separated Job Tags, which can be used to indicate if this job requires a dedicated machine.

Allowed Host

The host name of the machine that the job should execute on.

Resources

A space-separated list of HQueue Resources that the job consumes. For example, sidefx.license.render sidefx.license.engine.

Maximum Run Time

The maximum amount of time (in seconds) that the work item is permitted to run for. If it’s running time exceeds the maximum time then it is automatically canceled by HQueue.

Non-Zero Exit Code Handling

Handle By

Customize what to do when the command fails (Returns a non-zero exit code).

Reporting Error

The work item fails.

Reporting Warning

The work item succeeds and a warning is added to the node.

Retrying Task

The work item is retried by HQueue for the number of Retries remaining.

Ignoring Exit Code

The work item succeeds.

Handle All Non Zero

When off, you can specify a particular exit code.

Exit Code

Specifies the exit code that you want to handle using Handle By. All other non-zero exit codes will be treated as a failure as normal.

This parameter is only available when Handle All Non Zero is off.

Retries

Number of times to retry the job when the command fails.

This parameter is only available when Handle By is set to Retrying Task.

Task Environment

Houdini Max Threads

When on, sets the HOUDINI_MAXTHREADS environment to the specified value.

If CPUs per Job is on, then Houdini Max Threads is set to its value. If CPUs per Job is off, then Houdini Max Threads is set to 0 by default, which means that the job will use all available processors.

Positive values limit the number of threads that can be used. For example, a value of 1 disables multi-threading entirely by limiting the job to one thread. Positive values are also clamped to the number of available CPU cores.

If the value is negative, the value is added to the maximum number of processors to determine the threading limit for the job. For example, a value of -1 uses all CPU cores except 1.

See limiting resource usage.

Inherit Local Environment

When on, the environment variables in the current Houdini session are copied into the job’s environment.

Environment Variables

Adds custom key-value environment variables to each task.

See also

TOP nodes