phenotypic.tools_.slurm.generate_dispatcher_script#

phenotypic.tools_.slurm.generate_dispatcher_script(next_chunk_script: Path, next_dispatcher_script: Path | None, output_path: Path, slurm_args: Dict[str, Any], log_dir: Path) Path[source]

Generate a dispatcher script that submits the next chunk and dispatcher.

The dispatcher requests minimal resources (1 CPU, 100M, 5 min) and runs two sbatch commands: one for the next processing chunk, and one for the next dispatcher (with --dependency on the chunk).

Parameters:
  • next_chunk_script (Path) – Path to the next array job chunk script.

  • next_dispatcher_script (Path | None) – Path to the next dispatcher script, or None for the last chunk (no further dispatcher needed).

  • output_path (Path) – Where to write the generated dispatcher script.

  • slurm_args (Dict[str, Any]) – SLURM parameters dict (used to extract partition).

  • log_dir (Path) – Directory for dispatcher log files.

Returns:

Path to the generated dispatcher script.

Return type:

Path