7. SLURMコマンド¶
ログインノードから実行可能なSlurmコマンドを以下に示します。
NO. |
SLURMコマンド |
説明 |
---|---|---|
1 |
sbatch |
バッチジョブを投入する |
2 |
srun |
ジョブを投入する |
3 |
scancel |
ジョブをキャンセルする |
4 |
sstat |
ジョブに関する情報を表示する |
5 |
sacct |
ジョブのアカウンティング情報を表示する |
6 |
squeue |
ジョブキューの状態を表示する |
7 |
sinfo |
計算ノードの状態を表示する |
8 |
sbcast |
ジョブが割り当てられたノードへファイルを転送する |
7.1. バッチジョブを投入する(sbatch)¶
sbatch
はSlurmへバッチスクリプトをサブミットするコマンドです。
書式
sbatch [OPTIONS(0)...] [ : [OPTIONS(N)...]] script(0) [args(0)...]
コマンドの例(スクリプトファイルがjob.shの場合)
[Login]$ sbatch job.sh
主なオプションを以下に示します。
-J,
--job-name=<jobname>
|
ジョブ割り当ての名前を指定します。指定した名前は、システムで実行中のジョブを照会するときに、ジョブID番号とともに表示されます。 デフォルトはバッチスクリプトの名前です。 |
-p,
--partition=<partition_names>
|
リソース割り当てのために特定のキュー(パーティション)を指定します。 |
-c,
--cpus-per-task=<ncpus>
|
1タスク(プロセス)あたりに必要な、1つのノード上で動くCPU数を指定します。 |
-N,
--nodes=<minnodes[-maxnodes]>
|
割り当てるノード数を指定します。デフォルトは1タスク(プロセス)あたり1ノードです。 |
-n,
--ntasks=<number>
|
タスク(プロセス)数を指定します。 |
-o,
--output=<filename pattern>
|
バッチスクリプトの標準出力を<filename pattern>に書き込むように指定します。デフォルトでは、標準出力と標準エラー出力の両方が同じファイルに書き込まれます。デフォルトのファイル名は「slurm-%j.out」で、「%j」はジョブIDに置き換えられます。 |
-e,
--error=<filename pattern>>
|
バッチスクリプトの標準エラーを<filename pattern>に書き込むように指定します。デフォルトでは、標準出力と標準エラー出力の両方が同じファイルに書き込まれます。デフォルトのファイル名は「slurm-%j.out」で、「%j」はジョブIDに置き換えられます。 |
--mem=<size[units]>
|
割り当てるメモリ量を指定します。デフォルトの単位はMBです。単位はK,M,G,Tが使用できます。
(例)10GBを指定する場合
#SBATCH --mem=10G
|
GPUを利用する場合の主なオプションを以下に示します。
--gpus |
ジョブごとに必要なGPU数を指定します。
例:--gpus=1
|
--gpus-per-node |
ノードごとに必要なGPU数を指定します。 |
--gpus-per-task |
タスクごとに必要なGPU数を指定します。ジョブにタスク数を指定する必要があります。 |
詳細なオプションを以下に示します。
[Login]$ sbatch --help
Usage: sbatch [OPTIONS(0)...] [ : [OPTIONS(N)...]] script(0) [args(0)...]
Parallel run options:
-a, --array=indexes job array index values
-A, --account=name charge job to specified account
--bb=<spec> burst buffer specifications
--bbf=<file_name> burst buffer specification file
-b, --begin=time defer job until HH:MM MM/DD/YY
--comment=name arbitrary comment
--cpu-freq=min[-max[:gov]] requested cpu frequency (and governor)
-c, --cpus-per-task=ncpus number of cpus required per task
-d, --dependency=type:jobid[:time] defer job until condition on jobid is satisfied
--deadline=time remove the job if no ending possible before
this deadline (start > (deadline - time[-min]))
--delay-boot=mins delay boot for desired node features
-D, --chdir=directory set working directory for batch script
-e, --error=err file for batch script's standard error
--export[=names] specify environment variables to export
--export-file=file|fd specify environment variables file or file
descriptor to export
--get-user-env load environment from local cluster
--gid=group_id group ID to run job as (user root only)
--gres=list required generic resources
--gres-flags=opts flags related to GRES management
-H, --hold submit job in held state
--ignore-pbs Ignore #PBS and #BSUB options in the batch script
-i, --input=in file for batch script's standard input
-J, --job-name=jobname name of job
-k, --no-kill do not kill job on node failure
-L, --licenses=names required license, comma separated
-M, --clusters=names Comma separated list of clusters to issue
commands to. Default is current cluster.
Name of 'all' will submit to run on all clusters.
NOTE: SlurmDBD must up.
--container Path to OCI container bundle
--container-id OCI container ID
-m, --distribution=type distribution method for processes to nodes
(type = block|cyclic|arbitrary)
--mail-type=type notify on state change: BEGIN, END, FAIL or ALL
--mail-user=user who to send email notification for job state
changes
--mcs-label=mcs mcs label if mcs plugin mcs/group is used
-n, --ntasks=ntasks number of tasks to run
--nice[=value] decrease scheduling priority by value
--no-requeue if set, do not permit the job to be requeued
--ntasks-per-node=n number of tasks to invoke on each node
-N, --nodes=N number of nodes on which to run (N = min[-max])
-o, --output=out file for batch script's standard output
-O, --overcommit overcommit resources
-p, --partition=partition partition requested
--parsable outputs only the jobid and cluster name (if present),
separated by semicolon, only on successful submission.
--power=flags power management options
--priority=value set the priority of the job to value
--profile=value enable acct_gather_profile for detailed data
value is all or none or any combination of
energy, lustre, network or task
--propagate[=rlimits] propagate all [or specific list of] rlimits
-q, --qos=qos quality of service
-Q, --quiet quiet mode (suppress informational messages)
--reboot reboot compute nodes before starting job
--requeue if set, permit the job to be requeued
-s, --oversubscribe over subscribe resources with other jobs
-S, --core-spec=cores count of reserved cores
--signal=[[R][B]:]num[@time] send signal when time limit within time seconds
--spread-job spread job across as many nodes as possible
--switches=max-switches{@max-time-to-wait}
Optimum switches and max time to wait for optimum
--thread-spec=threads count of reserved threads
-t, --time=minutes time limit
--time-min=minutes minimum time limit (if distinct)
--tres-per-task=list list of tres required per task
--uid=user_id user ID to run job as (user root only)
--use-min-nodes if a range of node counts is given, prefer the
smaller count
-v, --verbose verbose mode (multiple -v's increase verbosity)
-W, --wait wait for completion of submitted job
--wckey=wckey wckey to run job under
--wrap[=command string] wrap command string in a sh script and submit
Constraint options:
--cluster-constraint=[!]list specify a list of cluster constraints
--contiguous demand a contiguous range of nodes
-C, --constraint=list specify a list of constraints
-F, --nodefile=filename request a specific list of hosts
--mem=MB minimum amount of real memory
--mincpus=n minimum number of logical processors (threads)
per node
--reservation=name allocate resources from named reservation
--tmp=MB minimum amount of temporary disk
-w, --nodelist=hosts... request a specific list of hosts
-x, --exclude=hosts... exclude a specific list of hosts
Consumable resources related options:
--exclusive[=user] allocate nodes in exclusive mode when
cpu consumable resource is enabled
--exclusive[=mcs] allocate nodes in exclusive mode when
cpu consumable resource is enabled
and mcs plugin is enabled
--mem-per-cpu=MB maximum amount of real memory per allocated
cpu required by the job.
--mem >= --mem-per-cpu if --mem is specified.
Affinity/Multi-core options: (when the task/affinity plugin is enabled)
For the following 4 options, you are
specifying the minimum resources available for
the node(s) allocated to the job.
--sockets-per-node=S number of sockets per node to allocate
--cores-per-socket=C number of cores per socket to allocate
--threads-per-core=T number of threads per core to allocate
-B --extra-node-info=S[:C[:T]] combine request of sockets per node,
cores per socket and threads per core.
Specify an asterisk (*) as a placeholder,
a minimum value, or a min-max range.
--ntasks-per-core=n number of tasks to invoke on each core
--ntasks-per-socket=n number of tasks to invoke on each socket
--hint= Bind tasks according to application hints
(see "--hint=help" for options)
--mem-bind= Bind memory to locality domains (ldom)
(see "--mem-bind=help" for options)
GPU scheduling options:
--cpus-per-gpu=n number of CPUs required per allocated GPU
-G, --gpus=n count of GPUs required for the job
--gpu-bind=... task to gpu binding options
--gpu-freq=... frequency and voltage of GPUs
--gpus-per-node=n number of GPUs required per allocated node
--gpus-per-socket=n number of GPUs required per allocated socket
--gpus-per-task=n number of GPUs required per spawned task
--mem-per-gpu=n real memory required per allocated GPU
Help options:
-h, --help show this help message
--usage display brief usage message
Other options:
-V, --version output version information and exit
man
コマンドでご確認ください。7.2. ジョブを投入する(srun)¶
srun
は並列ジョブを実行するコマンドです。
書式
srun [OPTIONS(0)... [executable(0) [args(0)...]]] [ : [OPTIONS(N)...]] executable(N) [args(N)...]
コマンドの例(実行プログラムがa.outの場合)
[Login]$ srun a.out
主なオプションを以下に示します。
-J,
--job-name=<jobname>
|
ジョブの名前を指定します。指定した名前は、システムで実行中のジョブを照会するときに、ジョブID番号とともに表示されます。デフォルトは実行プログラムの名前です。
注意:ジョブ名に半角スペースは指定しないでください。
|
-p,
--partition=<partition_names>
|
リソース割り当てのために特定のキュー(パーティション)を指定します。 |
-c,
--cpus-per-task=<ncpus>
|
タスク(プロセス)ごとに割り当てるCPUを指定します。 |
-n,
--ntasks=<number>
|
実行するタスク数を指定します。デフォルトはノードごとに1タスク(プロセス)です。 |
-o,
--output=<filename pattern>
|
標準出力を<filename pattern>に書き込むように指定します。デフォルトの対話モードでは、全てのタスクの標準出力を端末に返します。
-e を指定していない場合、標準出力と標準エラー出力の両方がここで指定された<filename pattern>に書き込まれます。 |
-e,
--error=<filename pattern>
|
標準エラー出力を<filename pattern>に書き込むように指定します。デフォルトの対話モードでは、標準エラー出力は標準出力と同じファイルにリダイレクトされます。 |
--mem=<size[units]>
|
割り当てるメモリ量を指定します。デフォルトの単位はMBです。単位はK,M,G,Tが使用できます。
(例)10GBを指定する場合
srun -p ppmq -N 1 --mem=10G --time=00:05:00 --pty bash -i
|
GPUを利用する場合の主なオプションを以下に示します。
--gpus |
ジョブごとに必要なGPU数を指定します。
例:--gpus=1
|
--gpus-per-node |
ノードごとに必要なGPU数を指定します。 |
--gpus-per-task |
タスクごとに必要なGPU数を指定します。ジョブにタスク数を指定する必要があります。 |
詳細なオプションを以下に示します。
[Login]$ srun --help
Usage: srun [OPTIONS(0)... [executable(0) [args(0)...]]] [ : [OPTIONS(N)...]] executable(N) [args(N)...]
Parallel run options:
-A, --account=name charge job to specified account
--acctg-freq=<datatype>=<interval> accounting and profiling sampling
intervals. Supported datatypes:
task=<interval> energy=<interval>
network=<interval> filesystem=<interval>
--bb=<spec> burst buffer specifications
--bbf=<file_name> burst buffer specification file
--bcast=<dest_path> Copy executable file to compute nodes
--bcast-exclude=<paths> Shared object directory paths to exclude
-b, --begin=time defer job until HH:MM MM/DD/YY
-c, --cpus-per-task=ncpus number of cpus required per task
--comment=name arbitrary comment
--compress[=library] data compression library used with --bcast
--container Path to OCI container bundle
--container-id OCI container ID
--cpu-freq=min[-max[:gov]] requested cpu frequency (and governor)
-d, --dependency=type:jobid[:time] defer job until condition on jobid is satisfied
--deadline=time remove the job if no ending possible before
this deadline (start > (deadline - time[-min]))
--delay-boot=mins delay boot for desired node features
-D, --chdir=path change remote current working directory
--export=env_vars|NONE environment variables passed to launcher with
optional values or NONE (pass no variables)
-e, --error=err location of stderr redirection
--epilog=program run "program" after launching job step
-E, --preserve-env env vars for node and task counts override
command-line flags
--gres=list required generic resources
--gres-flags=opts flags related to GRES management
-H, --hold submit job in held state
-i, --input=in location of stdin redirection
-I, --immediate[=secs] exit if resources not available in "secs"
--jobid=id run under already allocated job
-J, --job-name=jobname name of job
-k, --no-kill do not kill job on node failure
-K, --kill-on-bad-exit kill the job if any task terminates with a
non-zero exit code
-l, --label prepend task number to lines of stdout/err
-L, --licenses=names required license, comma separated
-M, --clusters=names Comma separated list of clusters to issue
commands to. Default is current cluster.
Name of 'all' will submit to run on all clusters.
NOTE: SlurmDBD must up.
-m, --distribution=type distribution method for processes to nodes
(type = block|cyclic|arbitrary)
--mail-type=type notify on state change: BEGIN, END, FAIL or ALL
--mail-user=user who to send email notification for job state
changes
--mcs-label=mcs mcs label if mcs plugin mcs/group is used
--mpi=type type of MPI being used
--multi-prog if set the program name specified is the
configuration specification for multiple programs
-n, --ntasks=ntasks number of tasks to run
--nice[=value] decrease scheduling priority by value
--ntasks-per-node=n number of tasks to invoke on each node
-N, --nodes=N number of nodes on which to run (N = min[-max])
-o, --output=out location of stdout redirection
-O, --overcommit overcommit resources
--overlap Allow other steps to overlap this step
--het-group=value hetjob component allocation(s) in which to launch
application
-p, --partition=partition partition requested
--power=flags power management options
--priority=value set the priority of the job to value
--prolog=program run "program" before launching job step
--profile=value enable acct_gather_profile for detailed data
value is all or none or any combination of
energy, lustre, network or task
--propagate[=rlimits] propagate all [or specific list of] rlimits
--pty[=fd] run task zero in pseudo terminal [or in requested terminal given by fd]
--quit-on-interrupt quit on single Ctrl-C
-q, --qos=qos quality of service
-Q, --quiet quiet mode (suppress informational messages)
--reboot reboot block before starting job
-r, --relative=n run job step relative to node n of allocation
-s, --oversubscribe over-subscribe resources with other jobs
-S, --core-spec=cores count of reserved cores
--send-libs[=yes|no] autodetect and broadcast shared objects
--signal=[R:]num[@time] send signal when time limit within time seconds
--slurmd-debug=level slurmd debug level
--spread-job spread job across as many nodes as possible
--switches=max-switches{@max-time-to-wait}
Optimum switches and max time to wait for optimum
--task-epilog=program run "program" after launching task
--task-prolog=program run "program" before launching task
--thread-spec=threads count of reserved threads
-T, --threads=threads set srun launch fanout
-t, --time=minutes time limit
--time-min=minutes minimum time limit (if distinct)
--tres-per-task=list list of tres required per task
-u, --unbuffered do not line-buffer stdout/err
--use-min-nodes if a range of node counts is given, prefer the
smaller count
-v, --verbose verbose mode (multiple -v's increase verbosity)
-W, --wait=sec seconds to wait after first task exits
before killing job
--wckey=wckey wckey to run job under
-X, --disable-status Disable Ctrl-C status feature
Constraint options:
--cluster-constraint=list specify a list of cluster-constraints
--contiguous demand a contiguous range of nodes
-C, --constraint=list specify a list of constraints
--mem=MB minimum amount of real memory
--mincpus=n minimum number of logical processors (threads)
per node
--reservation=name allocate resources from named reservation
--tmp=MB minimum amount of temporary disk
-w, --nodelist=hosts... request a specific list of hosts
-x, --exclude=hosts... exclude a specific list of hosts
-Z, --no-allocate don't allocate nodes (must supply -w)
Consumable resources related options:
--exact use only the resources requested for the step
(by default, all non-gres resources on each node
in the allocation will be used in the step)
--exclusive[=user] for job allocation, this allocates nodes in
in exclusive mode
for job steps, this is equivalent to --exact
--exclusive[=mcs] allocate nodes in exclusive mode when
cpu consumable resource is enabled
and mcs plugin is enabled (--exact implied)
or don't share CPUs for job steps
--mem-per-cpu=MB maximum amount of real memory per allocated
cpu required by the job.
--mem >= --mem-per-cpu if --mem is specified.
--resv-ports reserve communication ports
Affinity/Multi-core options: (when the task/affinity plugin is enabled)
For the following 4 options, you are
specifying the minimum resources available for
the node(s) allocated to the job.
--sockets-per-node=S number of sockets per node to allocate
--cores-per-socket=C number of cores per socket to allocate
--threads-per-core=T number of threads per core to allocate
-B --extra-node-info=S[:C[:T]] combine request of sockets per node,
cores per socket and threads per core.
Specify an asterisk (*) as a placeholder,
a minimum value, or a min-max range.
--ntasks-per-core=n number of tasks to invoke on each core
--ntasks-per-socket=n number of tasks to invoke on each socket
--cpu-bind= Bind tasks to CPUs
(see "--cpu-bind=help" for options)
--hint= Bind tasks according to application hints
(see "--hint=help" for options)
--mem-bind= Bind memory to locality domains (ldom)
(see "--mem-bind=help" for options)
GPU scheduling options:
--cpus-per-gpu=n number of CPUs required per allocated GPU
-G, --gpus=n count of GPUs required for the job
--gpu-bind=... task to gpu binding options
--gpu-freq=... frequency and voltage of GPUs
--gpus-per-node=n number of GPUs required per allocated node
--gpus-per-socket=n number of GPUs required per allocated socket
--gpus-per-task=n number of GPUs required per spawned task
--mem-per-gpu=n real memory required per allocated GPU
Help options:
-h, --help show this help message
--usage display brief usage message
Other options:
-V, --version output version information and exit
man
コマンドでご確認ください。7.3. ジョブをキャンセルする(scancel)¶
scancel
はジョブをキャンセルするコマンドです。
書式
scancel [OPTIONS...] [job_id[_array_id][.step_id]] [job_id[_array_id][.step_id]...]
コマンドの例(削除するジョブIDがxxxxxの場合)
[Login]$ scancel xxxxx
詳細なオプションを以下に示します。
[Login]$ scancel --help
Usage: scancel [OPTIONS] [job_id[_array_id][.step_id]]
-A, --account=account act only on jobs charging this account
-b, --batch signal batch shell for specified job
-c, --cron cancel an scrontab job
-f, --full signal batch shell and all steps for specified job
-H, --hurry avoid burst buffer stage out
-i, --interactive require response from user for each job
-M, --clusters clusters to issue commands to.
NOTE: SlurmDBD must be up.
-n, --name=job_name act only on jobs with this name
-p, --partition=partition act only on jobs in this partition
-Q, --quiet disable warnings
-q, --qos=qos act only on jobs with this quality of service
-R, --reservation=reservation act only on jobs with this reservation
--sibling=cluster_name remove an active sibling job from a federated job
-s, --signal=name | integer signal to send to job, default is SIGKILL
-t, --state=states act only on jobs in this state. Valid job
states are PENDING, RUNNING and SUSPENDED
-u, --user=user_name act only on jobs of this user
-V, --version output version information and exit
-v, --verbose verbosity level
-w, --nodelist act only on jobs on these nodes
--wckey=wckey act only on jobs with this workload
charactization key
Help options:
--help show this help message
--usage display brief usage message
man
コマンドでご確認ください。7.4. ジョブに関する情報を表示する(sstat)¶
sstat
は実行中のジョブのステータスを表示するコマンドです。
注意
自身のジョブのステータスのみ表示されます。
書式
sstat [OPTIONS...]
コマンドの例(ステータスを表示するジョブIDがxxxxxの場合)
[Login]$ sstat -j xxxxx -o AveCPU,JobID,AveRss
主なオプションを以下に示します。
-j,
--jobs
|
ステータスを表示するジョブIDを指定します。
このオプションは必須です。
|
-o,
--format, --fields
|
表示する項目を指定します。
表示できる項目は
-e または--helpformat で確認できます。項目の例:
・AveCPU:ジョブ内のすべてのタスクの平均CPU時間
・JobID:割り当てられたジョブID
・AveRSS:ジョブ内のすべてのタスクの平均物理メモリサイズ
|
詳細なオプションを以下に示します。
[Login]$ sstat --help
sstat [<OPTION>] -j <job(.stepid)>
Valid <OPTION> values are:
-a, --allsteps:
Print all steps for the given job(s) when no step is
specified.
-e, --helpformat:
Print a list of fields that can be specified with the
'--format' option
-h, --help: Print this description of use.
-i, --pidformat:
Predefined format to list the pids running for each
job step. (JobId,Nodes,Pids)
-j, --jobs:
Format is <job(.step)>. Stat this job step
or comma-separated list of job steps. This option is
required. The step portion will default to the lowest
numbered (not batch, extern, etc) step running if not
specified, unless the --allsteps flag is set where not
specifying a step will result in all running steps
to be displayed. A step id of 'batch' will display the
information about the batch step. A step id of 'extern'
will display the information about the extern step
when using PrologFlags=contain.
-n, --noheader:
No header will be added to the beginning of output.
The default is to print a header.
--noconvert: Don't convert units from their original type
(e.g. 2048M won't be converted to 2G).
-o, --format:
Comma separated list of fields. (use "--helpformat"
for a list of available fields).
-p, --parsable: output will be '|' delimited with a '|' at the end
-P, --parsable2: output will be '|' delimited without a '|' at the end
--usage: Display brief usage message.
-v, --verbose:
Primarily for debugging purposes, report the state of
various variables during processing.
-V, --version: Print version.
[Login]$ sstat -e
AveCPU AveCPUFreq AveDiskRead AveDiskWrite
AvePages AveRSS AveVMSize ConsumedEnergy
ConsumedEnergyRaw JobID MaxDiskRead MaxDiskReadNode
MaxDiskReadTask MaxDiskWrite MaxDiskWriteNode MaxDiskWriteTask
MaxPages MaxPagesNode MaxPagesTask MaxRSS
MaxRSSNode MaxRSSTask MaxVMSize MaxVMSizeNode
MaxVMSizeTask MinCPU MinCPUNode MinCPUTask
Nodelist NTasks Pids ReqCPUFreq
ReqCPUFreqMin ReqCPUFreqMax ReqCPUFreqGov TRESUsageInAve
TRESUsageInMax TRESUsageInMaxNode TRESUsageInMaxTask TRESUsageInMin
TRESUsageInMinNode TRESUsageInMinTask TRESUsageInTot TRESUsageOutAve
TRESUsageOutMax TRESUsageOutMaxNode TRESUsageOutMaxTask TRESUsageOutMin
TRESUsageOutMinNode TRESUsageOutMinTask TRESUsageOutTot
man
コマンドでご確認ください。7.5. ジョブのアカウンティング情報を表示する(sacct)¶
sacct
はジョブのアカウンティング情報を表示するコマンドです。
注意
自身のジョブのアカウンティング情報のみ表示されます。
書式
sacct [OPTIONS...]
コマンドの例(yyyy/mm/dd~YYYY/MM/DDに開始・終了したジョブのアカウンティング情報を表示する場合)
[Login]$ sacct -S yyyy-mm-dd -E YYYY-MM-DD
主なオプションを以下に示します。
-S,
--starttime
|
指定された時間以降の任意の状態のジョブを指定します。
デフォルトでは00:00:00が指定されます。
フォーマットの例は以下の通りです。
・HH:MM[:SS][AM|PM]
・MMDD[YY][-HH:MM[:SS]]
・MM.DD[.YY][-HH:MM[:SS]]
・MM/DD[/YY][-HH:MM[:SS]]
・YYYY-MM-DD[THH:MM[:SS]]
|
-E end_time,
--endtime=end_time
|
指定された時間以前の任意の状態のジョブを指定します。
デフォルトでは00:00:00が指定されます。
フォーマットの例は以下の通りです。
・HH:MM[:SS][AM|PM]
・MMDD[YY][-HH:MM[:SS]]
・MM.DD[.YY][-HH:MM[:SS]]
・MM/DD[/YY][-HH:MM[:SS]]
・YYYY-MM-DD[THH:MM[:SS]]
|
-o,
--format
|
表示させる項目を指定します。
複数の項目を指定する場合はカンマで区切ってください。
使用可能な項目は
-e または--helpformat を使用してください。 |
詳細なオプションを以下に示します。
[Login]$ sacct --help
sacct [<OPTION>]
Valid <OPTION> values are:
-a, --allusers:
Display jobs for all users. By default, only the
current user's jobs are displayed. If ran by user root
this is the default.
-A, --accounts:
Use this comma separated list of accounts to select jobs
to display. By default, all accounts are selected.
--array:
Expand job arrays. Display array tasks on separate lines
instead of consolidating them to a single line.
-b, --brief:
Equivalent to '--format=jobstep,state,error'.
-B, --batch-script:
Print batch script of job.
NOTE: AccountingStoreFlags=job_script is required for this
NOTE: Requesting specific job(s) with '-j' is required
for this.
-c, --completion: Use job completion instead of accounting data.
--delimiter:
ASCII characters used to separate the fields when
specifying the -p or -P options. The default delimiter
is a '|'. This options is ignored if -p or -P options
are not specified.
-D, --duplicates:
If Slurm job ids are reset, some job numbers may
appear more than once referring to different jobs.
Without this option only the most recent jobs will be
displayed.
-e, --helpformat:
Print a list of fields that can be specified with the
'--format' option
-E, --endtime:
Select jobs eligible before this time. If states are
given with the -s option return jobs in this state before
this period.
--env-vars:
Print the environment to launch the batch script of job.
NOTE: AccountingStoreFlags=job_env is required for this
NOTE: Requesting specific job(s) with '-j' is required
for this.
--federation: Report jobs from federation if a member of a one.
-f, --file=file:
Read data from the specified file, rather than Slurm's
current accounting log file. (Only appliciable when
running the jobcomp/filetxt plugin.)
-g, --gid, --group:
Use this comma separated list of gids or group names
to select jobs to display. By default, all groups are
selected.
-h, --help: Print this description of use.
-i, --nnodes=N:
Return jobs which ran on this many nodes (N = min[-max])
-I, --ncpus=N:
Return jobs which ran on this many cpus (N = min[-max])
-j, --jobs:
Format is <job(.step)>. Display information about this
job or comma-separated list of jobs. The default is all
jobs. Adding .step will display the specific job step of
that job. (A step id of 'batch' will display the
information about the batch step.)
--json:
Produce JSON output
-k, --timelimit-min:
Only send data about jobs with this timelimit.
If used with timelimit_max this will be the minimum
timelimit of the range. Default is no restriction.
-K, --timelimit-max:
Ignored by itself, but if timelimit_min is set this will
be the maximum timelimit of the range. Default is no
restriction.
--local Report information only about jobs on the local cluster.
Overrides --federation.
-l, --long:
Equivalent to specifying
'--format=jobid,jobidraw,jobname,partition,maxvmsize,
maxvmsizenode,maxvmsizetask,avevmsize,maxrss,
maxrssnode,maxrsstask,averss,maxpages,
maxpagesnode,maxpagestask,avepages,mincpu,
mincpunode,mincputask,avecpu,ntasks,alloccpus,
elapsed,state,exitcode,avecpufreq,reqcpufreqmin,
reqcpufreqmax,reqcpufreqgov,reqmem,
consumedenergy,maxdiskread,maxdiskreadnode,
maxdiskreadtask,avediskread,maxdiskwrite,
maxdiskwritenode,maxdiskwritetask,avediskwrite,
reqtres,alloctres,
tresusageinave,tresusageinmax,tresusageinmaxn,
tresusageinmaxt,tresusageinmin,tresusageinminn,
tresusageinmint,tresusageintot,tresusageoutmax,
tresusageoutmaxn,tresusageoutmaxt,
tresusageoutave,tresusageouttot
-L, --allclusters:
Display jobs ran on all clusters. By default, only jobs
ran on the cluster from where sacct is called are
displayed.
-M, --clusters:
Only send data about these clusters. Use "all" for all
clusters.
-n, --noheader:
No header will be added to the beginning of output.
The default is to print a header.
--noconvert:
Don't convert units from their original type
(e.g. 2048M won't be converted to 2G).
-N, --nodelist:
Display jobs that ran on any of these nodes,
can be one or more using a ranged string.
--name:
Display jobs that have any of these name(s).
-o, --format:
Comma separated list of fields. (use "--helpformat"
for a list of available fields).
-p, --parsable: output will be '|' delimited with a '|' at the end
-P, --parsable2: output will be '|' delimited without a '|' at the end
-q, --qos:
Only send data about jobs using these qos. Default is all.
-r, --partition:
Comma separated list of partitions to select jobs and
job steps from. The default is all partitions.
-s, --state:
Select jobs based on their current state or the state
they were in during the time period given: running (r),
completed (cd), failed (f), timeout (to), resizing (rs),
deadline (dl) and node_fail (nf).
-S, --starttime:
Select jobs eligible after this time. Default is
00:00:00 of the current day, unless '-s' is set then
the default is 'now'.
-T, --truncate:
Truncate time. So if a job started before --starttime
the start time would be truncated to --starttime.
The same for end time and --endtime.
-u, --uid, --user:
Use this comma separated list of uids or user names
to select jobs to display. By default, the running
user's uid is used.
--units=[KMGTP]:
Display values in specified unit type. Takes precedence
over --noconvert option.
--usage: Display brief usage message.
-v, --verbose:
Primarily for debugging purposes, report the state of
various variables during processing.
-V, --version: Print version.
-W, --wckeys:
Only send data about these wckeys. Default is all.
--whole-hetjob[=yes|no]:
If set to 'yes' (or no argument), then information about
all the heterogeneous components will be retrieved. If
set to 'no' only the specific filtered components will
be retrieved. The default behavior without this option is
that all components are retrieved only if filtering the
leader component with --jobs.
-x, --associations:
Only send data about these association id. Default is all.
-X, --allocations:
Only show statistics relevant to the job allocation
itself, not taking steps into consideration.
--yaml:
Produce YAML output
Note, valid start/end time formats are...
HH:MM[:SS] [AM|PM]
MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
MM/DD[/YY]-HH:MM[:SS]
YYYY-MM-DD[THH:MM[:SS]]
now[{+|-}count[seconds(default)|minutes|hours|days|weeks]]
man
コマンドでご確認ください。7.6. ジョブキューの状態を表示する (squeue)¶
squeue
はスケジュールされているジョブ情報を表示するコマンドです。
書式
squeue [OPTIONS...]
コマンドの例
[Login]$ squeue
主なオプションを以下に示します。
-O <output_format>,
--Format=<output_format>
|
表示する情報を指定します。
デフォルトの表示は以下の通りです。
・JOBID:割り当てられたジョブID
・PARTITION:ジョブを投入したキュー
・NAME:ジョブ名
・USER:ジョブを投入したユーザ名
・ST:ジョブの状態
・TIME:ジョブの実行時間
・NODES:ジョブに割り当てられたノード数
・NODELIST(REASON):ジョブに割り当てられたノードのリスト
|
主なST(ジョブの状態)を以下に示します。下記以外のSTの詳細は マニュアル を参照してください。
PD(PENDING): ジョブはリソースの割り当てを待っています
R (RUNNING): ジョブは実行中です
S (SUSPENDED): ジョブは割り当てられていますが、実行が一時停止されています
CG(COMPLETING): ジョブは完了処理中です。一部のプロセスはまだアクティブである可能性があります
CD(COMPLETED): ジョブは全ノード上の全プロセスが完了しています
詳細なオプションを以下に示します。
[Login]$ squeue --help
Usage: squeue [OPTIONS]
-A, --account=account(s) comma separated list of accounts
to view, default is all accounts
-a, --all display jobs in hidden partitions
--federation Report federated information if a member
of one
-h, --noheader no headers on output
--hide do not display jobs in hidden partitions
-i, --iterate=seconds specify an interation period
-j, --job=job(s) comma separated list of jobs IDs
to view, default is all
--json Produce JSON output
--local Report information only about jobs on the
local cluster. Overrides --federation.
-l, --long long report
-L, --licenses=(license names) comma separated list of license names to view
-M, --clusters=cluster_name cluster to issue commands to. Default is
current cluster. cluster with no name will
reset to default. Implies --local.
-n, --name=job_name(s) comma separated list of job names to view
--noconvert don't convert units from their original type
(e.g. 2048M won't be converted to 2G).
-o, --format=format format specification
-O, --Format=format format specification
-p, --partition=partition(s) comma separated list of partitions
to view, default is all partitions
-q, --qos=qos(s) comma separated list of qos's
to view, default is all qos's
-R, --reservation=name reservation to view, default is all
-r, --array display one job array element per line
--sibling Report information about all sibling jobs
on a federated cluster. Implies --federation.
-s, --step=step(s) comma separated list of job steps
to view, default is all
-S, --sort=fields comma separated list of fields to sort on
--start print expected start times of pending jobs
-t, --states=states comma separated list of states to view,
default is pending and running,
'--states=all' reports all states
-u, --user=user_name(s) comma separated list of users to view
--name=job_name(s) comma separated list of job names to view
-v, --verbose verbosity level
-V, --version output version information and exit
-w, --nodelist=hostlist list of nodes to view, default is
all nodes
--yaml Produce YAML output
Help options:
--help show this help message
--usage display a brief summary of squeue options
man
コマンドでご確認ください。7.7. 計算ノードの状態を表示する (sinfo)¶
sinfo
はノードおよびキュー情報を表示するコマンドです。
書式
sinfo [OPTIONS...]
コマンドの例
[Login]$ sinfo
主なオプションを以下に示します。
-o <output_format>,
--format=<output_format>
|
表示する情報を指定します。
デフォルトの表示は以下の通りです。
・PARTITION:キュー名(パーティション名)
・AVAIL:キュー(パーティション)の状態
・UP:新しいジョブをキュー可能、ノード割り当て可能
・DOWN:新しいジョブをキュー可能、ノード割り当て”不可”
・DRAIN:新しいジョブをキュー”不可”
・INACTIVE:新しいジョブをキュー”不可”、ノード割り当て”不可
・TIMELIMIT:ジョブの最大使用時間(形式:hours:minutes:seconds)
・NODES:ノード数
・STATE:ノードの状態
・NODELIST:ノードの一覧
|
AVAIL(パーティションの状態)を以下に示します。詳細は マニュアル を参照してください。
UP: 新しいジョブをパーティションでキューに入れることができ、ジョブにノードを割り当ててパーティションから実行できます。
DOWN: 新しいジョブをパーティションでキューに入れることができますが、キューに入れられたジョブにノードを割り当ててパーティションから実行することはできません。パーティションですでに実行されているジョブは引き続き実行されます。
DRAIN: パーティションで新しいジョブをキューに入れることはできません。パーティションですでにキューに入れられているジョブはノードを割り当てて実行できます。
INACTIVE: パーティションで新しいジョブをキューに入れることはできず、すでにキューに入れられているジョブは実行されない可能性がありあます。
主なSTATE(ノードの状態)を以下に示します。詳細および下記以外のSTATEは マニュアル を参照してください。
IDLE: ノードはどのジョブにも割り当てられておらず、使用可能です
ALLOCATED: ノードは1つ以上のジョブに割り当てられています
DOWN: ノードは使用できません
MAINT: メンテナンス中です
詳細なオプションを以下に示します。
[Login]$ sinfo --help
Usage: sinfo [OPTIONS]
-a, --all show all partitions (including hidden and those
not accessible)
-d, --dead show only non-responding nodes
-e, --exact group nodes only on exact match of configuration
--federation Report federated information if a member of one
-F, --future Report information about nodes in "FUTURE" state.
-h, --noheader no headers on output
--hide do not show hidden or non-accessible partitions
-i, --iterate=seconds specify an iteration period
--json Produce JSON output
--local show only local cluster in a federation.
Overrides --federation.
-l, --long long output - displays more information
-M, --clusters=names clusters to issue commands to. Implies --local.
NOTE: SlurmDBD must be up.
-n, --nodes=NODES report on specific node(s)
--noconvert don't convert units from their original type
(e.g. 2048M won't be converted to 2G).
-N, --Node Node-centric format
-o, --format=format format specification
-O, --Format=format long format specification
-p, --partition=PARTITION report on specific partition
-r, --responding report only responding nodes
-R, --list-reasons list reason nodes are down or drained
-s, --summarize report state summary only
-S, --sort=fields comma separated list of fields to sort on
-t, --states=node_state specify the what states of nodes to view
-T, --reservation show only reservation information
-v, --verbose verbosity level
-V, --version output version information and exit
--yaml Produce YAML output
Help options:
--help show this help message
--usage display brief usage message
man
コマンドでご確認ください。7.8. ジョブが割り当てられたノードへファイルを転送する (sbcast)¶
sbcast
はジョブに割り当てられたノードにファイルを送信するコマンドです。
書式
コマンドの例
[PP]$ sbcast sample.txt /tmp/sample.txt
主なオプションを以下に示します。
-f,
--force
|
転送先に既にファイルが存在する場合、上書きします。
|
詳細なオプションを以下に示します。
[Login]$ sbcast --help
Usage: sbcast [OPTIONS] SOURCE DEST
-C, --compress[=lib] compress the file being transmitted
--exclude=<path_list> shared object paths to be excluded
-f, --force replace destination file as required
-F, --fanout=num specify message fanout
-j, --jobid=#[+#][.#] specify job ID with optional hetjob offset and/or step ID
-p, --preserve preserve modes and times of source file
--send-libs[=yes|no] autodetect and broadcast executable's shared objects
-s, --size=num block size in bytes (rounded off)
-t, --timeout=secs specify message timeout (seconds)
-v, --verbose provide detailed event logging
-V, --version print version information and exit
Help options:
--help show this help message
--usage display brief usage message
man
コマンドでご確認ください。