pbsrun_wrap(8B)

πŸ“¦ version 23.06.06-unstable-2026-04, in nixos 26.05, nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, this is pbsrun_wrap(8B) β€” literally the general-purpose script for wrapping mpirun in pbsrun. 🫢

✨ SYNOPSIS ✨

pbsrun_wrap [-s] <path to actual mpirun> pbsrun.<mpirun version/flavor>

pbsrun_wrap --version

🌸 DESCRIPTION 🌸

The pbsrun_wrap script is used to wrap any of several versions of mpirun in pbsrun. It creates a symbolic link with the same path and name as the mpirun being wrapped. That link calls pbsrun, which uses pbs_attach to give MoM control of jobs. The result is transparent to the user; when mpirun is called from inside a PBS job, PBS can monitor and control the job, but when mpirun is called from outside of a PBS job, it behaves as it would normally. See the pbs_attach(8B) and pbsrun(8B) man pages.

Use pbsrun_unwrap to reverse the process.

Heads up: using pbsrun_wrap with Intel MPI is deprecated as of 13.0.
Linux only, bestie: this is available only under Linux.

πŸŽ€ USAGE πŸŽ€

Syntax:

pbsrun_wrap [-s] <path to actual mpirun> pbsrun.<mpirun version/flavor>

Any mpirun version/flavor that can be wrapped has an initialization script ending in .init, found in $PBS_EXEC/lib/MPI:

$PBS_EXEC/lib/MPI/pbsrun.<mpirun version/flavor>.init

The pbsrun_wrap script instantiates the pbsrun wrapper script as pbsrun.<mpirun version/flavor> in the same directory where pbsrun is located, and sets up the link to actual mpirun call via the symbolic link:

$PBS_EXEC/lib/MPI/pbsrun.<mpirun version/flavor>.link

For example, running:

pbsrun_wrap /opt/mpich-gm/bin/mpirun.ch_gm pbsrun.ch_gm

causes the following actions:

  1. Save original mpirun.ch_gm script:
mv  /opt/mpich-gm/bin/mpirun.ch_gm
    /opt/mpich/gm/bin/mpirun.ch_gm.actual
  1. Instantiate pbsrun wrapper script as pbsrun.ch_gm:
cp  $PBS_EXEC/bin/pbsrun $PBS_EXEC/bin/pbsrun.ch_gm
  1. Link "mpirun.ch_gm" to actually call "pbsrun.ch_gm":
ln -s $PBS_EXEC/bin/pbsrun.ch_gm /opt/mpich-gm/bin/mpirun.ch_gm
  1. Create a link so that "pbsrun.ch_gm" calls "mpirun.ch_gm.actual":
ln -s /opt/mpich-gm/bin/mpirun.ch_gm.actual
      $PBS_EXEC/lib/MPI/pbsrun.ch_gm.link

πŸ’… OPTIONS πŸ’…

  • -s β€” sets the "strict_pbs" options in the various initialization scripts (e.g. pbsrun.bgl.init, pbsrun.ch_gm.init, etc...) to 1 from the default 0. This means that the mpirun being wrapped by pbsrun will only be executed if inside a PBS environment. Otherwise, the user gets the error:
Not running under PBS exiting since strict_pbs is enabled; execute only in PBS
  • --version β€” the pbsrun_wrap command returns its PBS version information and exits. This option can only be used alone.

πŸ¦‹ REQUIREMENTS πŸ¦‹

The mpirun being wrapped must be installed and working on all the nodes in the PBS complex.

🌈 SEE ALSO 🌈

pbs_attach(8B), pbsrun(8B), pbsrun_unwrap(8B)


okay that’s the whole vibe πŸ’– this page’s footer energy is Local, dated 3 June 2020, for pbsrun_wrap(8B) β€” mwah, bestie πŸŽ€

πŸ“¦ where this page comes from