A module for running jobs on the local machine. When transitioning to Python 3, use


Possible statuses: before_submission, running, errored on node xx, done Status line formats:


540420 0.45326 xq1340b    user_name       r     10/26/2018 11:08:30 long1@node18.cluster


14428     debug xq1371m2   user_name  R 50-04:04:46      1 node06

PBS (taken from

                                                                                  Req'd       Req'd       Elap
Job ID                  Username    Queue    Jobname          SessID  NDS   TSK   Memory      Time    S   Time
----------------------- ----------- -------- ---------------- ------ ----- ------ --------- --------- - ---------
2016614.zeldo.local     u780444     workq    scan.pbs          75380     1     10       --  730:00:00 R  00:00:20
2016616.zeldo.local     u780444     workq    scan.pbs          75380     1     10       --  730:00:00 R  00:00:20

Return a list of int representing job IDs of all jobs submitted by the user on a server

arc.job.local.delete_all_local_arc_jobs(jobs: Optional[List[Union[str, int]]] = None)[source]

Delete all ARC-spawned jobs (with job name starting with a and a digit) from the local server. Make sure you know what you’re doing, so unrelated jobs won’t be deleted… Useful when terminating ARC while some (ghost) jobs are still running.


jobs (List[Union[str, int]], optional) – Specific ARC job IDs to delete.


Deletes a running job

arc.job.local.execute_command(command, shell=True, no_fail=False)[source]

Execute a command.


If no_fail == True, then a warning is logged and False is returned so that the calling function can debug the situation.

  • command – An array of string commands to send.

  • shell (bool) – Specifies whether the command should be executed using bash instead of Python

  • no_fail (bool) – If True then ARC will not crash if an error is encountered.

Returns: list

lists of stdin, stdout, stderr corresponding to the commands sent

arc.job.local.get_last_modified_time(file_path_1: str, file_path_2: Optional[str] = None) Optional[datetime.datetime][source]

Returns the last modified time of file_path_1 if the file exists, else returns the last modified time of file_path_2 if the file exists.

  • file_path_1 (str) – The path to file 1.

  • file_path_2 (str, optional) – The path to file 2.

arc.job.local.rename_output(local_file_path, software)[source]

Rename the output file to “output.out” for consistency between software local_file_path is the full path to the output.out file, software is the software used for the job by which the original output file name is determined


Submit a job path is the job’s folder path, where the submit script is located (without the submit script file name)

arc.job.local.write_file(file_path, file_string)[source]

Write file_string as the file’s content in file_path