Resource Manager for rhapsody.
rhapsody_rm discovers HPC node resources and carves them into partitions,
then hands a partition to a rhapsody execution backend. It supports SLURM,
PBSPro, LSF, Cobalt, Torque, and a FORK manager for single-node / local use.
The core is pure Python standard library — it has no runtime dependency on
rhapsody. The two projects are coupled only by the documented partition
dict contract (see CONTRACT.md).
pip install . # core only
pip install '.[integration]' # also installs rhapsody-py for the seam tests
pip install '.[dev]' # test / lint toolingimport rhapsody_rm
cfg = rhapsody_rm.RMConfig(requested_nodes=5, fake_resources=True)
rm = rhapsody_rm.ResourceManager.get_instance(name="FORK", cfg=cfg)
print(f"found {len(rm.node_list)} nodes")
# allocate a partition and get a rhapsody-conforming spec
spec = rhapsody_rm.partition_spec(rm, part_id="p0", n_nodes=3)
# -> {"nodelist": [Node, ...], "env": {...}} -> resources["partition"]src/rhapsody_rm/ # base.py + per-scheduler managers + integration.py
tests/ # unit tests (run with: pytest)
CONTRACT.md # the rhapsody <-> rhapsody_rm partition contract
pytest # core unit tests (no scheduler or rhapsody needed)