#
# Copyright 1998-1999, University of Notre Dame.
# Authors: Jeffrey M. Squyres, Kinis L. Meyer, with M. D. McNally 
#          and Andrew Lumsdaine
#
# This file is part of the Notre Dame LAM implementation of MPI.
#
# You should have received a copy of the License Agreement for the
# Notre Dame LAM implementation of MPI along with the software; see
# the file LICENSE.  If not, contact Office of Research, University of
# Notre Dame, Notre Dame, IN 46556.
#
# Permission to modify the code and to distribute modified code is
# granted, provided the text of this NOTICE is retained, a notice that
# the code was modified is included with the above COPYRIGHT NOTICE and
# with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
# file is distributed with the modified code.
#
# LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
# By way of example, but not limitation, Licensor MAKES NO
# REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
# PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
# OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
# OR OTHER RIGHTS.
#
# Additional copyrights may follow.
#
#
# ASCII help messages for LAM
#
-*-ALL:unknown-*-
# This is invoked when we have no idea what happened
# %1 = Name of the program
%1: Oops -- some unknown error happened here.  Not really sure what
happened to cause this.  

This might be helpful -- here's what Unix thinks the error is:

        %perror
-*-ALL:system-call-fail-*-
# Invoked when some system call fails.  This is not good!
# %1 = name of system call that failed
LAM encountered an error when invoking the system call "%1".

This is an unexpected error; we don't have much additional information
here.  Perhaps this Unix error message will help:

	% perror
-*-ALL:lib-call-fail-*-
# Invoked when some system call fails.  This is not good!
# %1 = name of system call that failed
LAM encountered an error when invoking the library call "%1".

This is an unexpected error; we don't have much additional information
here.  Perhaps this Unix error message will help:

	% perror
-*-ALL:deny-root-*-
# This message is displayed when any LAM program is invoked by root.
# No parameters are sent.
It is a Very Bad Idea to run this program as root.

LAM was designed to be run by individual users; it was *not* designed
to be run as a root-level service where multiple users use the same
LAM daemons in a client-server fashion.

Especially with today's propensity for hackers to scan for root-owned
network daemons, it could be tragic to run this program as root.
While LAM is known to be quite stable, and LAM does not leave network
sockets open for random connections after the initial setup, several
factors should strike fear into system administrator's hearts if LAM
were to be constantly running for all users to utilize:

	1. LAM leaves a unix domain socket open on each machine in the
	   /tmp directory.  So if someone breaks into root on one
	   machine, they effectively have root on all machines that
	   are connected via LAM.  

	2. Indeed, there must have been a .rhosts (or some other trust
	   mechanism) for root which must have allowed you to run LAM
	   on remote nodes.  Depending on your local setup, this may
	   not be safe.

	3. LAM has never been checked for buffer overflows and other
	   malicious input types of errors.  We don't *think* that
	   there are any buffer-overflow types of situations in LAM,
	   we've never checked explicitly (hence, per Mr. Murphy,
	   there are certainly some hiding somewhere).

	4. LAM programs are not audited or tracked in any way.  This
	   could present a sneaky way to execute binaries without log
	   trails (especially as root).

Hence, it's a Very Bad Idea to run LAM as root.  Please login as a
different user and run LAM again.
-*-ALL:root-warning-*-
# This message is displayed when recon is invoked by root.
# No parameters are sent.
Warning: You are invoking this program as root.  All other LAM executables
are not allowed to be run as root for security reasons.  The use of recon 
is allowed because of the common need for system administrators to validate
a LAM installation.
-*-recon:usage-*-
# Show the usage options of the "recon" program
# No parameters are sent
Synopsis:       recon [-adhv] [<bhost>]

Description:    Check if LAM can be booted

Options:
	-a      Report all errors (as opposed to quitting after the first 
                error)
	-d      Print debugging messages (implies -v)
	-h      Print this message
	-v      Be verbose
	<bhost>	Use <bhost> as the boot schema
-*-boot:bhostparse-*-
# Invoked by any booting program (e.g., lamboot, recon) when the
# user-provided host file could not be parsed properly.
# %1 = name of the invoking program
# %2 = name of the host file that we tried to parse
%1 could not parse the hostfile "%2" for the following reason:

	%terror
-*-boot:close-hostfile-*-
# Invoked by any booting program (e.g., lamboot, recon) when the
# user-provided host file could not be closed properly
# %1 = name of the invoking program
# %2 = name of the host file 
%1 could not close the hostfile "%2" for the following reason:

	%perror
-*-boot:open-hostfile-*-
# Invoked by any booting program (e.g., lamboot, recon) when the
# user-provided host file could not be opened
# %1 = name of the invoking program
# %2 = name of the host file 
%1 could not open the hostfile "%2" for the following reason:

	%perror
Things to check:

	- ensure that the file exists
	  try "ls -l %2"
	- ensure that you have read permissions on the file
	  try "cat %2"
-*-boot:resolv-hostname-*-
# Invoked by any booting program (e.g., lamboot, recon) when one of
# the hosts listed in the hostfile cannot be resolved to an IP
# address.
# %1 = name of the invoking program
# %2 = name of the host that we had a problem with
# %3 = name of the host file 
%1 could not resolve the hostname "%2" that was in the host file
"%3".

Things to check:

	- is "%2" in /etc/hosts?
	  try "grep %2 /etc/hosts"
	- is "%2" resolvable by DNS (or some other naming service)?
	  try "ping %2" or "nslookup %2"
-*-boot:resolv-unknown-*-
# Invoked by any booting program (e.g., lamboot, recon) when some
# unknown error occurred while trying to resolve hosts in the host
# file.
# %1 = name of the invoking program
# %2 = the errno
# %3 = name of the host file 
%1 encountered some unknown error (errno=%2) when trying to resolve
the hosts from the hostfile "%3".  Here's a guess at the problem:

	%terror
-*-boot:duplicated-host-*-
# Invoked by any booting program (e.g., lamboot, recon) when a
# duplicate host name is discovered in a host file.
# %1 = name of the invoking program
# %2 = the duplicated host from the host file
%1 found at least one duplicated host in the list (which is not
allowed):

	%2

Please remove the duplicate entry for this host (and any other
duplicates) from the list.  

Be sure to check for multiple names that refer to the same host (i.e.,
resolve to the same IP address).

If you are trying to execute multiple copies on an SMP, you do *not*
need to list hosts more than once.  Instead, only list each host once
in the boot schema, and see the man page for mpirun(1) for the "-c"
option, which will execute multiple copies of an executable on a
single node.
-*-boot:no-localhost-*-
# Invoked when the name of the localhost was not included in the boot
# schema. 
# %1 = name of the invoking program
# %2 = name of the hostfile/boot schema
%1 found that your local host is not in the hostfile "%2".

The local host name *must* be in the list of hosts in the hostfile.
In other words, you must boot LAM from a node that will be part of the
multicomputer.  

	- If you simply forgot to put the localhost in the boot
	  schema file, add it and re-run %1
	- If you are trying to boot LAM from a node that will not be
	  part of the multicomputer, you must login to on of the nodes
	  that will be part of the multicomputer (i.e., one of the
	  nodes in the hostfiles), and re-run %1

Although the local host name is usually the first in the list to avoid
I/O ambiguities, it can actually appear anywhere in the list.
-*-boot:socket-fail-*-
# This is invoked from lambootagent.c when we failed to create an
# internet server socket
# No parameters are passed
LAM failed to generate an internet socket.  Perhaps this will help:

	%perror 
-*-boot:fork-fail-*- 
# This is invoked when _lam_few fails in lambootagent.c.  It is only
# for the case where the local lamd failed to launch.
# %1 = name of the lamd executable that was attempted to be invoked
LAM failed to fork/exec a process to launch the local LAM daemon
(lamd).  LAM first launches %1 to launch the local LAM daemon, so
several things could have gone wrong:

	- "%1" itself could not be found (check your $PATH)
	- "%1" failed for some reason (consult previous error messages,
	  if any)
	- Too many processes exist and Unix could not fork another
-*-boot:remote-shell-fail-*-
# This is invoked when inetexec fails in lambootagent.c.  It is only
# for the case where a remote lamd failed to launch, specifically when
# were were trying to obtain the remote shell name (i.e., before we
# tried to execute any LAM binaries)
# %1 = remote hostname/username
# %2 = local RSH attempted to be executed
# %3 = remote command attempted to be executed
# %4 = sample command to execute
LAM failed to execute a process on the remote node "%1".
LAM was not trying to invoke any LAM-specific commands yet -- we were
simply trying to determine what shell was being used on the remote
host.  

LAM tried to use the remote agent command "%2" 
to invoke "%3" on the remote node.

This usually indicates an authentication problem with the remote
agent, or some other configuration type of error in your .cshrc or
.profile file.  The following is a list of items that you may wish to
check on the remote node:

	- You have an account and can login to the remote machine
	- Incorrect permissions on your home directory (should
	  probably be 0755) 
	- Incorrect permissions on your $HOME/.rhosts file (if you are
	  using rsh -- they should probably be 0644) 
	- You have an entry in the remote $HOME/.rhosts file (if you
	  are using rsh) for the machine and username that you are
	  running from
	- Your .cshrc/.profile must not print anything out to the 
	  standard error
	- Your .cshrc/.profile should set a correct TERM type
	- Your .cshrc/.profile should set the SHELL environment
	  variable to your default shell

Try invoking the following command at the unix command line:

	%4

You will need to configure your local setup such that you will *not*
be prompted for a password to invoke this command on the remote node.
No output should be printed from the remote node before the output of
the command is displayed.

When you can get this command to execute successfully by hand, LAM
will probably be able to function properly.
-*-boot:remote-stderr-*-
# This is invoked when inetexec fails in lambootagent.c by getting
# something printed to the stderr from a remote shell.
# %1 = remote hostname/username
# %2 = local RSH attempted to be executed
# %3 = remote command attempted to be executed
# %4 = sample command to execute
LAM attempted to execute a process on the remote node "%1",
but received some output on the standard error.

LAM tried to use the remote agent command "%2" 
to invoke "%3" on the remote node.

This can indicate an authentication error with the remote agent, or
can indicate an error in your $HOME/.cshrc, $HOME/.login, or
$HOME/.profile files.  The following is a list of items that you may
wish to check on the remote node:

	- You have an account and can login to the remote machine
	- Incorrect permissions on your home directory (should
	  probably be 0755) 
	- Incorrect permissions on your $HOME/.rhosts file (if you are
	  using rsh -- they should probably be 0644) 
	- You have an entry in the remote $HOME/.rhosts file (if you
	  are using rsh) for the machine and username that you are
	  running from
	- Your .cshrc/.profile must not print anything out to the 
	  standard error
	- Your .cshrc/.profile should set a correct TERM type
	- Your .cshrc/.profile should set the SHELL environment
	  variable to your default shell

Try invoking the following command at the unix command line:

	%4

You will need to configure your local setup such that you will *not*
be prompted for a password to invoke this command on the remote node.
No output should be printed from the remote node before the output of
the command is displayed.

When you can get this command to execute successfully by hand, LAM
will probably be able to function properly.
-*-boot:no-shell-*-
# This is invoked when we fail to get a shell output from the remote node in 
# inetexec.c.  That is, the length of the output is zero.
# %1 = remote hostname/username
# %2 = local RSH attempted to be executed
# %3 = remote command attempted to be executed
# %4 = sample command to execute
LAM was trying to determine the your shell on the "%1".
However, LAM did not receive any valid output.

LAM tried to use the remote agent command "%2" 
to invoke "%3" on the remote node.

This is an unusaual error -- it does not typically indicate a
permissions problem.  But it can sometimes indicate latent (or
"silent") errors in your $HOME/.cshrc, $HOME/.login, or $HOME/.profile
file.

Try invoking the following command at the unix command line:

	%4

You will need to configure your local setup such that you will *not*
be prompted for a password to invoke this command on the remote node.
No output should be printed from the remote node before the output of
the command is displayed.

When you can get this command to execute successfully by hand, LAM
will probably be able to function properly.
-*-boot:remote-boot-fail-*-
# This is invoked when inetexec fails in lambootagent.c.  It is only
# for the case where a remote lamd failed to launch, specifically when
# we tried to execute some LAM binary.
# %1 = remote hostname/username
# %2 = local RSH attempted to be executed
# %3 = remote shell
# %4 = sample command to execute
LAM failed to execute a LAM binary on the remote node "%1".
Since LAM was already able to determine your remote shell as "%3",
it is probable that this is not an authentication problem.

LAM tried to use the remote agent command "%2" 
to invoke the following command:

	%4

This can indicate several things.  You should check the following:

	- The LAM binaries are in your $PATH
	- You can run the LAM binaries
	- The $PATH variable is set properly before your 
	  .cshrc/.profile exits

Try to invoke the command listed above manually at a Unix prompt.

You will need to configure your local setup such that you will *not*
be prompted for a password to invoke this command on the remote node.
No output should be printed from the remote node before the output of
the command is displayed.

When you can get this command to execute successfully by hand, LAM
will probably be able to function properly.
-*-recon:happiness-*-
# Invoked when recon completes successfully.
# No parameters are sent.
Woo hoo!

recon has completed successfully.  This means that you will most likely
be able to boot LAM successfully with the "lamboot" command (but this
is not a guarantee).  See the lamboot(1) manual page for more
information on the lamboot command.

If you have problems booting LAM (with lamboot) even though recon
worked successfully, enable the "-d" option to lamboot to examine each
step of lamboot and see what fails.  Most situations where recon
succeeds and lamboot fails have to do with the hboot(1) command (that
lamboot invokes on each host in the hostfile).
-*-recon:unhappiness-*-
# Invoked when recon completes unsuccessfully.
# No parameters are sent.
recon was not able to complete successfully.  There can be any number
of problems that did not allow recon to work properly.  You should use
the "-d" option to recon to get more information about each step that
recon attempts.

Any error message above may present a more detailed description of the
actual problem.

