srun --multi-prog

This srun option is intended for use with MPMD (multiple program multiple data) MPI programs. In other words, tasks run different executables rather than the more typical single executable model (SPMD = single program multiple data).

Usage:

--multi-prog config_file_name
where config_file_name is the actual name of a user-created text file that describes which tasks run which executables with/without arguments. For example:
srun -n8 --multi-prog myrun.conf
Configuration file format:

Comments in the configuration file must have a "#" in column one. The configuration file contains the following fields separated by white space:

Example configuration file:

###################################################################
# srun multiple program configuration file
#
# srun -n8 -l --multi-prog myrun.conf
###################################################################
4-6       hostname
1,7       echo  task:%t
0,2-3     echo  offset:%o
Example output:
% srun -n8 -l --multi-prog myrun.conf
0: offset:0
1: task:1
2: offset:1
3: offset:2
4: linux15.llnl.gov
5: linux16.llnl.gov
6: linux17.llnl.gov
7: task:7