HPS-MC
 
All Classes Namespaces Files Functions Variables Pages
Loading...
Searching...
No Matches
Slurm Class Reference

Submit Slurm batch jobs. More...

Inheritance diagram for Slurm:
BatchSystem Batch

Public Member Functions

 __init__ (self)
 
 parse_args (self, args)
 Parse command line arguments and perform setup.
 
 default_rundir (self, job_id=None)
 Override the basic implementation for getting the default run directory.
 
 build_cmd (self, job_id)
 Wrap submission of Slurm jobs using a generated script.
 
 submit_job (self, job_id)
 Submit a single batch job and return the batch ID.
 
- Public Member Functions inherited from Batch
 submit (self)
 This is the generic batch submission function which gets a list of jobs to run based on command line arguments and submits them individually.
 

Public Attributes

 env
 
 account
 
 sh_dir
 
 site
 
 job_length
 
 memory
 
 script_name
 
- Public Attributes inherited from BatchSystem
 site
 
 email
 
 queue
 
 os
 
 memory
 
 diskspace
 
 job_length
 
- Public Attributes inherited from Batch
 parser
 
 script_name
 
 script
 
 jobstore
 
 debug
 
 log_dir
 
 run_dir
 
 check_output
 
 job_ids
 
 job_steps
 
 start_job_num
 
 end_job_num
 
 config_files
 

Protected Member Functions

 _default_queue (self)
 
 _sbatch (self, job_id)
 
 _sh_filename (self, job_id)
 
 _write_job_script (self, sh_filename, job_cmd)
 Write the shell script for Slurm job submission using the 'sbatch' command.
 
- Protected Member Functions inherited from Batch
 _logfile (self, job_id)
 Get the base name of a log file for the job.
 
 _get_filtered_job_ids (self)
 Get a list of job IDs to submit based on parsed command line options and whether output files are being checked.
 
 _job_ids_missing_output (self, job_ids)
 Get a list of IDs for jobs that are missing output files.
 

Additional Inherited Members

- Static Protected Member Functions inherited from BatchSystem
 _site ()
 
- Static Protected Member Functions inherited from Batch
 _outputs_exist (job)
 Check if all output files exist for the given job.
 

Detailed Description

Submit Slurm batch jobs.

Definition at line 332 of file batch.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self)

Reimplemented from BatchSystem.

Definition at line 335 of file batch.py.

Member Function Documentation

◆ _default_queue()

_default_queue (   self)
protected

Definition at line 370 of file batch.py.

◆ _sbatch()

_sbatch (   self,
  job_id 
)
protected

Definition at line 381 of file batch.py.

◆ _sh_filename()

_sh_filename (   self,
  job_id 
)
protected

Definition at line 398 of file batch.py.

◆ _write_job_script()

_write_job_script (   self,
  sh_filename,
  job_cmd 
)
protected

Write the shell script for Slurm job submission using the 'sbatch' command.

Definition at line 428 of file batch.py.

◆ build_cmd()

build_cmd (   self,
  job_id 
)

Wrap submission of Slurm jobs using a generated script.

Reimplemented from Batch.

Definition at line 401 of file batch.py.

◆ default_rundir()

default_rundir (   self,
  job_id = None 
)

Override the basic implementation for getting the default run directory.

Reimplemented from Batch.

Definition at line 358 of file batch.py.

◆ parse_args()

parse_args (   self,
  args 
)

Parse command line arguments and perform setup.

Reimplemented from BatchSystem.

Definition at line 343 of file batch.py.

◆ submit_job()

submit_job (   self,
  job_id 
)

Submit a single batch job and return the batch ID.

This is abstract as each batch system will do this differently.

Some batch systems don't implement this but sub-classes should override this and make it a no-op so that they can be instantiated.

Reimplemented from Batch.

Definition at line 453 of file batch.py.

Member Data Documentation

◆ account

account

Definition at line 349 of file batch.py.

◆ env

env

Definition at line 348 of file batch.py.

◆ job_length

job_length

Definition at line 384 of file batch.py.

◆ memory

memory

Definition at line 385 of file batch.py.

◆ script_name

script_name

Definition at line 386 of file batch.py.

◆ sh_dir

sh_dir

Definition at line 352 of file batch.py.

◆ site

site

Definition at line 362 of file batch.py.


The documentation for this class was generated from the following file: