Skip to main content

A python package for working with the ANU PBS queue submission system

Project description

pbspy

PyPI - Version docs PyPI - Python Version PyPI - License build

A python package for working with the Portable Batch System (PBS) job scheduler.

See the documentation for more information.

Example

from pbspy import Job, JobDescription

# Run a job with some explicit parameters
job_a = (
    JobDescription(name="job_a", ncpus=4, mem="192GB", walltime="00:05:00")
    .add_command(["echo", "A"])
    .submit()
)

# Submit another job that waits for job_a to finish
job_b = (
    JobDescription(name="job_b", ncpus=1, walltime="00:05:00", afterok=[job_a])
    .add_command(["echo", "B"])
    .submit()
)

# Get the result of the jobs
# result_a = job_a.result() # wait for job_a to finish and get result
(result_a, result_b) = Job.result_all(
    [job_a, job_b]
)  # wait for job_a and job_b to finish and get results
print("job_a:", result_a.output.strip())
print("job_b:", result_b.output.strip())

Output (partially executed):

✓ 124397435.gadi-pbs job_a
⠼ 0:01:15 124397436.gadi-pbs job_b

Output (completed):

✓ 124397435.gadi-pbs job_a
✓ 124397436.gadi-pbs job_b

job_a: A
job_b: B

Licence

pbspy is licensed under the Apache License, Version 2.0 LICENSE or http://www.apache.org/licenses/LICENSE-2.0.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

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

pbspy-0.0.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

pbspy-0.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pbspy-0.0.1.tar.gz.

File metadata

  • Download URL: pbspy-0.0.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pbspy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 eb006d62e40593812e00a6a7772e9957fd0aac312b12cc9ebe02e6f315663cc3
MD5 fd767c262e609b238a54a9ab86c5be79
BLAKE2b-256 ba545f10e0d503fb4a446abc5fa1dc8cdd853e33e3ed9803dc15707c1738cd97

See more details on using hashes here.

File details

Details for the file pbspy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pbspy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pbspy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b89be8f610ba01557a476cd63505d88ca9d52a9c1c2437f75839b7873536ea36
MD5 3849b65d91dc5108c74000bddebcbea3
BLAKE2b-256 221384d25da51d77f4a6f8e333395e523ff4b7344ea60f0d743d814330e5841b

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