Giter Club home page Giter Club logo

pyslurm's Introduction

PySlurm

PySlurm

Overview

PySlurm is the Python client library for the Slurm HPC Scheduler.

Prerequisites

  • Slurm - Slurm shared library and header files
  • Python - >= 3.6
  • Cython - >= 0.29.30 but < 3.0

This PySlurm branch is for the Slurm Major-Release 22.05

Installation

By default, it is searched inside /usr/include for the Header files and in /usr/lib64 for Slurms shared-library (libslurm.so) during Installation. For Slurm installations in different locations, you will need to provide the corresponding paths to the necessary files.

You can specify these Paths with environment variables (recommended), for example:

export SLURM_INCLUDE_DIR=/opt/slurm/22.05/include
export SLURM_LIB_DIR=/opt/slurm/22.05/lib

Then you can proceed to install PySlurm, for example by cloning the Repository:

git clone https://github.com/PySlurm/pyslurm.git && cd pyslurm
scripts/build.sh

# Or simply with pip
pip install .

Also see python setup.py --help

Release Versioning

PySlurm's versioning scheme follows the official Slurm versioning. The first two numbers (MAJOR.MINOR) always correspond to Slurms Major-Release, for example 22.05. The last number (MICRO) is however not tied in any way to Slurms MICRO version. For example, any PySlurm 22.05.X version should work with any Slurm 22.05.X release.

Documentation

The API documentation is hosted at https://pyslurm.github.io.

To build the docs locally, use Sphinx to generate the documentation from the reStructuredText based docstrings found in the pyslurm module once it is built:

cd doc
make clean
make html

Testing

PySlurm requires an installation of Slurm.

Using a Test Container

To run tests locally without an existing Slurm cluster, docker and docker-compose is required.

Clone the project:

git clone https://github.com/PySlurm/pyslurm.git
cd pyslurm

Start the Slurm container in the background:

docker-compose up -d

The cluster takes a few seconds to start all the required Slurm services. Tail the logs:

docker-compose logs -f

When the cluster is ready, you will see the following log message:

Cluster is now available

Press CTRL+C to stop tailing the logs. Slurm is now running in a container in detached mode. docker-compose also bind mounds the git directory inside the container at /pyslurm so that the container has access to the test cases.

Install test dependencies:

pipenv sync --dev

Execute the tests inside the container:

pipenv run pytest -sv scripts/run_tests_in_container.py

When testing is complete, stop the running Slurm container:

docker-compose down

Testing on an Existing Slurm Cluster

You may also choose to clone the project and run tests on a node where Slurm is already compiled and installed:

git clone https://github.com/PySlurm/pyslurm.git
cd pyslurm
pip install .
./scripts/configure.sh
pipenv sync --dev
pipenv run pytest -sv

Contributors

PySlurm is made by contributors like you.

Help

Ask questions on the PySlurm Google Group

pyslurm's People

Contributors

giovtorres avatar gingergeeks avatar rfehren avatar rezib avatar phantez avatar tazend avatar jonaotto avatar vladdoster avatar yencli avatar mehdid avatar schluenz avatar mask891 avatar jbd avatar li-positive-one avatar vkantchev avatar nvutri avatar swillner avatar pkcakeout avatar mstud avatar jackguyver avatar l1ll1 avatar 0xstarfox 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.