gaps.hpc.submit#
- submit(cmd, background=False, background_stdout=False)[source]#
Open a subprocess and submit a command.
- Parameters:
cmd (str) – Command to be submitted using python subprocess.
background (bool) – Flag to submit subprocess in the background. stdout stderr will be empty strings if this is True.
background_stdout (bool) – Flag to capture the stdout/stderr from the background process in a nohup.out file.
- Returns:
stdout (str) – Subprocess standard output. This is decoded from the subprocess stdout with rstrip.
stderr (str) – Subprocess standard error. This is decoded from the subprocess stderr with rstrip. After decoding/rstrip, this will be empty if the subprocess doesn’t return an error.