HPS-MC
Slurm Class Reference

Submit Slurm batch jobs. More...

Inheritance diagram for Slurm:
BatchSystem Batch

Public Member Functions

def __init__ (self)
 
def parse_args (self, args)
 Parse command line arguments and perform setup. More...
 
def default_rundir (self, job_id=None)
 Override the basic implementation for getting the default run directory. More...
 
def build_cmd (self, job_id)
 Wrap submission of Slurm jobs using a generated script. More...
 
def submit_job (self, job_id)
 Submit a single batch job and return the batch ID. More...
 
- Public Member Functions inherited from Batch
def 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. More...
 

Public Attributes

 env
 
 account
 
 sh_dir
 
 site
 
- 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
 

Private Member Functions

def _default_queue (self)
 
def _sbatch (self, job_id)
 
def _sh_filename (self, job_id)
 
def _write_job_script (self, sh_filename, job_cmd)
 Write the shell script for Slurm job submission using the 'sbatch' command. More...
 

Detailed Description

Submit Slurm batch jobs.

Definition at line 332 of file batch.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Reimplemented from BatchSystem.

Definition at line 335 of file batch.py.

Member Function Documentation

◆ _default_queue()

def _default_queue (   self)
private

Definition at line 370 of file batch.py.

◆ _sbatch()

def _sbatch (   self,
  job_id 
)
private

Definition at line 381 of file batch.py.

◆ _sh_filename()

def _sh_filename (   self,
  job_id 
)
private

Definition at line 398 of file batch.py.

◆ _write_job_script()

def _write_job_script (   self,
  sh_filename,
  job_cmd 
)
private

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

Definition at line 428 of file batch.py.

◆ build_cmd()

def 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()

def 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()

def parse_args (   self,
  args 
)

Parse command line arguments and perform setup.

Reimplemented from BatchSystem.

Definition at line 343 of file batch.py.

◆ submit_job()

def 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.

◆ 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: