Package solvcon :: Module batch :: Class Batch
[hide private]
[frames] | no frames]

Class Batch

source code

object --+
         |
        Batch
Known Subclasses:

Batch system submitter.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__init__(self, case, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
build_scg_command(self) source code
 
build_mpi_runner(self) source code
 
__str__(self)
Collect all string properties.
source code
 
tofile(self, basename=None)
Write self into the file for the submitting script.
source code
 
__call__(self, runlevel=0, basename=None, postpone=False)
Make submitting script and invoke the batch system.
source code
 
nodelist(self) source code
 
create_worker(self, *args, **kw)
True implementations are in create_worker_*() and have identical spec.
source code
int
create_worker_ssh(self, node, authkey, envar=None, paths=None, profiler_data=None)
Use secure shell to create worker object.
source code
int
create_worker_mpi(self, node, authkey, envar=None, paths=None, profiler_data=None)
Use MPI to link remote worker object.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  _subcmd_ = 'qsub'
the command name for the batch submission.
  DEFAULT_OUTPUT = 'oe'
  DEFAULT_SHELL = '/bin/sh'
  BASH_HOME_SOURCE = []
the files to be sourced in user's home.
Instance Variables [hide private]
  arnname
The name of the arrangement to be run.
  case
The Case corresponding object.
  jobdir
The absolute path for job.
  jobname
The name to send to batch system.
  output
Batch output type.
  resource
Specified resources.
  shell
Shell to be used on the cluster.
  use_mpi
Indicate to use MPI as transport layer.
Properties [hide private]
  str_header
  str_resource
  str_jobname
  str_output
  str_shell
  str_path
  str_prerun
  str_postrun
  str_run

Inherited from object: __class__

Method Details [hide private]

__init__(self, case, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • rootdir (str) - Root directory for the project/code.
  • arnname (str) - The arrangement to be run.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

Collect all string properties.

Overrides: object.__str__

create_worker_ssh(self, node, authkey, envar=None, paths=None, profiler_data=None)

source code 

Use secure shell to create worker object.

Parameters:
  • node (Node) - node information.
  • authkey (str) - the authkey for the worker.
  • envar (dict) - additional environment variables to remote.
  • paths (dict) - path for remote execution.
  • profiler_data (tuple) - profiler setting for remote worker.
Returns: int
the port that the remote worker listen on.

create_worker_mpi(self, node, authkey, envar=None, paths=None, profiler_data=None)

source code 

Use MPI to link remote worker object.

Parameters:
  • node (Node) - node information.
  • authkey (str) - the authkey for the worker.
  • envar (dict) - additional environment variables to remote.
  • paths (dict) - path for remote execution.
  • profiler_data (tuple) - profiler setting for remote worker.
Returns: int
the port that the remote worker listen on.

Property Details [hide private]

str_header

Get Method:
unreachable.str_header(self)

str_resource

Get Method:
unreachable.str_resource(self)

str_jobname

Get Method:
unreachable.str_jobname(self)

str_output

Get Method:
unreachable.str_output(self)

str_shell

Get Method:
unreachable.str_shell(self)

str_path

Get Method:
unreachable.str_path(self)

str_prerun

Get Method:
unreachable.str_prerun(self)

str_postrun

Get Method:
unreachable.str_postrun(self)

str_run

Get Method:
unreachable.str_run(self)