SLURM Reference Manual for HP XC System Software

Multiple Program Usage
Strategy.
SRUN's --multi-prog option (see SRUN Resource-Allocation Options above (page 22)) lets you assign to
each parallel task in your job a different program with (if you wish) a different argument.
If you invoke --multi-prog, then SRUN's own argument is not the name of one executable program (as
usual) but rather the name of a local conguration le that species how to assign multiple programs and
arguments among your job's tasks. For example,
srun -n8 -l --multi-prog test.config
(where -l here labels each task's output by task number for clarity).
Conguration File.
Each row in an SRUN --multi-prog conguration le contains these three ordered elds, separated by
blanks:
Task number species by a comma-delimited series of nonnegative integers the specic tasks
congured on this row, with ranges specied by hyphens (for instance: 2,4-8,10,12).
Star (*) species all tasks, which of course defeats the point of invoking --multi-prog.
Executable le assigns to this row's tasks the specied program to execute (may be an absolute
pathname if you wish, such as /usr/bin/spell).
Argument assigns to this row's program the argument(s) listed. You can parameterize the
argument(s) by including either of these special expressions:
%t evaluates to the task number of the responsible task.
%o (lowercase oh) evaluates to the task offset, that is, to the task's
relative position within the task range congured on this row (always
starts with zero).
Example Usage.
Here is a sample --multi-prog conguration le to illustrate the above features:
4-6 hostname
1,7 echo task:%t
0,2,3 echo task:%o
Here is the output of using the SRUN execute line shown above with this le serving as test.cong (and
run on machine ALC):
SLURM Reference Manual - 44