hpc_generate_sbatch
Generate a validated sbatch script for SLURM cluster jobs, checked against partition and QoS limits. Returns text only; save it with hpc_write_file.
Instructions
Generate an sbatch script, validated against the cluster's partition/QoS limits. Returns text only — save with hpc_write_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpu | No | GPU count '1' or type:count 'a100:1' | |
| qos | No | QoS (optional) | |
| cpus | Yes | ||
| array | No | Array spec, e.g. '1-10%4' | |
| No | |||
| account | No | ||
| commands | Yes | ||
| job_name | Yes | ||
| nodelist | No | Specific node(s), e.g. 'node01' | |
| walltime | Yes | HH:MM:SS or D-HH:MM:SS | |
| mail_type | No | END,FAIL | |
| memory_gb | Yes | ||
| partition | No | Partition (default: cluster default) | |
| output_dir | Yes | Writable dir for .out/.err logs | |
| extra_directives | No | Additional sbatch options, e.g. ['--constraint=avx2'] |