pbspy 0.0.5

Last updated:

0 purchases

pbspy 0.0.5 Image
pbspy 0.0.5 Images
Add to Cart

Description:

pbspy 0.0.5

pbspy





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.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.