Cluster Interface
- vivarium_cluster_tools.psimulate.cluster.interface.validate_cluster_environment()[source]
- Return type:
- class vivarium_cluster_tools.psimulate.cluster.interface.NativeSpecification(job_name, project, queue, peak_memory, max_runtime, hardware, NUM_THREADS)[source]
- Parameters:
- to_jobmon_spec(worker_logging_root)[source]
Build the Jobmon compute resources dict from this NativeSpecification.
- Return type:
- Parameters:
worker_logging_root (Path) – Root directory for worker logs.
- Returns:
Dictionary of compute resources for Jobmon.
Notes
memoryis passed in GB because the Jobmon SLURM plugin performs its own GB → MB conversion internally.constraintsis a pipe-separated string of SLURM feature names (e.g."r650|r650v2"), included only when hardware is requested.standard_outputandstandard_errorroute SLURM stdout/stderr to the cluster logs directory. The Jobmon SLURM plugin appends the task name and SLURM job ID to these paths automatically.
- vivarium_cluster_tools.psimulate.cluster.interface.get_workflow_timeout_seconds()[source]
Get jobmon workflow’s timeout in seconds.
The result includes a small buffer so that the workflow can shut down gracefully before SLURM terminates the runner node.
- Return type:
- Returns:
Remaining time in seconds (with buffer subtracted), or
Noneif there is no SLURM allocation (in which case Jobmon’s built-in default timeout is used).- Raises:
RuntimeError – If the remaining time is less than the safety buffer, or the remaining time cannot be determined from
squeue.