Skip to main content

Utilities package to submit jobs to SLURM using as input a python sbatch configuration file.

Project description

CP3SlurmUtils

CP3SlurmUtils was written with the aim to be an utility for physicists of the CP3 institute that would facilitate the submission (and resubmission) of jobs to their computing cluster, which is managed by Slurm. Most of the physicists at CP3 that would use this utility are collaborating with the CMS experiment at CERN.

In CP3SlurmUtils, jobs are defined via a submit configuration file written in Python similar to the type of submit configuration file used in CRABClient, the tool used by CMS users to submit jobs to the Worldwide LHC Computing Grid. The utility creates then the batch scripts to be submitted with the Slurm sbatch command. The submission can be done on-the-go by the utility itself or later-on by the user.

CP3SlurmUtils provides the following features:

  • handling of job stdout/stderr
  • handling of a scratch directory
  • handling of job exit codes
  • handling of job input and output files
  • setup of the CMS environment (optional)

For the copying of files to/from the worker nodes, the cp command is used, assuming there is a filesystem shared with the submission node.

INSTALLATION

CP3SlurmUtils can be installed via the Python Package Installer, or it can simply be downloaded from the git repository: https://gitlab.cern.ch/cp3-cms/CP3SlurmUtils.

CONFIGURATION

An example configuration file for CP3SlurmUtils named defaults.cfg.example is included in the package. In the git repository, it can be found in the etc folder. In the distribution, it can be found in a sub-directory named etc/CP3SlurmUtils.

CP3SlurmUtils will try to read the defaults.cfg configuration file from the following locations, in this order:

  • /etc/CP3SlurmUtils/
  • $xdg_config_dir/CP3SlurmUtils/ where $xdg_config_dir is each of the paths defined by the environment variable $XDG_CONFIG_DIRS; if $XDG_CONFIG_DIRS is not defined, $xdg_config_dir defaults to /etc/xdg/
  • site.USER_BASE/etc/CP3SlurmUtils/ where site.USER_BASE is the python variable that defines the location for a user installation
  • $xdg_config_home/CP3SlurmUtils/ where $xdg_config_home is the environment variable $XDG_CONFIG_HOME when defined and not empty; otherwise it defaults to $HOME/.config
  • $VIRTUAL_ENV/etc/CP3SlurmUtils/ when $VIRTUAL_ENV is defined and not empty

There is no installation or configuration script provided with this utility; it is left to the user to put the defaults.cfg configuration file in a visible location or appropriately point the environment variable $XDG_CONFIG_DIRS or $XDG_CONFIG_HOME to it.

REPORTING BUGS

To report an issue/bug or to provide suggestions for enhancement/improvement, open an issue in the git repository: https://gitlab.cern.ch/cp3-cms/CP3SlurmUtils. Pull requests are also welcome. Questions can be sent to cp3-support@uclouvain.be.

LEGAL

CP3SlurmUtils is provided "as is" and with no warranty. This software is distributed under the GNU General Public License; please see the file LICENSE for details.

Project details


Download files

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

Source Distribution

CP3SlurmUtils-0.3.1.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

CP3SlurmUtils-0.3.1-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

Details for the file CP3SlurmUtils-0.3.1.tar.gz.

File metadata

  • Download URL: CP3SlurmUtils-0.3.1.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/26.0 requests/2.24.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.48.2 importlib-metadata/4.4.0 keyring/21.3.0 rfc3986/1.4.0 colorama/0.4.3 CPython/3.6.4

File hashes

Hashes for CP3SlurmUtils-0.3.1.tar.gz
Algorithm Hash digest
SHA256 52d41755a346eb8c69a06950ab752313e95708f09228aca9b937650cc038b11a
MD5 8c6162b71ecbc861fc8d38077f97118d
BLAKE2b-256 bbe2251864c86d838267f934661916a05774dc436191725271cd7420da6a1ea6

See more details on using hashes here.

File details

Details for the file CP3SlurmUtils-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: CP3SlurmUtils-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/26.0 requests/2.24.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.48.2 importlib-metadata/4.4.0 keyring/21.3.0 rfc3986/1.4.0 colorama/0.4.3 CPython/3.6.4

File hashes

Hashes for CP3SlurmUtils-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6814a813b99951606d089ce87bf0e405227c1a86482ff43d425f4371abe69dcc
MD5 8e601114cf3e7cf47ff5cf372c5df713
BLAKE2b-256 6edfa7dc41ada92d29b889c9f5eb35b41864ecde346c3d9229a9e4e8c3eeead0

See more details on using hashes here.

Supported by

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