Personal tools

4.6.4. Using Torque PBS

Up one level
The GRIA Job Service can submit jobs to Torque PBS clusters. Here's how.

Configuring Torque

This section assumes you already have a working Torque installation. If not, you can follow the installation guide in the Torque Admin Manual.

Typical Torque setup

Figure 1: Typical Torque setup

Figure 1 shows a typical Torque/GRIA setup. Torque should be installed on the machine running the GRIA Job Service, and it should be allowed to submit jobs to the machine running pbs_server. To do this, you need to add the machine's hostname to the list of allowed submit hosts with the following command:

qmgr -c 'set server submit_hosts += griaserver.your.domain'

Configuring GRIA

Setting up the Torque PBS plugin in the GRIA Job Service is simple. First click the Configure link next to TorquePBS on the main admin page. This will open up the Torque configuration page:

Configuring the TORQUE PBS plugin

Figure 2: Configuring the TORQUE PBS plugin

Enter the paths to Torque's installation directory, then press Save configuration.

Customising Job Submissions

The job description template used for jobs submitted by GRIA is quite simple:

## PBS directives
#PBS -N """JOB_NAME"""
#PBS -j oe
"""PBS_DIRECTIVES"""

(Note that """JOB_NAME""" and """PBS_DIRECTIVES""" will be replaced automatically by the Job Service when a job is submitted)

This template is located inside the webapp (TOMCAT_DIR/webapps/gria-basic-app-services/WEB-INF/rm-connectors/plugins/TorquePBSTemplate.jdf), and if you need to modify it you have two choices:

  1. Change the template file inside the webapp. The disadvantage of this is that your changes will be overwritten if you redeploy or upgrade the GRIA Job Service.
  2. Copy the plugin and template files to a location outside the webapp and then modify them. You will have to change the name of your new plugin copy so that the Job Service can distinguish it from the original. To do this open up TorquePBS.py and change
    class TorquePBS(RMConnector):
    to something like
    class TorquePBSCopy(RMConnector):
    You can leave the filename the same, or change it if you prefer. You should now enter the directory containing your new plugin in the Job Service configuration page.