This module contains contracts for defining adapters to various queueing systems, e.g. PBS/SLURM/SGE.
Helper class - run subprocess commands in a different thread with TIMEOUT option. From https://gist.github.com/kirpit/1306188 Based on jcollado’s solution: http://stackoverflow.com/questions/1191374/subprocess-with-timeout/4825933#4825933
initialize the object :param command: command to run
Run the command :param timeout: (float) timeout :param kwargs: :return: (status, output, error)
The QueueAdapter is responsible for all interactions with a specific queue management system. This includes handling all details of queue script format as well as queue submission and management.
A user should extend this class with implementations that work on specific queue systems. Examples and implementations are in: fireworks/user_objects/queue_adapters.
Documentation on implementing queue adapters can be found on FireWorks home page, http://pythonhosted.org/FireWorks
returns the number of jobs currently in the queu efor the user
|Parameters:||username – (str) the username of the jobs to count (default is to autodetect)|
|Returns:||(int) number of jobs in the queue|
returns a (multi-line) String representing the queue script, e.g. PBS script. Uses the template_file along with internal parameters to create the script.
|Parameters:||launch_dir – (str) The directory the job will be launched in|
|Returns:||(str) the queue script|
submits the job to the queue and returns the job id
|Parameters:||script_file – (str) name of the script file to use (String)|
This module is used to submit jobs to a queue on a cluster. It can submit a single job, or if used in “rapid-fire” mode, can submit multiple jobs within a directory structure. The details of job submission and queue communication are handled using Queueadapter, which specifies a QueueAdapter as well as desired properties of the submit script.
Submit a single job to the queue.
Submit many jobs to the queue.