README file for ssh-spawner
================================
Paul H. Hargrove <PHHargrove@lbl.gov>
$Revision: 1.5 $

See vapi-conduit for an example of how to use this code in a conduit.

Configure options:
  --{en,dis}able-ssh-prctl (disabled by default)
  On Linux, it is possible to request a signal be delivered to a
  process when its parent process dies.  This can be used by the
  ssh-based spawner to reduce the possibility of orphan (run away)
  processes in certain abnormal termination scenarios.  
  Because there are versions of Linux on which use of this option
  can lock up the machine (as the result of a kernel bug), this
  option is disabled by default.

When using the ssh-spawner, the following apply:

+ usage summary:
    your_app [-v] N[:M] [--] [args ...]
  where N is the number of processes to run, and M is the number of
  nodes/hosts over which the processes will be distributed.  If only
  N is given, then M=N by default.
  If running a UPC or Titanium application, then language-specific
  commands upcrun or tirun should be used instead.

+ A list of hosts is specified using either the GASNET_SSH_NODEFILE
  or GASNET_SSH_SERVERS environment variables.
  If set, the variable GASNET_SSH_NODEFILE specifies a file with one
  hostname per line.  Blank lines and comment lines (using '#') are
  ignored.
  If set, the variable GASNET_SSH_SERVERS itself contains a list of
  hostnames, delimited by commas or whitespace.
  If both are set, GASNET_SSH_NODEFILE takes precedence.
  Environment variables set by the PBS, LSF and SSS batch systems
  are also recognized if the GASNET_* variables are not set.
  Note that if starting a job via upcrun or tirun, these variables
  may be set for you from other sources.

+ The environment variable GASNET_SSH_CMD can be set to specify a
  specific remote shell (perhaps rsh), without arguments (see below).
  If the value does not begin with "/" then $PATH will be searched
  to resolve a full path.  The default value is "ssh".

+ The environment variable GASNET_SSH_OPTIONS can be set to
  specify options that will precede the hostname in the commands
  used to spawn jobs.  One example, for OpenSSH, would be
    GASNET_SSH_OPTIONS="-o 'StrictHostKeyChecking no'"
  The parsing of the value follows the same rules for quotes (both
  single and double) and backslash as most shells.

+ The environment variable GASNET_SSH_REMOTE_PATH can be set to
  specify the working directory (defaults to current).

+ Users of OpenSSH should NOT add "-f" to GASNET_SSH_OPTIONS.  Doing
  so causes the spawner to mistakenly believe that a process it
  spawned has exited.
  However, if agent forwarding or X11 forwarding are normally
  enabled in your configuration, "-a" and "-x" can be used with
  OpenSSH to disable them and speed the connection process (except
  where the agent forwarding is needed for authorization).

For the following, the term "compute node"  means one of the hosts
given by GASNET_SSH_NODEFILE or GASNET_SSH_SERVERS, which will run
an application process.  The term "master node" means the node from
which the job was spawned.  The master node may be one of the
compute nodes, but this is not required.

+ The ssh (or rsh) at your site must be configured to allow logins
  from the master node to compute nodes, and among the compute nodes.
  These must be achieved without interaction (such as entering a
  password or accepting new hostkeys).
  For OpenSSH users, the following options are used automatically
    "-o 'StrictHostKeyChecking no' -o 'BatchMode yes'"
  which should ensure that ssh does not try to prompt the user.

+ Any firewall or port filtering must allow the ssh/rsh connections
  described above, plus TCP connections on an "untrusted port" (ports
  with numbers over 1024) from a compute node to the master node and
  and among compute nodes.

+ Resolution for all given hostnames must be possible from both the
  master node and the compute nodes.
