pbsrun_wrap(8B)

NAME
pbsrun_wrap - 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. The pbsrun_wrap script creates a symbolic link with the same path and name as the mpirun being wrapped. This 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. Using pbsrun_wrap with Intel MPI is deprecated as of 13.0.

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:
    Save original mpirun.ch_gm script:

        mv  /opt/mpich-gm/bin/mpirun.ch_gm
            /opt/mpich/gm/bin/mpirun.ch_gm.actual

    Instantiate pbsrun wrapper script as pbsrun.ch_gm:

        cp  $PBS_EXEC/bin/pbsrun $PBS_EXEC/bin/pbsrun.ch_gm

    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

    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 thev nodes in the PBS complex.

SEE ALSO
The PBS Professional Administrator's Guide

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