hpc_scheduler package

Submodules

hpc_scheduler.scheduler module

Scheduler

Classes and methods in Scheduler should create jobscripts for different schedulers and help submitting and checking them.

class hpc_scheduler.scheduler.Job(sys, jobname='', jobscript=None, jobid=-1, tpl=None, commands='', header_dict={}, delimiter='@', control={})[source]

Bases: object

Class to hold job information

Written by Lars Buntemeyer

Last modified: 06.02.2019

get_acct()[source]
get_log()[source]
grep_log_err()[source]
parse_control()[source]
submit(write=False)[source]
write_jobscript(header_dict=None)[source]
class hpc_scheduler.scheduler.Scheduler(sys, name='', tpl=None, logfile='', job_list=[], header_dict={})[source]

Bases: object

Class to interact with an HPC job scheduler

Written by Lars Buntemeyer

Last modified: 06.02.2019

add_job(job)[source]
create_job(jobname, jobscript, commands='', header_dict={}, write=True)[source]
get_job(jobname)[source]
get_job_list(filters=[])[source]
get_jobids()[source]

Returns a dict containing {jobname:jobid}

Returns:
jobids:
A dict containing {jobname:jobid}.

Written by Lars Buntemeyer

Last changes 06.02.2019

get_jobs_acct(filters=[])[source]

Returns a dict containing job accounting

Arguments:
filters:
List of strings to filter jobnames before accessing the scheduler database.
Returns:
jobs_acct:
A dict containing job accounting information, in the form, e.g.: {jobname:{‘State’:state,’JobID’:jobid,…}}.

Written by Lars Buntemeyer

Last changes 06.02.2019

log_jobs_acct(filters=None)[source]

Logs job accounting information.

Arguments:
filters:
A string to filter jobnames.

Written by Lars Buntemeyer

Last changes 06.02.2019

read_jobids()[source]
resubmit(states=[])[source]
submit(jobname=None)[source]
update_job_list(job)[source]
write_jobscripts()[source]

Module contents

Top-level package for scheduler.