Skip to main content
Have a personal or library account? Click to login
Longbow: A Lightweight Remote Job Submission Tool Cover

Longbow: A Lightweight Remote Job Submission Tool

Open Access
|Jan 2016

Figures & Tables

Figure 1

The simple format of the Longbow command.

applications.py
testapp()Checks that executables exist on the HPC machine
processjobs()Process jobs to extract a list of files for staging and an execution command-line. This method contains hooks to call methods that are provided via the plug-in framework (such as custom input file parsers).
configuration.py
processconfigs()Processes configuration information from sources such as command-line and configuration files into the two main Longbow data structures.
loadconfigs()A method for loading configuration files (ini format)
saveconfigs()A method for saving configuration files (ini format)
exceptions.pyContains various custom exception classes which are used in the error handling within Longbow methods.
logger.py
setuplogger()A method that sets the correct logging mode.
standardlogger()The standard logger method, configures python logger to log standard events to specified file only.
verboselogger()The verbose logger method, configures python logger to log standard events to the specified file and console output.
debuglogger()The debug logger method, configures python logger to log an enhanced set of log messages to the log file and console output.
scheduling.py
testenv()This method will check the scheduling environment for all hosts referenced in jobs if not already set by user, and make an attempt to auto determine if it is not.
delete()A generic job delete method, this method makes a call to the environment specific delete method that are provided via plug-ins.
monitor()The generic method for monitoring jobs after submission, this method contains a loop that continues until all jobs have ended. This method contains the logic for persistent staging should this have been configured. Calls are made to environment specific methods that are provided via plug-ins.
prepare()The generic method for writing the job submission file, this method makes calls to the environment specific method provided via the plug-in framework.
submit()The generic method for submitting jobs, this method makes calls to environment specific submit methods provided via the plug-in framework.
shellwrappers.py
testconnections()A method for testing that SSH connections can be established with each HPC host listed under jobs.
sendtoshell()A method for assembling commands to be sent to the shell via python subprocess calls.
sendtossh()A method for assembling commands to be sent to the shell which will utilise SSH.
sendtorsync()A method for assembling commands to be sent to the shell which will utilise rsync.
localcopy()A method for copying files/directories between local paths.
localdelete()A method for deleting files/directories from local paths.
locallist()A method for listing the contents of local paths.
remotecopy()A method for copying files/directories between locations on a remote host.
remotedelete()A method for deleting files/directories from a remote host.
remotelist()A method for listing the contents of paths on a remote host.
upload()A method for uploading files from a local path to a path on a remote host.
download()A method for downloading files from a path on a remote host to a local path.
staging.py
stage_upstream()Method for staging all files from a set of jobs to their respective HPC hosts.
stage_downstream()Method for staging all files for a particular job from the HPC host back to the local machine.
cleanup()Method for cleaning up the working directories of each HPC host listed in completed jobs.
Figure 2

A schematic showing how the flowchart for the Longbow executable (right) maps onto the relationship diagram of the core library and plug-in framework. The colour coding is simply for clarity.

prepare()This method writes the job submission file to be submitted to the scheduler.
delete()This method will delete a job that has been submitted to the scheduler in question on the remote resource.
submit()This method submits the job submission file to the scheduler in question on the remote resource.
status()This method will query the status of jobs that have been submitted to the scheduler.
EXECDATAThis dictionary defines the names of the supported executables for the package and the command line flags the software requires. This dictionary is required in all app files.
file_parser()This method recursively searches through input files to the executable for references to other required input files. All filenames found are added to the list of files to be staged to the remote resource. Only executables that can depend on input files that are not explicitly provided on the command line require this method.
sub_dict()This method detects command-line parameter substitutions to be applied in input files. Only packages that support such substitutions and users that wish to implement such a feature require this method.
defaultfilename()This method will automatically add the file extension specified in the method onto the name of an input file provided without the extension. This method is to support the atypical case that a package might expect the name of an input file to be provided without the extension.
DOI: https://doi.org/10.5334/jors.95 | Journal eISSN: 2049-9647
Language: English
Published on: Jan 27, 2016
Published by: Ubiquity Press
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year

© 2016 James Gebbie-Rayet, Gareth Shannon, Hannes H. Loeffler, Charles A. Laughton, published by Ubiquity Press
This work is licensed under the Creative Commons Attribution 4.0 License.