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

Defines the run command. More...

Public Member Functions

def __init__ (self, parent_dir, name, binaryrelpath, qualikiz_plan=None, stdout=None, stderr=None, verbose=False, nodes=1, HT=False, tasks=None, kwargs)
 Initializes the Run class. More...
 
def to_batch_string (self, batch_dir)
 Create string to include in batch job. More...
 
def from_batch_string (cls, string, batchdir)
 Reconstruct the Run from a batch string. More...
 
def from_dir (cls, dir, kwargs)
 
def launch (self)
 Launch QuaLiKizRun using mpirun. More...
 

Public Attributes

 nodes
 
 tasks
 
 stdout
 
 stderr
 

Static Public Attributes

string runstring = 'mpirun'
 
dictionary defaults
 

Detailed Description

Defines the run command.

Constructor & Destructor Documentation

◆ __init__()

def qualikiz_tools.machine_specific.bash.Run.__init__ (   self,
  parent_dir,
  name,
  binaryrelpath,
  qualikiz_plan = None,
  stdout = None,
  stderr = None,
  verbose = False,
  nodes = 1,
  HT = False,
  tasks = None,
  kwargs 
)

Initializes the Run class.

Parameters
parent_dirDirectory the run lives in
nameName of the run. Will also be the folder name
binaryrelpathPath of the binary relative to the run dir
qualikiz_planThe QuaLiKizPlan instance used to generate input
HTUse hyperthreading. [Default: True]
stdoutStandard target of redirect of STDOUT [default: terminal]
stderrStandard target of redirect of STDERR [default: terminal]
verboseVerbose output while creating the Run [default: False] **kwargs: kwargs past to superclass

Member Function Documentation

◆ from_batch_string()

def qualikiz_tools.machine_specific.bash.Run.from_batch_string (   cls,
  string,
  batchdir 
)

Reconstruct the Run from a batch string.

Reverse of to_batch_string. Used to reconstruct the run from a batch script.

Parameters
stringThe string to parse
batchdirThe directory of the containing batch script
Returns
The reconstructed Run instance

◆ from_dir()

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

◆ launch()

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

Launch QuaLiKizRun using mpirun.

Special variables self.stdout == 'STDOUT' and self.stderr == 'STDERR' will output to terminal.

◆ to_batch_string()

def qualikiz_tools.machine_specific.bash.Run.to_batch_string (   self,
  batch_dir 
)

Create string to include in batch job.

This string will be used in the batch script file that runs the jobs.

Parameters
batch_dirDirectory the batch script lives in. Needed to generate the relative paths.

Member Data Documentation

◆ defaults

dictionary qualikiz_tools.machine_specific.bash.Run.defaults
static
Initial value:
= {'cores_per_node': get_num_cores(),
'threads_per_core': 2,
'HT': False
}

◆ nodes

qualikiz_tools.machine_specific.bash.Run.nodes

◆ runstring

string qualikiz_tools.machine_specific.bash.Run.runstring = 'mpirun'
static

◆ stderr

qualikiz_tools.machine_specific.bash.Run.stderr

◆ stdout

qualikiz_tools.machine_specific.bash.Run.stdout

◆ tasks

qualikiz_tools.machine_specific.bash.Run.tasks

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