Launching programs¶
The launch module handles launching of simulations/analyses as sub-processes, and obtaining information about the platform(s) on which the simulations are run.
copyright: | Copyright 2006-2015 by the Sumatra team, see doc/authors.txt |
---|---|
license: | BSD 2-clause, see LICENSE for details. |
-
class
sumatra.launch.
SerialLaunchMode
(working_directory=None, options=None)¶ Enable running serial computations.
-
check_files
(executable, main_file)¶
-
generate_command
(executable, main_file, arguments)¶ Return a string containing the command to be launched.
-
get_platform_information
()¶ Return a list of PlatformInformation objects, containing information about the machine(s) and environment(s) the computations are being performed on/in.
-
name
= u'serial'¶
-
next
()¶
-
pre_run
(executable)¶ Run tasks before the simulation/analysis proper.
-
required_attributes
= (u'check_files', u'generate_command')¶
-
run
(executable, main_file, arguments, append_label=None)¶ Run a computation in a shell, with the given executable, script and arguments. If append_label is provided, it is appended to the command line. Return True if the computation finishes successfully, False otherwise.
-
-
class
sumatra.launch.
DistributedLaunchMode
(n=1, mpirun=u'mpiexec', hosts=[], options=None, pfi_path=u'/usr/local/bin/pfi.py', working_directory=None)¶ Enable running distributed computations using MPI.
The current implementation is specific to MPICH2, but this will be generalised in future releases.
-
check_files
(executable, main_file)¶
-
generate_command
(executable, main_file, arguments)¶ Return a string containing the command to be launched.
-
get_platform_information
()¶ Return a list of PlatformInformation objects, containing information about the machine(s) and environment(s) the computations are being performed on/in.
Requires the script
pfi.py
to be placed on the user’s path on each node of the machine.This is currently not useful, as I don’t think there is any guarantee that we get the same n nodes that the command is run on. Need to look more into this.
-
name
= u'distributed'¶
-
next
()¶
-
pre_run
(executable)¶ Run tasks before the simulation/analysis proper.
-
required_attributes
= (u'check_files', u'generate_command')¶
-
run
(executable, main_file, arguments, append_label=None)¶ Run a computation in a shell, with the given executable, script and arguments. If append_label is provided, it is appended to the command line. Return True if the computation finishes successfully, False otherwise.
-
-
class
sumatra.launch.
PlatformInformation
(**kwargs)¶ A simple container for information about the machine and environment the computations are being performed on/in.