You are here: Appendices > Prologue and Epilogue Scripts

G.1 Prologue and Epilogue Scripts

Torque provides administrators the ability to run scripts before and/or after each job executes. With such a script, a site can prepare systems, perform node health checks, prepend and append text to output and error log files, cleanup systems, and so forth.

The following table shows which MOM runs which script. All scripts must be in the TORQUE_HOME/mom_priv/ directory and be available on every compute node. The "Mother Superior" is the pbs_mom on the first node allocated for a job. While it is technically a sister node, it is not a "Sister" for the purposes of the following table.

The initial working directory for each script is TORQUE_HOME/mom_priv/.

Script Execution location Script Location Execute as File permissions
Prologue Scripts
presetup.prologue Mother Superior 8th argument root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
prologue

Mother Superior

8th argument root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
prologue.parallel Sister --- root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
prologue.user

Mother Superior

--- user Readable and executable by root and other (e.g., -r-x---r-x)
prologue.user.parallel Sister --- user Readable and executable by root and other (e.g., -r-x---r-x)
Epilogue Scripts
epilogue

Mother Superior

11th argument root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
epilogue.parallel Sister --- root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
epilogue.precancel

Mother Superior

This script runs after a job cancel request is received from pbs_server and before a kill signal is sent to the job process.

--- user Readable and executable by root and other (e.g., -r-x---r-x)
epilogue.user

Mother Superior

--- user Readable and executable by root and other (e.g., -r-x---r-x)
epilogue.user.parallel Sister --- user Readable and executable by root and other (e.g., -r-x---r-x)

epilogue.parallel is available in version 2.1 and later.

This section contains these topics:

© 2017 Adaptive Computing