sbatch(1) Slurm Commands sbatch(1) NAME sbatch - Submit a batch script to Slurm. SYNOPSIS sbatch [OPTIONS(0)...] [ : [OPTIONS(N)...]] script(0) [args(0)...] Option(s) define multiple jobs in a co-scheduled heterogeneous job. For more details about heterogeneous jobs see the document https://slurm.schedmd.com/heterogeneous_jobs.html DESCRIPTION sbatch submits a batch script to Slurm. The batch script may be given to sbatch through a file name on the command line, or if no file name is specified, sbatch will read in a script from standard input. The batch script may contain options preceded with "#SBATCH" before any executable commands in the script. sbatch will stop processing further #SBATCH directives once the first non-comment non-whitespace line has been reached in the script. sbatch exits immediately after the script is successfully transferred to the Slurm controller and assigned a Slurm job ID. The batch script is not necessarily granted resources immediately, it may sit in the queue of pending jobs for some time before its required resources become available. By default both standard output and standard error are directed to a file of the name "slurm-%j.out", where the "%j" is replaced with the job allocation number. The file will be generated on the first node of the job allocation. Other than the batch script itself, Slurm does no movement of user files. When the job allocation is finally granted for the batch script, Slurm runs a single copy of the batch script on the first node in the set of allocated nodes. The following document describes the influence of various options on the allocation of cpus to jobs and tasks. https://slurm.schedmd.com/cpu_management.html RETURN VALUE sbatch will return 0 on success or error code on failure. SCRIPT PATH RESOLUTION The batch script is resolved in the following order: 1. If script starts with ".", then path is constructed as: current working directory / script 2. If script starts with a "/", then path is considered absolute. 3. If script is in current working directory. 4. If script can be resolved through PATH. See path_resolution(7). Current working directory is the calling process working directory unless the --chdir argument is passed, which will override the current working directory. OPTIONS -A, --account= Charge resources used by this job to specified account. The account is an arbitrary string. The account name may be changed after job submission using the scontrol command. --acctg-freq==[,=...] Define the job accounting and profiling sampling intervals in seconds. This can be used to override the JobAcctGatherFrequency parameter in the slurm.conf file. = specifies the task sampling interval for the jobacct_gather plugin or a sampling interval for a profiling type by the acct_gather_profile plugin. Multiple comma-separated = pairs may be specified. Supported datatype values are: task Sampling interval for the jobacct_gather plugins and for task profiling by the acct_gather_profile plugin. NOTE: This frequency is used to monitor memory usage. If memory limits are enforced, the highest frequency a user can request is what is configured in the slurm.conf file. It can not be disabled. energy Sampling interval for energy profiling using the acct_gather_energy plugin. network Sampling interval for infiniband profiling using the acct_gather_interconnect plugin. filesystem Sampling interval for filesystem profiling using the acct_gather_filesystem plugin. The default value for the task sampling interval is 30 seconds. The default value for all other intervals is 0. An interval of 0 disables sampling of the specified type. If the task sampling interval is 0, accounting information is collected only at job termination (reducing Slurm interference with the job). Smaller (non-zero) values have a greater impact upon job performance, but a value of 30 seconds is not likely to be noticeable for applications having less than 10,000 tasks. -a, --array= Submit a job array, multiple jobs to be executed with identical parameters. The indexes specification identifies what array index values should be used. Multiple values may be specified using a comma separated list and/or a range of values with a "-" separator. For example, "--array=0-15" or "--array=0,6,16-32". A step function can also be specified with a suffix containing a colon and number. For example, "--array=0-15:4" is equivalent to "--array=0,4,8,12". A maximum number of simultaneously running tasks from the job array may be specified using a "%" separator. For example "--array=0-15%4" will limit the number of simultaneously running tasks from this job array to 4. The minimum index value is 0. the maximum value is one less than the configuration parameter MaxArraySize. NOTE: Currently, federated job arrays only run on the local cluster. --batch= Nodes can have features assigned to them by the Slurm administrator. Users can specify which of these features are required by their batch script using this options. For example a job's allocation may include both Intel Haswell and KNL nodes with features "haswell" and "knl" respectively. On such a configuration the batch script would normally benefit by executing on a faster Haswell node. This would be specified using the option "--batch=haswell". The specification can include AND and OR operators using the ampersand and vertical bar separators. For example: "--batch=haswell|broadwell" or "--batch=haswell|big_memory". The --batch argument must be a subset of the job's --constraint= argument (i.e. the job can not request only KNL nodes, but require the script to execute on a Haswell node). If the request can not be satisfied from the resources allocated to the job, the batch script will execute on the first node of the job allocation. --bb= Burst buffer specification. The form of the specification is system dependent. Also see --bbf. When the --bb option is used, Slurm parses this option and creates a temporary burst buffer script file that is used internally by the burst buffer plugins. See Slurm's burst buffer guide for more information and examples: https://slurm.schedmd.com/burst_buffer.html --bbf= Path of file containing burst buffer specification. The form of the specification is system dependent. These burst buffer directives will be inserted into the submitted batch script. See Slurm's burst buffer guide for more information and examples: https://slurm.schedmd.com/burst_buffer.html -b, --begin=