*******************************************************************************

From a friendly user on the net who successfully installed all of the above:

Here are some Q & A summarized moreless chronologically from the installation 
process I went through on machines named snake, scraff, and chinook:

*******************************************************************************

Q. How do I get and install the parallel make/customs remote execution system?

A. Get /pub/stolcke/pmake-XXX.tar.Z from ftp.icsi.berkeley.edu
and have a look at the gnumake subdirectory.

Contact:
Andreas Stolcke                                 stolcke@icsi.berkeley.edu
International Computer Science Institute        stolcke@ucbicsi.bitnet
1947 Center St., Suite 600, Berkeley, CA 94704  (510) 642-4274 ext. 126

*******************************************************************************

Q. My gcc won't compile things correctly, and I'd like to use the regular
/bin/cc on my Sun Sparcstation. How do I change the makefile?

A. Make the following mods to ./config.mk:

# elifdef sparc
#CC             = cc
#OPTIMIZE       = -O # -g
# gcc2 wins !!!
#CC             = gcc -pipe
#OPTIMIZE       = -g -O #-finline-functions
#STATICFLAG     = -static
#PUREFLAG       = -Xlinker -n -Xlinker -Bdynamic
CC              = cc -pipe
OPTIMIZE        = -O #-finline-functions
STATICFLAG      = -Bstatic
PUREFLAG        = -Bdynamic 

*******************************************************************************

Q. I've made the new pmake and customs stuff as per instructions. I've installed 
the following into /etc/services:
 
customs       8231/tcp
customs       8231/udp
 
...and I've started up 'customs -master -arch 1 ALL' on my hosts.  However, 
cctrl -all returns this:
 
customs/udp unknown
trying default port 1001

Why?

A. Two things:

1 -- You are probably running yellow pages (aka NIS) and editing your
local /etc/services will do not good.  Edit /etc/services on your NIS
master machine, cd to /var/yp; and make there.  Check that the changes
are effective by doing a 

        ypcat services | grep customs

2 - Set the compiled-in default port number to match the one in /etc/services,
   so it can be used effectively as a fallback should the services lookup
   indeed fail.   If you have configure for secure ports the default
   port number is 1001, not 8231, hence the message from customs.
   Check the occurrences of USE_RESERVED_PORTS in customs/config.h.

You cannot use 8231 if USE_RESERVED_PORTS is defined.   Reserved ports are
the ones below 1024.  This is the reason for the #ifdef in config.h
and why the default is 1001 if USE_RESERVED_PORTS is in effect.

If you don't like reserved ports then #undef USE_RESERVED_PORTS.
But read the SECURITY file for the implications.

*******************************************************************************

Q.  I have changed port #'s to 1001 in /etc/services, ran make
in /var/yp, retained reserved ports define and used 1001 in all 4 slots in 
./customs/config.h, but am still getting unfriendly responses:
 
scraff:/home/tmp/winds 11# ypcat services | grep customs 
customs         1001/tcp 
customs         1001/udp 

scraff:/home/tmp/winds 5# !reg 
reginfo: Couldn't find master: Call timed out

scraff:/home/tmp/winds 7# cctrl -all
timeout = 2.500000 secs, 2 retries
Pinging all
all: Call timed out
 
What am I forgetting?

A.  A couple things to verify:

- at least one daemon on the network is running with the -master flag
  (the foolproof choice is to have them all use -master).
- the daemon is actually running (ps -axu will tell you)

If things don't seem to be working try to get some debugging output.
Run the customs daemon as

        customs -debug -nolog -verbose -master ALL

Make sure a single daemon run first (trying reginfo, cctrl etc.).
Then start the others.

*******************************************************************************

Q. I can't get pmake to export things correctly. E.g.:

