launch(script,
args=None,
input_files=None,
force_input_files=None,
output_files=None,
req_output_files=None,
structure_output_file=None,
structure_monitor_file=None,
log_files=None,
envs=None,
licenses=None,
print_jobid=True,
appendlogs=False,
nolaunch=None,
**kwargs)
|
|
Launch a job directly, without creating an explicit Launcher instance.
This function supports same arguments as the Launcher class constructor,
as well as those listed below. These additional arguments are all
optional.
NOTE: Launcher is designed for use within startup scripts only.
- Parameters:
args - A list of string arguments to pass to the backend program.
(default: None)
input_files - A list of input files that are required for the job to run. These
will be copied to the job directory unless they're already
accessible with the given pathnames. (default: None)
force_input_files - A list of input files that should be transfered to the job
directory, regardless of whether they're already accessible or
not. (default: None)
output_files - A list of output files to register with job control. These files
will be copied back to the launch directory after the backend
completes. Missing files are silently ignored. (default: None)
req_output_files - A list of output files to register with job control. These files
will be copied back to the launch directory after the backend
completes. Missing files mark the job as "died".
(default: None)
structure_output_file - The name of the structure output file. If this job's results are
supposed to be incorporated into a Maestro project, then this is
the file that will be incorporated. (default: None)
structure_monitor_file - The name of the structure monitor file. If this job is monitored
from Maestro, then this file will be used to get the structure to
display. (default: None)
log_files - A list of log files to register with job control. These files
will be copied back to the launch directory continually while the
job is running. (default: None)
envs - A list of environment variable settings to be made on the compute
node. Each setting should be a string, in the form
"MYENV=value". (default: None)
licenses - A list of required licenses. Each requirement is specified as a
string in the form 'TOKEN' or 'TOKEN:n', where TOKEN is the name
of the license and n is the number of tokens checked out.
(default: None)
print_jobid - Whether to print the JobId of the newly launched job to the
terminal. (default: True)
appendlogs - If true, appends to log files rather than creating blank ones.
(default: False)
- Returns:
- The job object, if launched successfully under job control,
otherwise None.
- Raises:
IOError - if any of the input files are missing.
|