Skip to content

pbs_python

Interface module to TORQUE (PBS).

Authors:

  • Stijn De Weirdt (Ghent University)
  • Toon Willems (Ghent University)
  • Kenneth Hoste (Ghent University)

PbsJob

Bases: object

Interaction with TORQUE

__init__(server, script, name, env_vars=None, hours=None, cores=None, conn=None, ppn=None)

create a new Job to be submitted to PBS env_vars is a dictionary with key-value pairs of environment variables that should be passed on to the job hours and cores should be integer values. hours can be 1 - (max walltime), cores depends on which cluster it is being run.

__str__()

Return the job ID as a string.

add_dependencies(jobs)

Add dependencies to this job.

Argument jobs is a sequence of PbsJob objects.

has_holds()

Return whether this job has holds or not.

info(types=None)

Return jobinfo

release_hold(hold_type=None)

Release hold on job of specified type.

remove()

Remove the job with id jobid

set_hold(hold_type=None)

Set hold on job of specified type.

state()

Return the state of the job State can be 'not submitted', 'running', 'queued' or 'finished',

PbsPython

Bases: JobBackend

Manage PBS server communication and create PbsJob objects.

__init__(*args, **kwargs)

Constructor.

complete()

Complete a bulk job submission.

Release all user holds on submitted jobs, and disconnect from server.

connect_to_server()

Connect to PBS server, set and return connection.

disconnect_from_server()

Disconnect current connection.

init()

Initialise the job backend.

Connect to the PBS server & reset list of submitted jobs.

make_job(script, name, env_vars=None, hours=None, cores=None)

Create and return a PbsJob object with the given parameters.

queue(job, dependencies=frozenset())

Add a job to the queue.

PARAMETER DESCRIPTION
dependencies

jobs on which this job depends.

DEFAULT: frozenset()