chinook:/home/local/gnu/pmake/pmake/customs 45% /usr/local/bin/pmake test
--- 0 ---
*** exported to scraff (id 457375771)
customs: /n/chinook/home/local/gnu/pmake/pmake/customs: No such file or directory
--- 1 ---
*** exported to scraff (id 457375772)
--- 2 ---
*** exported to scraff (id 457375773)
customs: /n/chinook/home/local/gnu/pmake/pmake/customs: No such file or directory
*** Error code 4
--- 3 ---
*** exported to scraff (id 457375774)
customs: /n/chinook/home/local/gnu/pmake/pmake/customs: No such file or directory
*** Error code 4
--- 0 ---
*** Error code 4
--- 1 ---
customs: /n/chinook/home/local/gnu/pmake/pmake/customs: No such file or directory
*** Error code 4
pmake: 4 errors

....in all of this, the prepending of "/n/chinook" is what causes the "No such"
problem, but I don't know why that string is being prepended to the pathnames.
Why is this happening?

A. What you're seeing is customs trying to "normalize" the local current directory
paths so they will work on the remote host.    Currently, there are two
supported scenarios:

1 - You local pathnames don't require any change to access the same directories
   on a remote system.  This is appropriate if all the directories you care
   about are hard-mounted under the same paths on all systems you want to
   export to. In that case #define ORIG_CWD in customs/config.h.
    This will stop customs from prepending the /n stuff to your paths.

2 - You run an automounter that is set up to make remote filesystems available
    as /n/hostname/pathname and mounts automounted filesystems under /tmp_mnt
    (as the Sun automounter does by default).  This is the behavior that you're
   seeing, and is obviously not what you want.

If you have a setup as in (2) but use directories other than /n and /tmp_mnt
then just edit the #defines for TMPMNT and NETMNT in customs/customslib.c.
If you use something altogether different then you will have to rewrite
the Customs_NormPath() routine to suit your local needs.

*******************************************************************************

Q. On exporting to certain hosts, this happens:

chinook:/home/local/winds/dev/src 192% export pmake $WINDS/obj/events.o
*** exported to snake
CUSTOMS_IMPORT: Import took too long
--- /home/local/winds/dev/obj/events.o ---
pmake: Error exporting

...not all hosts have this problem. I notice the CUSTOMS_TIMEOUT is 10 seconds
in customs.h, but the "too long" response seems to return well before that
time has transpired. What's going on?


A.  Your clocks are not synchronized across machines.  Try 

        % telnet otherhost daytime ; date

to check this.  There are two reasons to keep your clocks well-synchronized:

1 - when creating or updating files on remote machines you want their
   timestamps to be meaningful on the local machine.
2 - sychronized clocks allow customs to detect delayed imports which could
   otherwise have bad consequences.  If you can't get clocks synchronized
    for some reason disable the DOUBLECHECK_TIMEOUT in customs/config.h.

*******************************************************************************

Q. If got my customs daemons running, they respond to cctrl -all, and reginfo
   shows a complete list of hosts, yet nothing gets exported.

A. You may be using a 'non-standard' shell, something like /usr/local/bin/tcsh.
Customs verifies your passwd entry on the machine you are trying to export
to.  There are 4 levels of verification, set with -access (on the
customs or importqouta command line). Quoting from the customs(8) man page:

     [...] Level 0 allows unconditional access to all
     users, i.e., if a user was successful in obtaining an export
     permit  on  the  client  side  that is considered sufficient
     authorization.  Level 1 requires that imported jobs carry  a
     UID  that  at least has a valid local passwd entry.  Level 2
     requires additionally that an authorized  shell  is  defined
     for the user (as per /etc/shells).  Level 3 behaves as level
     2 but will record any denied access attempts in the  customs
     log file.

The default is level 2, i.e., your shell has to be a standard one, or
be listed in /etc/shells on the target machine.  Either add it, or
go to level 1.  The rationale behind this is to allow certain users to
be kept from working on certain machines, by giving them a special shell.
(This is the same mechanism ftpd uses for access control, and my making
that special shell something that exits immmediately, it also works
for rlogin, telnet, etc.)

*******************************************************************************

Q. PMake tries to update an archive with ranlib even after it has been
   ranlib'ed once and none of the members have changed.  What's going on?

