[torqueusers] command line parameters

Garrick Staples garrick at clusterresources.com
Thu Oct 19 23:50:31 MDT 2006

Ripped from http://www.osc.edu/~pw/pbs/

    * --enable-shell-pipe: The _name_ of the shell script is written
into a pipe connected to standard input of the shell process. This
causes the shell (as specified by -S or passwd file) to spawn another
shell to run the actual script file. That spawning uses the standard
unix mechanism: check for #! on the first line, and if not, use /bin/sh.
Hence the user choice for shell via PBS -S option is ignored and shell
aliases and other non-environment settings are lost.
    * --disable-shell-pipe: The standard input of the shell is connected
to the script file. This is better because then the invoked shell will
read commands out of the script file and execute them. It is bad,
however, if anything in the shell script tries to read from stdin since
it will see the command stream and move the shared file pointer for the
parent shell as well leading to corruption there. Running mpiexec codes
is one way to see it: mpiexec will read from stdin and ship it to
process #0 of the parallel task. This stdin is just the shell command
    * --enable-shell-use-argv: This new option added by pw invokes the
shell with a single command line argument, the script file. This seems
to be the best of both worlds in that only a single shell is used (no
need to execute the wrong subshell) and the user's preference is
honored, and commands are read from the script file and do not corrupt
stdin. There were concerns that with an argument on the command line
that the shell would not "act" like a login shell and miss reading some
environment or other settings, but on the clusters, csh and bash do the
right thing. 

More information about the torqueusers mailing list