Skip to main content

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

Project description

pbspy

PyPI - Version docs 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 MIT License LICENSE or http://opensource.org/licenses/MIT.

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.5.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

pbspy-0.0.5-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pbspy-0.0.5.tar.gz
Algorithm Hash digest
SHA256 856750f78d95304ab7aba03ed8e34c6fcbff7b7c0e4918bee469f2bafb162ad1
MD5 82f704706a23dbf7d8222221900e6bed
BLAKE2b-256 dea4ab58a08522116a522ea4d23a289029ae066eb5c23224fb9968e75e7295fc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pbspy-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b4f77bf003e12fe91d1ae8d5628feba9df4d87c6f0f2e120edf9b00e18bc8f20
MD5 0a3416dddecff859f28f401ba71d4fdf
BLAKE2b-256 ff12dd92d8b814790d92c7eef1f635724fa3aa341f03a14cb25bc39c2da3f7fa

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