A. This may happen if the time on your local machine and on the NFS
   server on which the archive file resides are out of sync.
   ranlib writes the update time of the symbol table into the archive
   (according to the local time), but the modification time of the file
   is determined by the time on the server.  Pmake compares these
   two times to check whether the archive symbol table is uptodate.
   
*******************************************************************************

Q. Why doesn't Customs detect when a machine is/is not idle ?

A. The intended definition of 'idle time' for customs' purpose is the time
   elapses since the last keyboard or mouse input on the machine console.
   On some systems there simply seems to be no way of getting that information
   (most notably DEC Ultrix and OSF/1).  In that case customs looks
   at the last access times of all current logins (as per the utmp file)
   that *appear* to not come from a remote host.  To determine what is 
   a remote login, customs looks at the 'ut_host' field in the utmp entry.
   Where it is empty or starts with a colon (an X display specification) the
   login is considered local.  On some systems, not even ut_host is available
   and the last activity on *all* logins (local or remote) is considered for 
   idle time (use of ut_host can also be disabled with -DNO_UTHOST).

   There are at least two potential problems with this strategy: 1) when 
   basing the idle time on utmp entries it ignores programs that do not
   generate a utmp entry (such as most terminal emulators), and in particular
   mouse or other graphical device input.  2) Even when exact last input
   times from the input devices are available, that may be too limited a
   criterion (e.g., because remote activity is not considered, but should).

   In other words, the definition of 'idleness' is subject to local policies
   *and* constraints imposed by the operating system.  If you need to
   implement a different definition you will have to modify the
   OS_Idle() routine in the OS-dependent module (os-*.c) of Customs.

   The 'xautolock' program distributed with pmake has been modified so it
   can update a file access time to reflect the last X server interaction
   via keyboard or mouse.  This feature may be used to keep /dev/console
   updated properly so customs can get an accuracte idle time for its
   purposes.

*******************************************************************************

Q. I'm trying to use pmake files as executable scripts by starting the
   file with

	#!/usr/local/bin/pmake -f

   After turning on the execute bits in the files mode I can run the
   file but I get the fllowing messages:

	pmake: local server: Access denied

A. When configure securely, pmake needs to run with setuid-root privilege to
   be able to talk to the customs server.  You script however, is not
   suid root (presumably, it would be a VERY bad, dangerous idea to
   try to do that).

   Solution #1: wrap a shell script around the makefile.
   Solution #2: turn off customs use by adding a -X flag to the first line:

	#!/usr/local/bin/pmake -Xf

   This will disable exportation, but you can reenable it by having the
   makefile call itself recursively with the -x (little x) flag:

	default:
		$(MAKE) -xf this_makefile doit

	doit:
		...


*******************************************************************************

Q. I have set '-jobs 5' on the customs command line, however it still only
   exports 1 job to the server.

A. The number of jobs is just one criterion.  Even with a single imported
   process can the host may become unavailable, e.g., most likely as a result
   of the load criterion. Try upping that as well, e.g., -load 5.0, or disable
   load entirely (-load 0).  BTW, reginfo will show the reason a machine is not
   considered available.


*******************************************************************************

Q. Can a network of customs agents span several physical networks?

A. Yes, as long as they can talk to each other using point-to-point
   network connections AND the master agent can broadcast to all
   networks.  This usually means that mastery has to be confined to
   the host(s) with network interfaces to all networks in question
   (using the customs -master switch).  In addition, the other machines
   have to be told to allow RPCs from the "other" networks, since by
   default RPCs are only enabled for the local network the agent runs on
   (use the customs -allow flag for this).

*******************************************************************************

Q. My customs master agent dumps core (older versions) or exits with a message
   that it "Failed to look up own hostname".  But my machine's name is defined!

A. Make sure your machine doesn't have the loopback address as its primary
   address, i.e., make sure your /etc/hosts doesn't contain a line like

	127.0.0.1	myhostname localhost

   `myhostname' should have its own valid IP address, one that corresponds
   to its real (non-loopback) network interface.

