Skip to main content

Job management on remote computers.

Project description

pybatch

Pybatch is a python module to submit jobs on a remote server managed by a batch manager such as Slurm, PBS, etc.

For the moment, the supported batch managers are:

  • 'slurm'
  • 'nobatch' - built in minimalistic solution when no batch manager is available.

Install

For installation, you can download the sources and use python package installers such as 'pip' to install from sources. You can download the sources here:

git clone https://codev-tuleap.cea.fr/plugins/git/salome/pybatch.git

There is also an internal repository for EDF users:

git clone https://gitlab.pleiade.edf.fr/I35256/pybatch.git

Basic installation

The name of the pip package is salome-pybatch. This installation uses minmalistic dependencies. The only python package used is 'psutil'.

pip install salome-pybatch

In this kind of installation, the only way to connect to a remote server is to use 'SshProtocol' which needs the 'ssh' external command to be already available on the workstation.

Complete installation

This installation uses some additional dependencies in order to have a built in 'ssh' client. These additional dependencies are :

  • 'libkrb5-dev' linux package needed for kerberos authentication,
  • 'paramiko' and 'scp' python packages.
pkcon install libkrb5-dev
pip install salome-pybatch[paramiko]

With this kind of installation you can use 'ParamikoProtocol' for remote connections, which does not use any external program.

'ParamikoProtocol' is more efficient than 'SshProtocol', because it uses a single ssh session and a single authetication for the management of the whole job, while 'SshProtocol' needs a new connection with a new authentication for every operation.

Development tools

The development evironment can be installed by :

pip install salome-pybatch[dev]

The main development tool is 'tox', which manages the environments for tests, documentation generation and code quality checks.

Exemple of use

Use case with comments.

Documentation

The documentation can be generated from sources, in the source directory, with:

tox -e docs
firefox build/docs/interface/html/index.html

Tests

Pybatch tests use 'pytest' for execution and 'tox' for the management of the python environment. There are three kinds of tests :

  1. tests that can be run on the local workstation without any additional data,
  2. tests that need a remote ssh server,
  3. tests that need 'Slurm', localy or remotely

The first category of tests can be executed from the sources directory by the command :

tox -e test

The other tests need a configuration file :

tox -e test -- --user-config-file=path/to/config_tests.toml

The configuration file defines the adress of the remote server, the type of tests that could be run and some other data needed by the test. An example of configuration file is available here.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salome_pybatch-1.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

salome_pybatch-1.0-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file salome_pybatch-1.0.tar.gz.

File metadata

  • Download URL: salome_pybatch-1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.2

File hashes

Hashes for salome_pybatch-1.0.tar.gz
Algorithm Hash digest
SHA256 430ab726fd44aec613efff25a5c7a98da917e67760a6b84dab83702e280c1d3b
MD5 ee115c96102c1c9759f825bd3dcdbb38
BLAKE2b-256 4b63644fc76e46be032846509426654b314714e2b8b22f2062253db7517964ef

See more details on using hashes here.

File details

Details for the file salome_pybatch-1.0-py3-none-any.whl.

File metadata

  • Download URL: salome_pybatch-1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.2

File hashes

Hashes for salome_pybatch-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41f9b8d64a8b4e405dc866764de6fcc39b812782ead2b66097350107788b00df
MD5 f7b2312777c671336f62c1b90cc22155
BLAKE2b-256 9741768a51af31a0ea4a4c4bdb2b2685191023763af1c0500fba94dc2c3de136

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page