subprocess_interface#
- execute.subprocess_interface.run(exe, job_type='slurm', ntasks=1, args=None, infile=None, errlog=None, outlog=None, multi_prog=False, multi_prog_conf=None)[source]#
DESCRIPTION:
This function launches a job application in accordance with the parameters received upon entry.
- Parameters:
- exe:
str A Python string specifying the path to the application to be launched.
- exe:
- Keywords:
- job_type:
str, optional A Python string specifying the job type; this applies to the workload scheduler (e.g., SLURM, PBS, SGE, etc.,).
- ntasks:
int, optional A Python integer specifying the number of compute tasks; if NoneType upon entry, a value of 1 is assumed.
- args:
List, optional A Python list of arguments to be passed to the executable via the command line parser; if NoneType upon entry, no command line arguments are assumed.
- infile:
str, optional A Python string specifying the path to a file to be open and used as input to the respective executable; if NoneType upon entry, the stdin argument to the subprocess Popen object is ignored.
- outlog:
str, optional A Python string specifying the path to the standard-output (e.g., stdout) information; if NoneType upon entry, the stdout is written to out.log.
- errlog:
str, optional A Python string specifying the path to the error-output (e.g., stderr) information; if NoneType upon entry, the stderr is written to err.log.
- multi_prog:
bool, optional A Python boolean valued variable specifying whether to implement the SLURM multi_prog capabilities for the respective task; if True, multi_prog_conf must be specified; note that is not (yet) supported for MVAPICH at run-time configurations/executables.
- multi_prog_conf:
str, optional A Python string specifying the path to the file containing the SLURM multi_prog directives; if multi_prog (above) is True, this value is required; note that is not (yet) supported for MVAPICH run-time configurations/executables.
- job_type:
- Returns:
- returncode:
int A Python integer specifying the return code provided by the subprocess command.
- returncode:
- Raises:
- SubprocessInterfaceError:
raised if a specified configuration is not supported.
- Return type:
int