job_stream.invoke¶
-
job_stream.
invoke
(progAndArgs, transientErrors=[], maxRetries=20)[source]¶ Since it can be difficult to launch some programs from an MPI distributed application, job_stream provides invoke functionality to safely launch an external program (launching an application such as Xyce, for instance, can cause problems if the environment variables are not doctored appropriately).
progAndArgs: list, [ ‘path/to/file’, *args ]
- transientErrors: list of strings, if any of these strings are found in the
stderr of the program, then any non-zero return code is considered a transient error and the application will be re-launched up to maxRetries times.
Note that “No child processes” is automatically handled as transient.
- maxRetries: The maximum number of times to run the application if there are
- transient errors. Only the final (successful) results are returned.
Returns: (contents of stdout, contents of stderr)