mockslurm.mock_sbatch

Implement a mock of the sbatch command of slurm.

The implementation mimics the sbatch API, while using subprocess to start the processes on the host machine without slurm daemons.

Double fork is used to detach the subprocess, allowing the sbatch mock to return while the created process is still running.

Functions

check_dependency(job_dependency)

Check if a job's dependency are satisfied

launch_job(cmd, stdout, stderr, job_idx, ...)

Runs cmd as a detached subprocess.

main()

parse_dependency(job_dependency)

Parse a job's dependency specification string in sbatch format

Classes

DependencyActions(value[, names, module, ...])