Here is general a list of prerequesites that *must* be fullfilled
before recon can work:

     - Each machine in the hostfile must be reachable and operational. 
     - You must have an account on each machine. 
     - You must be able to rsh(1) to the machine (permissions
       are typically set in the user's $HOME/.rhosts file).

       *** Sidenote: If you compiled LAM to use a remote shell program
           other than rsh (with the --with-rsh option to ./configure;
           e.g., ssh), or if you set the LAMRSH environment variable
	   to an alternate remote shell program, you need to ensure
	   that you can execute programs on remote nodes with no
	   password.  For example:

       unix% ssh -x pinky uptime
       3:09am up 211 day(s), 23:49, 2 users, load average: 0.01, 0.08, 0.10

     - The LAM executables must be locatable on each machine, using
       the shell's search path and possibly the LAMHOME environment
       variable.  
     - The shell's start-up script must not print anything on standard
       error.  You can take advantage of the fact that rsh(1) will
       start the shell non-interactively.  The start-up script (such
       as .profile or .cshrc) can exit early in this case, before
       executing many commands relevant only to interactive sessions
       and likely to generate output.
-*-lamboot:usage-*-
# Show the usage options of the "lamboot" program
# No parameters are sent
Synopsis:	lamboot [-dhHvVx] [<bhost>]

Description:	Start up a LAM multicomputer

Options:
	-d      Print debugging messages (implies -v)
	-h	Print this message
	-H      Don't print the header
	-v      Be verbose
	-V      Print version and exit without booting
	-x      Run nodes in fault tolerant mode
	<bhost> Use <bhost> as the boot schema
-*-wipe:usage-*-
# Show the usage options of the "wipe" program
# No parameters are sent
Synopsis:	wipe [-dhHvV] [-n <#>] [<bhost>]

Description:	Shut down a LAM multicomputer

Options:
	-d	Print debugging message (implies -v)
	-h	Print this message
	-H      Don't print the header
	-n <#>	Wipe the first <#> nodes
	-v	Be verbose
	-V      Print version and exit without shutting down LAM
	<bhost>	Use <bhost> as the boot schema
-*-lamboot:about-to-wipe-*-
# Invoked when lamboot failed and is about to do a wipe to kill
# all nodes that it already successfully booted.  
# No parameters are sent.
lamboot encountered some error (see above) during the boot process,
and will now attempt to kill all nodes that it was previously able to
boot (if any).

Please wait for LAM to finish; if you interrupt this process, you may
have LAM daemons still running on remote nodes.
-*-lamboot:wipe-fail-*-
# Invoked in lamboot.c when the call to _lam_few() fails when we are
# trying to tkill
# No parameters are sent.
lamboot tried to execute the "wipe" program on the local node to
remove any already-booted LAM nodes, but failed.  

Things to check:

	- Is "wipe" in your $PATH?
	- Did "wipe" fail for some reason (consult previous error messages,
	  if any)
	- Did Unix fail to fork the "wipe" program due to lack of 
	  resources?
-*-hboot:usage-*-
# Show the usage options of the "hboot" program
# No parameters are sent
Synopsis:	hboot [-dhnNstv] [-c <schema>] [-I <inet_topo>] [-R <rtr_topo>]

Description:	Start LAM on the local node

Options:
	-c <conf>	Use <conf> as the process schema
	-d		Print debug information (implies -v)
	-h		Print this message
	-I <inet_topo>	Set $inet_topo variable
	-N		Pretend to hboot
	-R <rtr_topo>	Set $rtr_topo variable
	-s		Close stdio of processes
	-t		Kill existing session first
	-v		Be verbose
-*-hboot:psc-parse-*-
# Invoked from hboot.c when psc_parse returns an error
# %1 = name of boot schema file that did not parse
hboot could not parse the hostfile "%1" for the following reason:

	%perror
-*-hboot:nothing-to-do-*-
# Invoked from hboot.c when there is nothing to do
# %1 = name of boot schema file
hboot could not find anything to do in the hostfile "%1".

Things to check:

	- Is the file empty?
	- Does the file contain no valid hostnames?
-*-hboot:cant-find-executables-*-
# Invoked from hboot.c when we can't find an executable
# %1 = name of executable that we couldn't find
hboot could not find the executable "%1" in your path.

Things to check:

	- Is "%1" in your $PATH?
	- Does your .cshrc/.profile set your $PATH properly?

The following Unix error message may be helpful:

	%perror
-*-hboot:tkill-fail-*-
# Invoked from hboot.c when tkill failed to run on the local node
# Called with no parameters
hboot was not able to run "tkill" on the local node.  

Things to check:

	- Is "tkill" in your $PATH?
	- Does your .cshrc/.profile set your $PATH properly?

The following Unix error message may be helpful:

	%perror
-*-tkill:usage-*-
# Show the usage options of the "tkill" program
# No parameters are sent
Synopsis:	tkill [-dhNv] [-f <killfile>]

Description:	Terminate LAM on the local node

Options:
	-d		Print debug information.
	-h		Print this message.
	-N		Pretend to tkill.
	-f <kill>	Use <kill> as the kill file.
	-v		Be verbose.
-*-tkill:cannot-kill-*-
# Invoked when tkill fails to kill a process that it thinks is still
# there
# %1 = PID of process that its trying to kill
tkill failed to kill the LAM daemon; I think that it is PID %1, but
"kill" and "kill -9" did not seem to kill it.

Things to check:

	- Do a "ps" and see if the process still exists
	- Use the Unix kill(1) command to kill the process
-*-compile:phome-too-long-*-
# Invoked from hcc.c/hf77.c when the LAM directory is too long
# %1 = what LAMHOME (or TROLLIUSHOME or DEFP) is
# %2 = max num of characters that it can be
# %3 = which compiler was invoked
The path name given to %3 for use with the -I and -L switches was too
long.  It can be a maximum of %2 characters long.  The pathname given was:

	%1

The pathname was given either in the $LAMHOME environment variable,
$TROLLIUSHOME environment variable, or as the prefix when LAM was
configured.
-*-hf77:no-fortran-support-*-
# Invoked when hf77 was invoked by the user, but LAM was not compiled
# with Fortran support.
Sorry, LAM was not compiled with FORTRAN support.

You will need to re-compile LAM and be sure that either ./configure
finds a FORTRAN compiler, or that you explicitly specify a FORTRAN
compiler with the --with-fc switch to ./configure.
