HPS-MC
hpsmc.batch Namespace Reference

Classes

class  Batch
 Generic batch processing interface. More...
 
class  BatchSystem
 Represents a batch processing system that requires submission like Slurm or Auger. More...
 
class  LSF
 Submit LSF batch jobs. More...
 
class  Slurm
 Submit Slurm batch jobs. More...
 
class  Auger
 Submit Auger batch jobs. More...
 
class  Swif
 Submit using the 'swif2' command at JLAB using an Auger file. More...
 
class  Local
 Run local batch jobs sequentially. More...
 
class  KillProcessQueue
 Kill processes in the multiprocessing queue if the jobs are canceled. More...
 
class  Pool
 Run a set of jobs in a local multiprocessing pool using Python's multiprocessing module. More...
 

Functions

def run_job_pool (cmd)
 Run the command in a new process whose PID is added to a global MP queue. More...
 
def is_running (proc)
 Check if a system process looks like it is still running. More...
 

Variables

 logger = logging.getLogger("hpsmc.batch")
 
 RUN_SCRIPT = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'job.py')
 
 mp_queue = multiprocessing.Queue()
 
dictionary system_dict
 
 system = sys.argv[1].lower()
 
dictionary batch = system_dict[system]()
 
 args = sys.argv[2:]
 

Function Documentation

◆ is_running()

def hpsmc.batch.is_running (   proc)

Check if a system process looks like it is still running.

Definition at line 765 of file batch.py.

◆ run_job_pool()

def hpsmc.batch.run_job_pool (   cmd)

Run the command in a new process whose PID is added to a global MP queue.

Definition at line 750 of file batch.py.

Variable Documentation

◆ args

args = sys.argv[2:]

Definition at line 890 of file batch.py.

◆ batch

dictionary batch = system_dict[system]()

Definition at line 889 of file batch.py.

◆ logger

logger = logging.getLogger("hpsmc.batch")

Definition at line 30 of file batch.py.

◆ mp_queue

mp_queue = multiprocessing.Queue()

Definition at line 747 of file batch.py.

◆ RUN_SCRIPT

RUN_SCRIPT = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'job.py')

Definition at line 32 of file batch.py.

◆ system

system = sys.argv[1].lower()

Definition at line 886 of file batch.py.

◆ system_dict

dictionary system_dict
Initial value:
1 = {
2  "lsf": LSF,
3  "slurm": Slurm,
4  "auger": Auger,
5  "local": Local,
6  "pool": Pool,
7  "swif": Swif
8  }

Definition at line 877 of file batch.py.