launch(script,
jobname=None,
copyscript=True,
usehostargs=True,
runtoplevel=False,
host='localhost',
local=False,
user=None,
disp=None,
proj=None,
save=None,
prog=None,
nice=None,
debugger=None,
tmpdir=None,
wait=False,
no_redirect=False,
localdriver=False,
nproc=None,
interval=None,
loginterval=None,
args=None,
input_files=None,
force_input_files=None,
output_files=None,
structure_output_file=None,
structure_monitor_file=None,
log_files=None,
envs=None,
licenses=None,
print_jobid=True,
expandvars=None)
|
|
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.
- 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)
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)
expandvars - Whether to expand environment variable references in the command
that's executed to launch the job. If None,defer to the behavior
of jobcontrol.launch_job(). (default: None)
- Returns:
- The job object, if launched successfully under job control,
otherwise None.
- Raises:
IOError - if any of the input files are missing.
|