Skip to main content

Generic SLURM dispatch (srun, sbatch, sync, poll, fetch) for the SciTeX ecosystem — login nodes never run compute

Project description

scitex-hpc

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

Generic SLURM dispatch for the SciTeX ecosystem — srun / sbatch / sync / poll_job / fetch_result with sane defaults for spartan/sapphire and override knobs for any other cluster.

Login nodes never run compute — every command is wrapped in srun or sbatch via a login-shell SSH so the SLURM module loads correctly.

Install

pip install scitex-hpc

Usage

from scitex_hpc import JobConfig, srun, sbatch, sync, poll_job, fetch_result

cfg = JobConfig(
    project="scitex-dsp",
    command="pip install -e '.[dev]' -q && python -m pytest tests/ -n 16",
    host="spartan",
    partition="sapphire",
    cpus=16,
    time="00:30:00",
    mem="64G",
)

# 1. Sync local sources to the cluster.
sync(cfg)

# 2a. Blocking interactive run via srun.
exit_code = srun(cfg)

# 2b. Async batch submission via sbatch.
job_id = sbatch(cfg)
print(poll_job(cfg, job_id))   # {'state': 'COMPLETED', 'exit_code': '0:0', 'elapsed': '00:01:23'}
fetch_result(cfg, job_id)      # downloads the .out file

Defaults & overrides

Every JobConfig field has a SCITEX_HPC_* env-var override:

Field Default Env override
host spartan SCITEX_HPC_HOST
partition sapphire SCITEX_HPC_PARTITION
cpus 16 SCITEX_HPC_CPUS
time 00:20:00 SCITEX_HPC_TIME
mem 128G SCITEX_HPC_MEM
remote_base ~/proj SCITEX_HPC_REMOTE_BASE

Resolution priority: explicit JobConfig field → env var → built-in default.

Status

Standalone module from the SciTeX ecosystem. Public API surfaces in scitex.hpc (via the umbrella package's sys.modules alias) so you can write from scitex.hpc import srun from any consumer.

License

AGPL-3.0-only.

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

scitex_hpc-0.2.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

scitex_hpc-0.2.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file scitex_hpc-0.2.0.tar.gz.

File metadata

  • Download URL: scitex_hpc-0.2.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_hpc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 472f0667d9d2768e56ee01b9530ed7799bb2e722b659909bf33de65922818392
MD5 a5bf0e481c73a2b4ff29581c5101ef8f
BLAKE2b-256 e692b44c3990b12510adc4a1bf160f966ce6f744953f744dc71b8ce3fb6b7d78

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_hpc-0.2.0.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_hpc-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: scitex_hpc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_hpc-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11f57d66f1d1641f435b1e6d4dfa99a65a8f71252e5e85cc3cb2f9886daab8cd
MD5 91dcd9b15d13e9e0df328aac1d085a0f
BLAKE2b-256 7987fb02e6ca49a0dbad198b84902f93b146187b04ed089373e172ee5cdc7b68

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_hpc-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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