QuaLiKiz-Pythontools
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
qualikiz_tools.machine_specific.bash.Batch Class Reference

Defines a batch job. More...

Public Member Functions

def __init__ (self, parent_dir, name, runlist, stdout=None, stderr=None, style='sequential', verbose=False)
 Initialize batch job. More...
 
def to_batch_file (self, path, overwrite_batch_script=False)
 Writes batch script to file. More...
 
def from_batch_file (cls, path, kwargs)
 Reconstruct batch from batch file. More...
 
def from_dir (cls, dir, args, kwargs)
 
def launch (self)
 Launch QuaLiKizBatch using a batch script with mpirun. More...
 

Public Attributes

 stdout
 
 stderr
 

Static Public Attributes

string shell = '/bin/bash'
 
 run_class = Run
 

Detailed Description

Defines a batch job.

Class Variables
shell The shell to use for batch scripts. Tested only with bash run_class class that represents the runs contained in batch

Constructor & Destructor Documentation

◆ __init__()

def qualikiz_tools.machine_specific.bash.Batch.__init__ (   self,
  parent_dir,
  name,
  runlist,
  stdout = None,
  stderr = None,
  style = 'sequential',
  verbose = False 
)

Initialize batch job.

Parameters
parent_dirDirectory the batch lives in
nameName of the batch. Will also be the folder name
runlistList of runs contained in this batch
stdoutStandard target of redirect of STDOUT [default: terminal]
stderrStandard target of redirect of STDERR [default: terminal]
styleHow to glue the different runs together. Currently only 'sequential' is used
verboseVerbose output while creating the Run [default: False] **kwargs: kwargs past to superclass
        - stdout:     File to write stdout to. By default 'stdout.batch'
        - stderr:     File to write stderr to. By default 'stderr.batch'

Member Function Documentation

◆ from_batch_file()

def qualikiz_tools.machine_specific.bash.Batch.from_batch_file (   cls,
  path,
  kwargs 
)

Reconstruct batch from batch file.

◆ from_dir()

def qualikiz_tools.machine_specific.bash.Batch.from_dir (   cls,
  dir,
  args,
  kwargs 
)

◆ launch()

def qualikiz_tools.machine_specific.bash.Batch.launch (   self)

Launch QuaLiKizBatch using a batch script with mpirun.

◆ to_batch_file()

def qualikiz_tools.machine_specific.bash.Batch.to_batch_file (   self,
  path,
  overwrite_batch_script = False 
)

Writes batch script to file.

Parameters
pathPath of the sbatch script file.

Member Data Documentation

◆ run_class

qualikiz_tools.machine_specific.bash.Batch.run_class = Run
static

◆ shell

string qualikiz_tools.machine_specific.bash.Batch.shell = '/bin/bash'
static

◆ stderr

qualikiz_tools.machine_specific.bash.Batch.stderr

◆ stdout

qualikiz_tools.machine_specific.bash.Batch.stdout

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