APPSCHEMA(5)

πŸ’– APPSCHEMA(5) πŸ’– β€” the LAM application schema format, explained by your fave

okay so bestie, welcome to the LAM FILE FORMATS corner of the manual, and today's main character is appschema. it's giving "little text file, big responsibilities". let's go ✨


🌸 NAME 🌸

appschema β€” the LAM application schema format, fr fr πŸ’…


✨ SYNTAX ✨

like, this is the shape of it, no cap:

#
# comments
#
[<where>] [-np #] [-s <where>] [-wd <dir>] [-x <env>] <program> [<args>]
[<where>] [-np #] [-s <where>] [-wd <dir>] [-x <env>] <program> [<args>]
 ...

πŸ¦‹ DESCRIPTION πŸ¦‹

so the application schema is literally just an ASCII file that describes the programs making up an application. that's it. that's the vibe. πŸŽ€

it gets used by mpirun(1), MPI_Comm_spawn, and MPI_Comm_spawn_multiple to start an MPI application. (and psst β€” the MPI_Info key "file" can be used to point MPI_Comm_spawn and MPI_Comm_spawn_multiple at an app schema, iykyk πŸ‘€)

every single token after the program name gets passed as command line arguments to the new processes. and the ordering of all the other elements on the command line? not important. she does not care. πŸ’β€β™€οΈ

the meaning of the options is the same as in mpirun(1). go read the mpirun(1) man page for a whole lengthy discussion of the nomenclature used for <where> β€” it's a lot, but it's worth it. πŸ“š

⚠️ heads up though: if -wd is used in the application schema file, it will override any -wd value specified on the command line. she said "my house, my rules". periodt.

for each program line, processes will be created on LAM nodes according to the presence of <where> and the process count option (-np). here's the tea β˜•:

  • only <where> β€” one process is created on each node.
  • only -np β€” the specified number of processes are scheduled across all LAM nodes/CPUs.
  • both β€” the specified number of processes are scheduled across the specified</> nodes/CPUs.
  • neither β€” one process is created on the local node.

🧚 Program Transfer 🧚

by default, LAM searches for executable programs on the target node where a particular instantiation will run. standard behaviour, nothing wild. 🌈

but if the file system is not shared, and the target nodes are homogeneous, and the program is frequently recompiled β€” then it can be convenient to have LAM transfer the program from a source node (usually the local node) to each target node. 🚚✨

the -s option specifies this behaviour and identifies the single source node. one source node. singular. she's not sharing the spotlight. πŸ‘‘


πŸ“ EXAMPLE πŸ“

this is the whole thing verbatim, enjoy:

#
# Example application schema
# Note that it may be necessary to specify the entire pathname for
# "master" and "slave" if you get "File not found" errors from
# mpirun(1).
#
# This schema starts a "master" process on CPU 0 with the argument
# "42.0", and then 10 "slave" processes (that are all sent from the
# local node) scheduled across all available CPUs.
#
c0 master 42.0
C -np 10 -s h slave

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page bestie 🫢 this was LAM 7.1.4, dated July, 2007 β€” an absolute vintage icon, older than most of us and still serving πŸ’€πŸ’– mwah, go write some schemas, you're gonna slay 🌟