Giter VIP home page Giter VIP logo

pysqa's Introduction

pysqa

Simple queue adapter for python

Codacy Badge Build Status Build status Coverage Status

The goal of pysqa is to make submitting to an HPC cluster as easy as starting another subprocess. This is based on the assumption that even though modern queuing systems allow for an wide range of different configuration, most users submit the majority of their jobs with very similar parameters. Therefore pysqa allows the users to store their submission scripts as jinja2 templates for quick access. After the submission pysqa allows the users to track the progress of their jobs, delete them or enable reservations using the built-in functionality of the queuing system. The currently supported queuing systems are: LFS, MOAB, SGE (tested), SLURM (tested), TORQUE.

Installation

pysqa can either be installed via pip using:

pip install pysqa

Or via anaconda from the conda-forge channel

conda install -c conda-forge pysqa

Usage

pysqa requires the user to configure the type of queuing system as well as the available templates. Example configuration are available at: https://github.com/pyiron/pysqa/tree/master/tests/config By default pysqa is searching for the queue configuration in ~/.queues/queue.yaml and the corresponding jinja2 templates in the same folder.

Import pysqa:

from pysqa import QueueAdapter 
sqa = QueueAdapter(directory=‘~/.queues’)  # directory which contains the queue.yaml file 

List available queues as list of queue names:

sqa.queue_list 

List available queues in an pandas dataframe:

sqa.queue_view 

Submit a job to the queue - if no queue is specified it is submitted to the default queue defined in the queue configuration:

sqa.submit_job(command=‘python test.py’)

Get status of all jobs currently handled by the queuing system:

sqa.get_queue_status()

Get status of a specifc job from the queuing system:

sqa.get_status_of_job(process_id=1234)

Delete a job from the queuing sytem:

sqa.delete_job(process_id=1234) 

Sample configurations for the specific queuing systems are availabe in the tests:

License

pysqa is released under the BSD license https://github.com/pyiron/pysqa/blob/master/LICENSE . It is a spin-off of the pyiron project https://github.com/pyiron/pyiron therefore if you use pysqa for your publication, please cite:

@article{pyiron-paper,
  title = {pyiron: An integrated development environment for computational materials science},
  journal = {Computational Materials Science},
  volume = {163},
  pages = {24 - 36},
  year = {2019},
  issn = {0927-0256},
  doi = {https://doi.org/10.1016/j.commatsci.2018.07.043},
  url = {http://www.sciencedirect.com/science/article/pii/S0927025618304786},
  author = {Jan Janssen and Sudarsan Surendralal and Yury Lysogorskiy and Mira Todorova and Tilmann Hickel and Ralf Drautz and Jörg Neugebauer},
  keywords = {Modelling workflow, Integrated development environment, Complex simulation protocols},
}

pysqa's People

Contributors

jan-janssen avatar codacy-badger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.