phenotypic.tools_.slurm.generate_dispatcher_chain#

phenotypic.tools_.slurm.generate_dispatcher_chain(chunk_scripts: List[Path], output_dir: Path, slurm_args: Dict[str, Any], log_dir: Path) List[Path][source]

Generate dispatcher scripts for a chain of chunk scripts.

For N chunk scripts, generates N-1 dispatcher scripts. Each dispatcher submits the next chunk and (if not last) the next dispatcher with --dependency=afterany on that chunk.

Parameters:
  • chunk_scripts (List[Path]) – Ordered list of array job chunk script paths.

  • output_dir (Path) – Directory to write dispatcher scripts into.

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

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

Returns:

List of dispatcher script paths (one fewer than chunk_scripts, since the last chunk does not need a dispatcher). Empty if only one chunk exists.

Return type:

List[Path]