Skip to main content

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.

Metadata

Release files for salome-pybatch 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salome-pybatch 1.0
File Size Uploaded
salome_pybatch-1.0.tar.gz 34.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for salome-pybatch 1.0
File Interpreter ABI Platform
salome_pybatch-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 76.7 kB

Release files / salome_pybatch-1.0.tar.gz

Download URL salome_pybatch-1.0.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
430ab726fd44aec613efff25a5c7a98da917e67760a6b84dab83702e280c1d3b
BLAKE2b-256 checksum
How to use checksums
4b63644fc76e46be032846509426654b314714e2b8b22f2062253db7517964ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.2

Release files / salome_pybatch-1.0-py3-none-any.whl

Download URL salome_pybatch-1.0-py3-none-any.whl
Size 42.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41f9b8d64a8b4e405dc866764de6fcc39b812782ead2b66097350107788b00df
BLAKE2b-256 checksum
How to use checksums
9741768a51af31a0ea4a4c4bdb2b2685191023763af1c0500fba94dc2c3de136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page