Skip to main content

python interface to submit functions to an SGE batch cluster

Project description

          pysge      +     +
    /\         /\     \   O \
   / \\  /\   /\\\     \_/|\_\
  /   \\/ \\ /  \\\       \\
       /   \/    \\\     \/'
      /    /      \\\     \\_
     /    /        \\\     -

Call python functions on (IC) SGE batch cluster - with tqdm progress bars.

How to use

High-level interface use:

import pysge

tasks = [...] # list of dicts with keys ["task", "args", "kwargs"] run on each node as task(*args, **kwargs)

results = pysge.local_submit(tasks)
results = pysge.mp_submit(tasks, ncores=4)
results = pysge.sge_submit("name", "/tmp/pysge-temporaries", tasks=tasks, options="-q hep.q")

The return value is a list of results for each task, in order o tasks.

How it works

For SGE batch system a working area is created and the functions + args + kwargs are pickled. A submitter then submits each pickled file to the batch using subprocess. A monitor checks the status of these jobs, waits until all are finished and returns the results.

For multiprocessing no working area is needed and the submitter uses multiprocessing.

For local no submitter is needed. It just loops over the tasks.

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

pysge-0.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

pysge-0.1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pysge-0.1.2.tar.gz.

File metadata

  • Download URL: pysge-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pysge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ac9229ce010c2fcf35a5a3a6715c446f3455fe7137b2ef05ab12feedb4ee46aa
MD5 0002cf2e5506e8eeb1688c7b68574455
BLAKE2b-256 35ee5a72304f6c5d940d62986a594a0dc4a575f93e9213f6bc988b202df9e8b8

See more details on using hashes here.

File details

Details for the file pysge-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pysge-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pysge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5c5eada444c0827addd3eea6cd63d2cf0cc0939e80f49d1f9c08f4f9bde51b1
MD5 a56ff0c9c312aef210802a0a56c6062b
BLAKE2b-256 d294eca062df36fdf06afc93bd4b8d56eb7f4b83a4f4e1b3efc99baeaef4f8c7

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