1sbcast(1)                       Slurm Commands                       sbcast(1)
2
3
4

NAME

6       sbcast - transmit a file to the nodes allocated to a Slurm job.
7
8

SYNOPSIS

10       sbcast [-CfFjpstvV] SOURCE DEST
11
12

DESCRIPTION

14       sbcast  is  used  to transmit a file to all nodes allocated to the cur‐
15       rently active Slurm job.  This command should  only  be  executed  from
16       within  a  Slurm  batch  job  or within the shell spawned after a Slurm
17       job's resource allocation.  SOURCE is the name of a file on the current
18       node.  DEST should be the fully qualified pathname for the file copy to
19       be created on each node.  If a fully qualified  pathname  is  not  pro‐
20       vided,  the  file  will  be  created  in the directory specified in the
21       BcastParameters parameter in the slurm.conf file (if available)  other‐
22       wise it will be created in the current working directory from which the
23       sbcast command is invoked.  DEST should be on a file  system  local  to
24       that  node.  Note that parallel file systems may provide better perfor‐
25       mance than sbcast can provide, although performance will vary  by  file
26       size, degree of parallelism, and network type.
27
28

OPTIONS

30       -C, --compress[=library]
31              Compress  the  file  being  transmitted.   The optional argument
32              specifies the data compression library to  be  used.   Supported
33              values  are  "lz4"  (default)  and "none".  Some compression li‐
34              braries may be unavailable on some systems.   The  default  com‐
35              pression library (and enabling compression itself) may be set in
36              the slurm.conf file using the BcastParameters option.
37
38       --exclude=<NONE|path1,...,pathN>
39              Comma-separated list of absolute directory paths to be  excluded
40              when autodetecting and broadcasting executable shared object de‐
41              pendencies. If the keyword "NONE" is  configured,  no  directory
42              paths  will be excluded. The default value is that of slurm.conf
43              BcastExclude and this option overrides it. See also --send-libs.
44
45       -F, --fanout=<number>
46              Specify the fanout of messages used for file transfer.   Maximum
47              value is currently eight.
48
49       -f, --force
50              If the destination file already exists, replace it.
51
52       -j, --jobid=<jobID[.stepID]>
53              Specify  the job ID to use with optional step ID.  If run inside
54              an allocation this is unneeded as the job ID will read from  the
55              environment.
56
57       -p, --preserve
58              Preserves  modification  times, access times, and modes from the
59              original file.
60
61       --send-libs[=yes|no]
62              If set to yes (or no argument), autodetect and broadcast the ex‐
63              ecutable's  shared  object  dependencies  to  allocated  compute
64              nodes. The files are placed in a directory  alongside  the  exe‐
65              cutable.  This  overrides  the  default  behavior  configured in
66              slurm.conf SbcastParameters send_libs. See also --exclude.
67
68       -s, --size=<size>
69              Specify the block size used for file broadcast.   The  size  can
70              have  a suffix of k or m for kilobytes or megabytes respectively
71              (defaults to bytes).  This size subject to  rounding  and  range
72              limits  to  maintain good performance.  The default value is the
73              file size or 8MB, whichever is smaller.  This value may need  to
74              be set on systems with very limited memory.
75
76       -t, --timeout=<seconds>
77              Specify  the  message  timeout in seconds.  The default value is
78              MessageTimeout as reported by "scontrol show config".  Setting a
79              higher  value may be necessitated by relatively slow I/O perfor‐
80              mance on the compute node disks.
81
82       -v, --verbose
83              Provide detailed event logging through program execution.
84
85       -V, --version
86              Print version information and exit.
87
88

PERFORMANCE

90       Executing sbcast sends a remote procedure call to slurmctld. If  enough
91       calls  from sbcast or other Slurm client commands that send remote pro‐
92       cedure calls to the slurmctld daemon come in at once, it can result  in
93       a  degradation of performance of the slurmctld daemon, possibly result‐
94       ing in a denial of service.
95
96       Do not run sbcast or other Slurm client commands that send remote  pro‐
97       cedure  calls  to  slurmctld  from loops in shell scripts or other pro‐
98       grams. Ensure that programs limit calls to sbcast to the minimum neces‐
99       sary for the information you are trying to gather.
100
101

ENVIRONMENT VARIABLES

103       Some  sbcast options may be set via environment variables.  These envi‐
104       ronment variables, along with their corresponding options,  are  listed
105       below.  (Note:  Command  line  options  will always override these set‐
106       tings.)
107
108       SBCAST_COMPRESS     -C, --compress
109
110       SBCAST_EXCLUDE      --exclude=<NONE|path1,...,pathN>
111
112       SBCAST_FANOUT       -F number, --fanout=number
113
114       SBCAST_FORCE        -f, --force
115
116       SBCAST_SEND_LIBS    --send-libs[=yes|no]
117
118       SBCAST_PRESERVE     -p, --preserve
119
120       SBCAST_SIZE         -s size, --size=size
121
122       SBCAST_TIMEOUT      -t seconds, --timeout=seconds
123
124       SLURM_CONF          The location of the Slurm configuration file.
125
126

AUTHORIZATION

128       When using SlurmDBD, users who have an AdminLevel defined (Operator  or
129       Admin) are given the authority to invoke sbcast on other users jobs.
130
131

EXAMPLES

133       Using  a  batch  script, transmit local file my.prog to /tmp/my.proc on
134       the local nodes and then execute it.
135
136       $ cat my.job
137       #!/bin/bash
138       sbcast my.prog /tmp/my.prog
139       srun /tmp/my.prog
140
141       $ sbatch --nodes=8 my.job
142       srun: jobid 12345 submitted
143
144

COPYING

146       Copyright (C) 2006-2010 The Regents of the  University  of  California.
147       Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
148       Copyright (C) 2010-2021 SchedMD LLC.
149
150       This  file  is  part  of Slurm, a resource management program.  For de‐
151       tails, see <https://slurm.schedmd.com/>.
152
153       Slurm is free software; you can redistribute it and/or modify it  under
154       the  terms  of  the GNU General Public License as published by the Free
155       Software Foundation; either version 2 of the License, or (at  your  op‐
156       tion) any later version.
157
158       Slurm  is  distributed  in the hope that it will be useful, but WITHOUT
159       ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY  or
160       FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU General Public License
161       for more details.
162
163

SEE ALSO

165       srun(1)
166
167
168
169February 2021                   Slurm Commands                       sbcast(1)
Impressum