Skip to main content

Versatile computation submission tool

Project description

PySubmit

The versatile computation submission tool.

Purpose

Scientists who use computational methods often face the problem to test various parameter values as input for their numerical codes.

Having the power of high performance computer clusters (HPCs) at hand, it is easy to test up to multiple thousand input parameter values simultaneously. However, HPCs typically use batch systems that schedule computation jobs. Special files called start scripts are required to get your computation running. These start scripts are even useful for computations on your local workstations if they are adapted a little.

This tool enables to generate these start scripts with ease and for arbitrary interfaces to your numerical code. The parameters are supplied using Python and a boilerplate of your start script that needs to be filled with values. With that, this tool helps to make your numerical research more reproducible.

Installation

The package is on PyPI so that an installation is as simple as:

$ pip install pysubmit

Alternatively, you can install the package in developer mode with from this repository:

$ pip install -e .

with the current directory being the top level folder of the PySubmit project.

Configuration

Call pysubmit -h to see possible configuration options.

Creating a template

PySubmit uses regular Python files as templates for the creation of the start scripts. Create a Python file with a function render() in it, which needs to return filenames and parameter values for the variables in the actual start script. The start script itself is added to this Python file with triple quotes (""") at the very end. The opening triple quotes are followed by <<< and the ending ones are preceded by >>>. Hence, the limiting syntax of the start script code inside the Python file that comes with the render() function is """<<< and >>>""".

This format keeps the PySubmit template very consise and contained in a single file. A basic example is found in tests/template_example_new.py. Try to use the template by executing:

$ pysubmit -pf <path>/<to>/<repo>/pysubmit/tests/template_example_new.py -o TEST

to generate the start scripts as defined in the example and save them into the folder TEXT/.

The version 1.0 of PySubmit uses a different format for the templates. To use the file format from v0.1 - and thereby be backwards compatible -, the command-line tool pysubmit comes with an extra keyword --boilerplate-file. If you would like to use the old format with v1.0, use --pysubmit-file to supply your render.py file and --boilerplate-file to supply the boilerplate file. An example of the old format can be found under tests/template_example_old.py and tests/template_example_old.boilerplate.

Upload to pypi

These are the steps to upload this project to pypi:

  1. Build the package, see https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives.
  2. Upload the package, see https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives.

The summary of those two resources is:

  1. Build the package: python setup.py sdist bdist_wheel
  2. Upload the package: twine upload dist/*

Help

If anything is unclear, please contact me under martin.lellep@gmail.com :-). I personally find this tool incredibly useful and use it literally everyday to start my simulations on HPCs.

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

pysubmit-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

pysubmit-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pysubmit-1.0.1.tar.gz.

File metadata

  • Download URL: pysubmit-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.2

File hashes

Hashes for pysubmit-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d3ede9a1b6135afad73ee495fbff358178f49a3175feb9e2d0e258a9bd53bb42
MD5 2c6dccb6801e8d5c6436b43e8a3691ea
BLAKE2b-256 2a048368cea3814f16c1fabb771b883696309669e4230172c6817c491a55d7f2

See more details on using hashes here.

File details

Details for the file pysubmit-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pysubmit-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.2

File hashes

Hashes for pysubmit-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b43041a27d138fe9b88d26077c0f3bc4a9f44ba15e8b690e5d86a3f6b45ca93
MD5 db4f9d19abcff764d243f426e40c0607
BLAKE2b-256 493a7422fb5ebfce438c0129c58e6c898e21c4a7ef380eba3e4b889705de5d27

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