srun(1) Slurm Commands srun(1) NAME srun - Run parallel jobs SYNOPSIS srun [OPTIONS(0)... [executable(0) [args(0)...]]] [ : [OPTIONS(N)...]] executable(N) [args(N)...] 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 Run a parallel job on cluster managed by Slurm. If necessary, srun will first create a resource allocation in which to run the parallel job. 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 srun will return the highest exit code of all tasks run or the highest signal (with the high-order bit set in an 8-bit integer -- e.g. 128 + signal) of any task that exited with a signal. The value 253 is reserved for out-of-memory errors. When invoked with --async, srun returns 0 once the controller accepts the step-create request, regardless of how the step's tasks ultimately exit. Use sacct(1) to inspect the step's exit code after it completes. EXECUTABLE PATH RESOLUTION The executable is resolved in the following order: 1. If executable starts with ".", then path is constructed as: current working directory / executable 2. If executable starts with a "/", then path is considered absolute. 3. If executable can be resolved through PATH. See path_resolution(7). 4. If executable is in current working directory. 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. This option applies to job allocations. --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. This option applies to job allocations. --async Submit a job step that runs asynchronously, instead of synchronously with the srun command that submitted it. The step is launched and supervised by the job's step manager, which will queue the step for later execution if resources are not currently available. The srun command returns immediately after the step is accepted by the controller and reports its step ID, without waiting for the step to start or finish. See --parsable for details on output format. Output is written directly on the compute nodes to the files named by --output and --error; if neither is given, slurm-%J.out (relative to each task's working directory) is used. Input is also supported by naming a file with --input=. Forms that require srun to forward its own stdin to the tasks (--input=all or --input=) do not work because srun has no I/O connection to the step. Some options, such as --label and --unbuffered, are applied on the compute node by the slurmstepd(8) process that writes the output, rather than by srun. Since srun exits before the step finishes, it does not propagate the step's exit code and does not forward signals (e.g., SIGINT from Ctrl-C) to the running tasks. Use scancel . to signal or terminate an asynchronous step. This option can only be used in an existing job allocation that has the step manager enabled (see --stepmgr in salloc(1)/sbatch(1) and SlurmctldParameters=enable_stepmgr in slurm.conf(5)). This option is mutually exclusive with --pty and --immediate. NOTE: This is a new feature that is still in beta, its usage may change in future releases. --bb= Burst buffer specification. The form of the specification is system dependent. Also see --bbf. This option applies to job allocations. 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. Also see --bb. This option applies to job allocations. See Slurm's burst buffer guide for more information and examples: https://slurm.schedmd.com/burst_buffer.html --bcast[=] Copy executable file to allocated compute nodes. If a file name is specified, copy the executable to the specified destination file path. If the path specified ends with '/' it is treated as a target directory, and the destination file name will be slurm_bcast_._. If no dest_path is specified and the slurm.conf BcastParameters DestDir is configured then it is used, and the filename follows the above pattern. If none of the previous is specified, then --chdir is used, and the filename follows the above pattern too. For example, "srun --bcast=/tmp/mine -N3 a.out" will copy the file "a.out" from your current directory to the file "/tmp/mine" on each of the three allocated compute nodes and execute that file. This option applies to step allocations. --bcast-exclude={NONE|[,...]} Comma-separated list of absolute directory paths to be excluded when autodetecting and broadcasting executable shared object dependencies through --bcast. If the keyword "NONE" is configured, no directory paths will be excluded. The default value is that of slurm.conf BcastExclude and this option overrides it. See also --bcast and --send-libs. -b, --begin=