Skip to main content

Some general grid-engine HPC tools, mainly geared for UCL systems but should be generalisable. Note this is not a UCL endorsed package.

Project description

Getting started with hpc-tools

version: 0.2.3b0

hpc-tools is a Python package with some additional bash scripts/configuration files designed to simplify submitting array jobs on a cluster. Whilst it is written with Grid Engine in mind it can probably be re-purposed for other systems (such as LSF) - although this has not been tested in any way. Also, this has only been tested on the University College London (UCL) systems, Myriad and the CS cluster.

There is online documentation for hpc-tools and offline PDF documentation can be downloaded here.

Installation instructions

At present, hpc-tools is undergoing development and no packages exist yet on PyPi. Therefore it is recommended that it is installed in either of the two ways listed below. First, clone this repository and then cd to the root of the repository.

Installation using pip

pip install cfin-hpc-tools

Installation using conda

A conda build is also available for Python v3.7, v3.8 and v3.9 on linux-64.

conda install -c cfin cfin-hpc-tools

Post Python install

After installation of hpc-tools, there are some manual setup steps.

Setup a mapping file

The main submission script, pyjasub works by building job submission commands from user arguments. Therefore there is a mapping step to map between the user aguments and the cluster arguments. This happens internally but how the mapping is performed is controlled by a mapping config file. Examples, can be seen in the ./resources/mappings directory of the repository and is also shown below:

[mappings]
array=-t {0}-{1}:{2}

# Multiple arguments are separated by commas, such as two memory arguments
mem=-l hmem={0}, -l vmem={0}
time=-l h_rt={0}
nodes=-l hostname={0}
shell=-S {0}
out=-o {0}
err=-e {0}
batch=-tc {0}
tmp_size=-l tmpfs={0}
scratch_size=-l tscratch={0}

This follows a .ini format and and the Python formatting characters {0}, {1} etc... will be substituted with arguments. The mappings should be under the section header [mappings].

As a single the mappings file is expected per system, the location of the mappings file should be set in your ~/.bashrc:

export QSUB_PYTHON_MAPPING="/path/to/mappings.conf"

As the mappings file is a potential security risk, is should only be readable by you. This is checked by pyjasub and if any other users have any of rwx on the mapping file then pyjasub will error out with a PermissionError.

The abstraction of the cluster arguments has some plusses and minuses, it allows similar commands and job files can be used in different setups. However, this is at the expense of granular control. Having said that pyjasub can handle most everyday cluster uses and can probably be extended easily. Currently, pyjasub has only really been tested using GridEngine, however, it should be able to be adapted for LSF.

Add the bin directory to your PATH

There are a number of bash scripts used by pyjasub. Whilst, they are not obligatory and the user has full control of the task script, they can be used to perform some setup and cleanup operations. If you make sure that the directory .resources/bin is added to your PATH, for example, in your ~/.bashrc file:

export "${PATH}:/path/to/cluster/resources/bin"

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

cfin_hpc_tools-0.2.3b0.tar.gz (788.7 kB view details)

Uploaded Source

Built Distribution

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

cfin_hpc_tools-0.2.3b0-py3-none-any.whl (839.0 kB view details)

Uploaded Python 3

File details

Details for the file cfin_hpc_tools-0.2.3b0.tar.gz.

File metadata

  • Download URL: cfin_hpc_tools-0.2.3b0.tar.gz
  • Upload date:
  • Size: 788.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for cfin_hpc_tools-0.2.3b0.tar.gz
Algorithm Hash digest
SHA256 ab32e49619044dcb577062ce3cb42b5399f2386ba4d553d01143d9aa04d20c3a
MD5 db21f76e51fb8c560ad6b89ef3789758
BLAKE2b-256 2d1c34346a49a05d1a3f1260ad1f16c7ebbe23479f099cf16cf8f4ad660f881f

See more details on using hashes here.

File details

Details for the file cfin_hpc_tools-0.2.3b0-py3-none-any.whl.

File metadata

File hashes

Hashes for cfin_hpc_tools-0.2.3b0-py3-none-any.whl
Algorithm Hash digest
SHA256 668593e670a6f413ad51eaeeb88b06b2808a11598c68dbee714a8678dfd7aea1
MD5 441baf670b81db60336172ab31ff4846
BLAKE2b-256 4a497ca7a0059e310a7e1cbeaf094571956dee9d27030ed7c986bb6d44f754d3

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