MPIEXEC.SLURM(1)

πŸ’– MPIEXEC.SLURM(1) πŸ’–

okay so bestie, welcome to the User Contributed Perl Documentation corner of the man pages, where we talk about mpiexec.slurm β€” the lil script that runs your MPI program under Slurm. get comfy, grab a boba, we're doing this together πŸ§‹βœ¨


🌸 NAME 🌸

mpiexec.slurm β€” run an MPI program under Slurm 🫢


✨ SYNOPSIS ✨

mpiexec.slurm args executable pgmargs

where args are command line arguments for mpiexec (see below), executable is the name of the executable and pgmargs are command line arguments for the executable. so it's literally: flags, then the program, then the program's own args. easy. πŸ’…

for example, this command will run the MPI program a.out on 4 processes:

mpiexec.slurm -n 4 a.out

mpiexec.slurm supports the following options, here they are in all their glory, no cap:

[-n nprocs]
[-host hostname]
[-verbose]
[-nostdin]
[-allstdin]
[-nostdout]
[-pernode]
[-config config_file]
[-help|-?]
[-man]

πŸ¦‹ DESCRIPTION πŸ¦‹

The mpiexec.slurm

okay so bestie β€” the description section literally just says "The mpiexec.slurm" and then stops. that's it. that's the whole vibe. i'm not gonna invent lore for it, i'm just reporting what the page says πŸ™ˆ the real tea is all in the options below, so scroll on down πŸ’–

πŸ’… OPTIONS πŸ’…

  • -n <np> β€” specify the number of processes to use. that's your process count, queen πŸ‘‘
  • -host hostname β€” the name of the host on which to run processes.
  • -verbose β€” crank up the verbosity of mpiexec.slurm informational messages. and the way stacking works?? multiple -verbose's will further increase mpiexec.slurm's verbosity. by default, only errors will be displayed. so one -verbose is a lil chatty, two is yapping, you get the picture πŸ—£οΈβœ¨
  • -nostdin β€” do not connect the standard input stream of process 0 to the mpiexec process. if the process attempts to read from stdin, it will see an end-of-file. so like, it goes to read and gets… nothing. ghosted fr πŸ’€
  • -allstdin β€” send the standard input stream of mpiexec.slurm to all processes. each character typed to mpiexec (or read from a file) is duplicated numproc times, and sent to each process. this permits every process to read, for example, configuration information from the input stream. sharing is caring babes 🫢
  • -nostdout β€” do not connect the standard output and error streams of each process back to the mpiexec.slurm process. standard output and error will be respectively written in files of the form job.ojobid and job.ejobid for batch jobs, and directly to the controlling terminal for interactive jobs. so your output goes into files instead of coming back to you β€” very "i'll text you later" energy πŸ“
  • -pernode β€” allocate only one process per compute node. for SMP nodes, only one processor will be allocated a job. this flag is used to implement multiple level parallelism with MPI between nodes, and threads within a node, assuming the code is set up to do that. (that "assuming the code is set up to do that" is doing a lot of heavy lifting, love that for us 😭)
  • -config <config_file> β€” process executable and arguments are specified in the given configuration file. this flag permits the use of heterogeneous jobs using multiple executables. no executable is given on the command line when using the -config flag. if config_file is -, then the configuration is read from standard input. in this case the flag -nostdin is mandatory, as it is not possible to separate the contents of the configuration file from process input. ⚠️ the config_file can contain lines beginning with #, that are considered comments and ignored and and one or more lines with the following format:
-n XX : executable [args]

where XX is the number of processes to be used, executable is the name of the program to run and args are its arguments. for example:

# Sample mpiexec config file
# Launch two instance of foo
-n 2 : foo
# and three instances of bar
-n 3 bar
heads up bestie: there is no support for hostname task layout in a config file at the moment. periodt. 🚫
  • -help|-? β€” display a brief help page. she's helpful AND she's brief, iconic πŸ’–

🌈 SEE ALSO 🌈

(ngl, the original page doesn't list one, so there's nothing to reference here β€” i'm not gonna make stuff up, that's not the vibe πŸ™ˆ)


and that's the whole page, bestie!! every flag, every default, every file name, everything β€” all of it, untouched, just with better energy πŸ’œ

this one came from perl v5.42.3, dated 2026-09-17, and it's filed under MPIEXEC.SLURM(1) in the User Contributed Perl Documentation section. slay, go run something on 4 processes for me βœ¨πŸŽ€

πŸ“¦ where this page comes from