Prereq: 3310
*** ../netlib/pvm3.3.10/src/patchlevel.h	Fri Nov 10 16:58:35 1995
--- src/patchlevel.h	Mon May 13 17:38:18 1996
***************
*** 1,3 ****
  
! #define PATCHLEVEL 3310
  
--- 1,3 ----
  
! #define PATCHLEVEL 3311
  
*** ../netlib/pvm3.3.10/Readme.mp	Fri Nov 10 16:58:35 1995
--- Readme.mp	Tue May 14 10:30:09 1996
***************
*** 10,16 ****
  3. iPSC/860
  4. Paragon
  5. CM5
! 6. IBM SP2
  7. Shared-memory Systems
  	Solaris 2.3
  	SGI 5.1
--- 10,16 ----
  3. iPSC/860
  4. Paragon
  5. CM5
! 6. IBM SP
  7. Shared-memory Systems
  	Solaris 2.3
  	SGI 5.1
***************
*** 22,28 ****
  	In the workstation environment, there is usually one (or a few at
  the most) task(s) and one PVM Daemon (pvmd) on each host. On a MPP
  machine, however, only one pvmd runs on the front-end and it has to
! support all the tasks running on the back-end nodes. On an SP2, the
  node on which PVM is started becomes the front-end.
  
  	On a MPP machine tasks are always spawned on the back-end nodes.
--- 22,28 ----
  	In the workstation environment, there is usually one (or a few at
  the most) task(s) and one PVM Daemon (pvmd) on each host. On a MPP
  machine, however, only one pvmd runs on the front-end and it has to
! support all the tasks running on the back-end nodes. On an SP, the
  node on which PVM is started becomes the front-end.
  
  	On a MPP machine tasks are always spawned on the back-end nodes.
***************
*** 41,47 ****
  the user terminal, for example), the master should avoid doing any 
  compute-intensive work.
  
!     On the CM5 and SP2, each batch of tasks created by pvm_spawn() 
  form a unit. Within the same unit, message are passed directly. For 
  each unit, PVM spawns an additional task to relay messages to and from 
  pvmd, because tasks in the unit cannot communicate with pvmd directly. 
--- 41,47 ----
  the user terminal, for example), the master should avoid doing any 
  compute-intensive work.
  
!     On the CM5 and SP, each batch of tasks created by pvm_spawn() 
  form a unit. Within the same unit, message are passed directly. For 
  each unit, PVM spawns an additional task to relay messages to and from 
  pvmd, because tasks in the unit cannot communicate with pvmd directly. 
***************
*** 80,86 ****
  user has no control of how the tasks are distributed among the nodes.
  So running a parallel program on a MPP is like running it on a very 
  powerful uniprocessor machine with multitasking. For example, to run 
! nntime program on the IBM SP2, we first start PVM on the high performance
  switch, and then spawn 2 copies of nntime from the console:
  
  r25n15% pvm3/lib/pvm -nr25n15-hps
--- 80,86 ----
  user has no control of how the tasks are distributed among the nodes.
  So running a parallel program on a MPP is like running it on a very 
  powerful uniprocessor machine with multitasking. For example, to run 
! nntime program on the IBM SP, we first start PVM on the high performance
  switch, and then spawn 2 copies of nntime from the console:
  
  r25n15% pvm3/lib/pvm -nr25n15-hps
***************
*** 113,120 ****
  pvm> halt
  r25n15%
  
      There is no need to "add" any nodes, "conf" showed only one host. We 
! note that nntime is a true "hostless" program in the sense that it has
  no master task. The spmd example, on the other hand, has a master
  task which spawns other slave tasks. Hostless programs perform better
  than master-slave programs because all the tasks can be spawned together
--- 113,131 ----
  pvm> halt
  r25n15%
  
+ To run nntime from command line and not from the console you can use
+ the starter program provided in the examples directory.
+ r25n15% pvm3/lib/pvm -nr25n15-hps
+ pvm> conf
+ 1 host, 1 data format
+                     HOST     DTID     ARCH   SPEED
+               r25n15-hps    40000   SP2MPI    1000
+ pvm> quit
+ 
+ r25n15% bin/SP2MPI/starter -n 2 nntime
+ 
      There is no need to "add" any nodes, "conf" showed only one host. We 
! note that nntime is a true "hostless" (SPMD) program in the sense that it has
  no master task. The spmd example, on the other hand, has a master
  task which spawns other slave tasks. Hostless programs perform better
  than master-slave programs because all the tasks can be spawned together
***************
*** 360,376 ****
  
  
  
! 6. IBM SP2
! ----------
  
! 	This implementation is built on top of MPI-F, IBM's version of the
! Message Passing Interface. Information provided by Hubertus Franke of
  IBM T. J. Watson Research Center is gratefully acknowledged.
  
  
  INSTALLATION
  
! 	Type "make PVM_ARCH=SP2MPI" in this directory. Make sure the mpicc
  compiler is in your path.
  
  	To make the examples, go to the "examples" directory, and type
--- 371,387 ----
  
  
  
! 6. IBM SP
! ---------
  
! 	This implementation is built on top of MPI, IBM's product version of
! the Message Passing Interface. Information provided by Hubertus Franke of
  IBM T. J. Watson Research Center is gratefully acknowledged.
  
  
  INSTALLATION
  
! 	Type "make PVM_ARCH=SP2MPI" in this directory. Make sure the mpcc
  compiler is in your path.
  
  	To make the examples, go to the "examples" directory, and type
***************
*** 380,387 ****
  APPLICATION PROGRAMS
  
  	Host (master) programs should be linked with pvm3/lib/SP2MPI/libpvm3.a .
! Node (slave) programs must be compiled with the mpicc compiler for a C
! program and mpixlf compiler for a FORTRAN program, and then linked with
  pvm3/lib/SP2MPI/libpvm3pe.a . FORTRAN programs should also be linked with 
  pvm3/lib/SP2MPI/libfpvm3.a .
  
--- 391,398 ----
  APPLICATION PROGRAMS
  
  	Host (master) programs should be linked with pvm3/lib/SP2MPI/libpvm3.a .
! Node (slave) programs must be compiled with the mpcc compiler for a C
! program and mpxlf compiler for a FORTRAN program, and then linked with
  pvm3/lib/SP2MPI/libpvm3pe.a . FORTRAN programs should also be linked with 
  pvm3/lib/SP2MPI/libfpvm3.a .
  
***************
*** 391,408 ****
  
  BUGS AND CAVEATS
  
! 	a) The user is required to provide a node file for the SP2 that lists
  all the nodes the user intends to run PVM on. This is not to be confused 
  with the PVM hostfile. Before starting PVM, the POE environment variable
! MP_HOSTFILE should be set to the path of the user's SP2 node file. For
  example I have the line "setenv MP_HOSTFILE ~/host.list" in my .cshrc file.
  My host.list file contains the names of the high-performance switches on 
! all the parallel nodes.
  
! 	b) On a SP2 node only one process can use the switch at any given time. 
  To run your program you need one node for each PVM task, plus one for the 
  PVM host process that relays messages for pvmd. So if you want to spawn 8 
! PVM tasks, for instance, you'll need at least 9 node names in your SP2 
  node file. Remember there is a host process for each group of tasks spawned
  together. If you spawn 8 tasks in two batches, you'll need 10 nodes instead
  of 9.
--- 402,433 ----
  
  BUGS AND CAVEATS
  
! 	a) The user is required to set MP_PROCS and MP_RMPOOL environment
! variables or provide a node file (MP_HOSTFILE) for the SP that lists
  all the nodes the user intends to run PVM on. This is not to be confused 
  with the PVM hostfile. Before starting PVM, the POE environment variable
! MP_HOSTFILE should be set to the path of the user's SP node file. For
  example I have the line "setenv MP_HOSTFILE ~/host.list" in my .cshrc file.
  My host.list file contains the names of the high-performance switches on 
! all the parallel nodes.  If you do not want to use the SP node file, then you
! can set MP_PROCS to the maximum number of nodes you will need plus one.  The
! number listed here should be equal to the number of nodes you would have
! listed in the MP_HOSTFILE.  So if you need a 5 task job then you will need
! to set MP_PROCS=6 and if you need spawned two 5 task jobs then you will
! need to set MP_PROCS=12.  MP_RMPOOL is set to default value of "1" but
! you may need to change it depending how your administrator has allocated
! the SP nodes into different pools.  You can run "/usr/bin/jm_status -P"
! to see what POOL id's and nodes are available.
  
! 	b) On a SP node only one process can use the switch (User Space)
! at any given time.  If you want to share the switch between different
! users then you will need to run in IP mode over the switch.  To do this, 
! you must set "setenv MP_EUILIB ip" before starting PVM.  The default value 
! for "MP_EUILIB" is "us".  These environment variables should be set
! before starting PVM and this configuration will last until PVM is halted.
  To run your program you need one node for each PVM task, plus one for the 
  PVM host process that relays messages for pvmd. So if you want to spawn 8 
! PVM tasks, for instance, you'll need at least 9 node names in your SP 
  node file. Remember there is a host process for each group of tasks spawned
  together. If you spawn 8 tasks in two batches, you'll need 10 nodes instead
  of 9.
*** /dev/null	Fri May 17 17:39:47 1996
--- conf/APOLLO.def	Mon May 13 15:16:04 1996
***************
*** 0 ****
--- 1,6 ----
+ ARCHCFLAGS	=	-DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ -DRSHCOMMAND=\"/usr/bin/remsh\"
+ ARCHDLIB	=
+ ARCHDOBJ	=
+ ARCHLIB	=
+ HASRANLIB	=	f
+ PVM_ARCH	=	APOLLO
*** /dev/null	Fri May 17 17:39:47 1996
--- conf/APOLLO.m4	Mon Apr  1 11:26:46 1996
***************
*** 0 ****
--- 1,19 ----
+ divert(-1)
+ undefine(`len')
+ #
+ # do nothing special to FORTRAN function names
+ #
+ define(`FUNCTION',`$1')
+ #
+ # FORTRAN character strings are passed as follows:
+ # a pointer to the base of the string is passed in the normal
+ # argument list, and the length is passed by value as an extra
+ # argument, after all of the other arguments.
+ #
+ define(`ARGS',`($1`'undivert(1))')
+ define(`SAVE',`divert(1)$1`'divert(0)')
+ define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')')
+ define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len')
+ define(`STRING_LEN',`$1_len')
+ define(`STRING_PTR',`$1_ptr')
+ divert(0)
*** /dev/null	Fri May 17 17:39:47 1996
--- conf/M88K.def	Thu Nov 16 09:02:12 1995
***************
*** 0 ****
--- 1,7 ----
+ ARCHCFLAGS	= -DNEEDSFFS -DNOUNIXDOM -DNOWAIT3 -DSHAREDTMP -DSTATISTICS -DNOGETDTBLSIZ -DREALIX -DMAXPATHLEN=1024
+ ARCHDLIB	=
+ ARCHDOBJ	=
+ ARCHLIB		=
+ HASRANLIB	=	f
+ PVM_ARCH	=	M88K
+ 
*** /dev/null	Fri May 17 17:39:47 1996
--- conf/M88K.m4	Thu Nov 16 07:40:06 1995
***************
*** 0 ****
--- 1,20 ----
+ divert(-1)
+ undefine(`len')
+ #
+ # FORTRAN function names are in upper case
+ #
+ define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)')
+ #
+ # FORTRAN character strings are passed as follows:
+ #   XXX is this right?
+ # a pointer to the base of the string is passed in the normal
+ # argument list, and the length is passed by value as an extra
+ # argument, after all of the other arguments.
+ #
+ define(`ARGS',`($1`'undivert(1))')
+ define(`SAVE',`divert(1)$1`'divert(0)')
+ define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')')
+ define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len')
+ define(`STRING_LEN',`$1_len')
+ define(`STRING_PTR',`$1_ptr')
+ divert(0)
*** ../netlib/pvm3.3.10/conf/RS6K.def	Fri Nov 10 16:58:36 1995
--- conf/RS6K.def	Mon May 13 15:17:16 1996
***************
*** 1,4 ****
! ARCHCFLAGS	=	-DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bin/rsh\"
  ARCHDLIB	=	-lbsd
  ARCHDOBJ	=
  ARCHLIB	=
--- 1,4 ----
! ARCHCFLAGS	=	-DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN
  ARCHDLIB	=	-lbsd
  ARCHDOBJ	=
  ARCHLIB	=
*** ../netlib/pvm3.3.10/conf/RS6KMP.def	Fri Nov 10 16:58:37 1995
--- conf/RS6KMP.def	Mon May 13 15:17:19 1996
***************
*** 1,4 ****
! ARCHCFLAGS	=	-DSYSVSIGNAL -DNOUNIXDOM -D_BSD -DRSHCOMMAND=\"/usr/bin/rsh\"
  ARCHDLIB	=	-lbsd -lpthreads
  ARCHDOBJ	=
  ARCHLIB		=	-lbsd -lpthreads 
--- 1,4 ----
! ARCHCFLAGS	=	-DSYSVSIGNAL -DNOUNIXDOM -D_BSD -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN
  ARCHDLIB	=	-lbsd -lpthreads
  ARCHDOBJ	=
  ARCHLIB		=	-lbsd -lpthreads 
*** ../netlib/pvm3.3.10/conf/SCO.def	Fri Nov 10 16:58:37 1995
--- conf/SCO.def	Mon May 13 16:51:49 1996
***************
*** 1,4 ****
! ARCHCFLAGS	=	 -DSYSVSTR -DSYSVSIGNAL -D__SCO_WAIT3__ -DNOUNIXDOM -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDSFFS
  ARCHDLIB	=	-lsocket
  ARCHDOBJ	=
  ARCHLIB	=	-lrpc -lsocket
--- 1,4 ----
! ARCHCFLAGS	=	 -DSYSVSTR -DSYSVSIGNAL -D__SCO_WAIT3__ -DNOUNIXDOM -DRSHCOMMAND=\"/usr/bin/rcmd\" -DNEEDSFFS
  ARCHDLIB	=	-lsocket
  ARCHDOBJ	=
  ARCHLIB	=	-lrpc -lsocket
*** ../netlib/pvm3.3.10/conf/SP2MPI.def	Wed May 24 20:34:48 1995
--- conf/SP2MPI.def	Tue May 14 10:30:53 1996
***************
*** 1,4 ****
! ARCHCFLAGS	=	-DSYSVSIGNAL -DNOUNIXDOM
  ARCHDLIB	=
  ARCHDOBJ	=
  ARCHLIB		=
--- 1,4 ----
! ARCHCFLAGS	=	-DSYSVSIGNAL -DNOUNIXDOM -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\"
  ARCHDLIB	=
  ARCHDOBJ	=
  ARCHLIB		=
*** /dev/null	Fri May 17 17:40:00 1996
--- console/HPPAMP/Makefile	Mon May 13 16:55:09 1996
***************
*** 0 ****
--- 1,14 ----
+ PVM_ARCH	=	HPPAMP
+ CONFFILE	=	$(PVM_ROOT)/conf/$(PVM_ARCH).def
+ LIBDIR		=	$(PVM_ROOT)/lib/$(PVM_ARCH)
+ #
+ install:	default $(LIBDIR)
+ 
+ default:
+ 	make PVMLIB=-lpvm3s -f $(CONFFILE) -f ../Makefile.aimk install
+ 
+ clean:
+ 	make -f $(CONFFILE) -f ../Makefile.aimk clean
+ 
+ $(LIBDIR):
+ 	mkdir $(LIBDIR)
*** ../netlib/pvm3.3.10/console/cmds.c	Fri Nov 10 16:58:37 1995
--- console/cmds.c	Tue May 14 12:26:22 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	PVM console commands.
   *
  $Log: cmds.c,v $
+  * Revision 1.9  1996/05/14  16:26:14  manchek
+  * added export and unexport commands
+  *
   * Revision 1.8  1995/11/02  15:11:40  manchek
   * added to tickle help
   *
***************
*** 93,98 ****
--- 96,102 ----
  int conf_cmd();
  int delete_cmd();
  int echo_cmd();
+ int export_cmd();
  int halt_cmd();
  int help_cmd();
  int id_cmd();
***************
*** 114,119 ****
--- 118,124 ----
  int tickle_cmd();
  int trace_cmd();
  int unalias_cmd();
+ int unexport_cmd();
  int version_cmd();
  
  extern struct alias *aliases;			/* from cons.c */
***************
*** 132,137 ****
--- 137,143 ----
  	{ "conf",    1, 1, conf_cmd },
  	{ "delete",  2, 0, delete_cmd },
  	{ "echo",    1, 0, echo_cmd },
+ 	{ "export",    1, 0, export_cmd },
  	{ "halt",    1, 1, halt_cmd },
  	{ "help",    1, 2, help_cmd },
  	{ "id",      1, 1, id_cmd },
***************
*** 152,162 ****
  	{ "trace",   1, 0, trace_cmd },
  	{ "tickle",  2, 11, tickle_cmd },
  	{ "unalias", 2, 0, unalias_cmd },
  	{ "version", 1, 1, version_cmd },
  	{ 0, 0, 0, 0 }
  };
  
! static char rcsid[] = "$Id: cmds.c,v 1.8 1995/11/02 15:11:40 manchek Exp $";
  
  
  freealias(ap)
--- 158,169 ----
  	{ "trace",   1, 0, trace_cmd },
  	{ "tickle",  2, 11, tickle_cmd },
  	{ "unalias", 2, 0, unalias_cmd },
+ 	{ "unexport", 1, 0, unexport_cmd },
  	{ "version", 1, 1, version_cmd },
  	{ 0, 0, 0, 0 }
  };
  
! static char rcsid[] = "$Id: cmds.c,v 1.9 1996/05/14 16:26:14 manchek Exp $";
  
  
  freealias(ap)
***************
*** 444,449 ****
--- 451,459 ----
  	"echo echo   - Echo arguments",
  	"echo Syntax:  echo [ arg ... ]",
  
+ 	"export export - Add environment variables to spawn export list",
+ 	"export Syntax:  export [ varname ... ]",
+ 
  	"halt halt   - Stop pvmds",
  	"halt Syntax:  halt",
  
***************
*** 567,572 ****
--- 577,585 ----
  	"unalias unalias - Undefine command alias",
  	"unalias Syntax:  unalias name ...",
  
+ 	"unexport unexport - Remove environment variables from spawn export list",
+ 	"unexport Syntax:  unexport [ varname ... ]",
+ 
  	"version version - Show libpvm version",
  	"version Syntax:  version",
  	0
***************
*** 1351,1356 ****
--- 1364,1400 ----
  	ac = ac;
  	av = av;
  	printf("%s\n", pvm_version());
+ 	return 0;
+ }
+ 
+ 
+ export_cmd(ac, av)
+ 	int ac;
+ 	char **av;
+ {
+ 	int i;
+ 	char *p;
+ 
+ 	if (ac == 1) {
+ 		p = getenv("PVM_EXPORT");
+ 		printf("PVM_EXPORT=%s\n", p ? p : "");
+ 
+ 	} else {
+ 		for (i = 1; i < ac; i++)
+ 			pvm_export(av[i]);
+ 	}
+ 	return 0;
+ }
+ 
+ 
+ unexport_cmd(ac, av)
+ 	int ac;
+ 	char **av;
+ {
+ 	int i;
+ 
+ 	for (i = 1; i < ac; i++)
+ 		pvm_unexport(av[i]);
  	return 0;
  }
  
*** ../netlib/pvm3.3.10/doc/bugreport	Fri Nov 10 16:58:37 1995
--- doc/bugreport	Mon May 13 15:17:56 1996
***************
*** 22,27 ****
--- 22,29 ----
  
  * The machine architecture PVM chooses for you (e.g. ALPHA).
  
+ * What shell you use (csh, ksh, ...).
+ 
  * A short description of the problem (what happens, when it happens,
    what you did, etc.).  Include any relevant input you typed and output
    printed by PVM.  Don't edit the output to format it or summarize it
*** ../netlib/pvm3.3.10/examples/SP2MPI/Makefile	Wed May 24 21:36:07 1995
--- examples/SP2MPI/Makefile	Tue May 14 10:32:25 1996
***************
*** 23,29 ****
  ARCHCFLAGS	=
  
  CC		=	cc
! MPICC	=	mpicc -us
  CFLAGS	=	-g -I../../include $(ARCHCFLAGS)
  LIBS	=	$(PVMLIB) $(ARCHLIB)
  NODELIBS	=	$(PVMPELIB) $(ARCHLIB)
--- 23,29 ----
  ARCHCFLAGS	=
  
  CC		=	cc
! MPICC	=	mpcc
  CFLAGS	=	-g -I../../include $(ARCHCFLAGS)
  LIBS	=	$(PVMLIB) $(ARCHLIB)
  NODELIBS	=	$(PVMPELIB) $(ARCHLIB)
***************
*** 30,43 ****
  GLIBS	=	$(PVM_ROOT)/lib/$(PVM_ARCH)/libgpvm3.a
  
  F77     =	f77
! MPIF77  =	mpixlf -us
  FFLAGS	=	-g $(ARCHCFLAGS) 
  FLIBS	=	$(PVM_ROOT)/lib/$(PVM_ARCH)/libfpvm3.a
  
  
! default:	master slave 
  
! c-all:	master nntime slave spmd spmdh timing timing_slave
  
  f-all:	fmaster fslave fspmd fspmdh testall
  
--- 30,43 ----
  GLIBS	=	$(PVM_ROOT)/lib/$(PVM_ARCH)/libgpvm3.a
  
  F77     =	f77
! MPIF77  =	mpxlf
  FFLAGS	=	-g $(ARCHCFLAGS) 
  FLIBS	=	$(PVM_ROOT)/lib/$(PVM_ARCH)/libfpvm3.a
  
  
! default:	c-all f-all
  
! c-all:	master nntime slave spmd spmdh timing timing_slave starter
  
  f-all:	fmaster fslave fspmd fspmdh testall
  
***************
*** 67,102 ****
  	mv spmd $(XDIR)
  
  nntimeh: $(SDIR)/nntime.c  $(XDIR)
! 	$(CC) $(CFLAGS) -DPVM -o nntimeh $(SDIR)/nntime.c $(LIBS)
  	mv nntimeh $(XDIR)
  
  nntime: $(SDIR)/nntime.c  $(XDIR)
! 	$(MPICC) $(CFLAGS) -D$(PVM_ARCH)_NODE -DPVM -o nntime $(SDIR)/nntime.c $(NODELIBS)
  	mv nntime $(XDIR)
  
  fspmdh: $(SDIR)/spmd.f  $(XDIR)
! 	$(F77) $(FFLAGS) -o spmdh $(SDIR)/spmd.f $(FLIBS) $(LIBS) $(GLIBS)
! 	mv spmdh $(XDIR)
  
  fspmd: $(SDIR)/spmd.f  $(XDIR)
! 	$(MPIF77) $(FFLAGS) -o spmd $(SDIR)/spmd.f $(FLIBS) $(NODELIBS) $(GLIBS)
! 	mv spmd $(XDIR)
  
  master: $(SDIR)/master1.c  $(XDIR)
  	$(CC) $(CFLAGS) -o master1 $(SDIR)/master1.c  $(LIBS)
  	mv master1 $(XDIR)
  
  slave: $(SDIR)/slave1.c  $(XDIR)
  	$(MPICC) $(CFLAGS) -o slave1 $(SDIR)/slave1.c  $(NODELIBS)
  	mv slave1 $(XDIR)
  
  fmaster: $(SDIR)/master1.f  $(XDIR)
! 	$(F77) $(FFLAGS) -o master1 $(SDIR)/master1.f $(FLIBS) $(LIBS)
! 	mv master1 $(XDIR)
  
  fslave: $(SDIR)/slave1.f  $(XDIR)
! 	$(MPIF77) $(FFLAGS) -o slave1 $(SDIR)/slave1.f $(FLIBS) $(NODELIBS)
! 	mv slave1 $(XDIR)
  
  testall: $(SDIR)/testall.f  $(XDIR)
  	$(F77) $(FFLAGS) -o testall $(SDIR)/testall.f $(FLIBS) $(LIBS)
--- 67,106 ----
  	mv spmd $(XDIR)
  
  nntimeh: $(SDIR)/nntime.c  $(XDIR)
! 	$(CC) $(CFLAGS) -DPVM -o nntimeh $(SDIR)/nntime.c $(LIBS) $(GLIBS)
  	mv nntimeh $(XDIR)
  
  nntime: $(SDIR)/nntime.c  $(XDIR)
! 	$(MPICC) $(CFLAGS) -D$(PVM_ARCH)_NODE -DPVM -o nntime $(SDIR)/nntime.c $(NODELIBS) $(GLIBS)
  	mv nntime $(XDIR)
  
  fspmdh: $(SDIR)/spmd.f  $(XDIR)
! 	$(F77) $(FFLAGS) -o fspmdh $(SDIR)/spmd.f $(FLIBS) $(LIBS) $(GLIBS)
! 	mv fspmdh $(XDIR)
  
  fspmd: $(SDIR)/spmd.f  $(XDIR)
! 	$(MPIF77) $(FFLAGS) -o fspmd $(SDIR)/spmd.f $(FLIBS) $(NODELIBS) $(GLIBS)
! 	mv fspmd $(XDIR)
  
  master: $(SDIR)/master1.c  $(XDIR)
  	$(CC) $(CFLAGS) -o master1 $(SDIR)/master1.c  $(LIBS)
  	mv master1 $(XDIR)
  
+ starter: $(SDIR)/starter.c  $(XDIR)
+ 	$(CC) $(CFLAGS) -o starter $(SDIR)/starter.c  $(LIBS)
+ 	mv starter $(XDIR)
+ 
  slave: $(SDIR)/slave1.c  $(XDIR)
  	$(MPICC) $(CFLAGS) -o slave1 $(SDIR)/slave1.c  $(NODELIBS)
  	mv slave1 $(XDIR)
  
  fmaster: $(SDIR)/master1.f  $(XDIR)
! 	$(F77) $(FFLAGS) -o fmaster1 $(SDIR)/master1.f $(FLIBS) $(LIBS)
! 	mv fmaster1 $(XDIR)
  
  fslave: $(SDIR)/slave1.f  $(XDIR)
! 	$(MPIF77) $(FFLAGS) -o fslave1 $(SDIR)/slave1.f $(FLIBS) $(NODELIBS)
! 	mv fslave1 $(XDIR)
  
  testall: $(SDIR)/testall.f  $(XDIR)
  	$(F77) $(FFLAGS) -o testall $(SDIR)/testall.f $(FLIBS) $(LIBS)
*** ../netlib/pvm3.3.10/examples/nntime.c	Fri Sep  8 13:58:56 1995
--- examples/nntime.c	Tue May 14 10:33:47 1996
***************
*** 75,82 ****
  	int ntask = 0, i; 
  	char *grpname;
  	char **tmp_argv;
  
! #ifdef PVM
  
  	if ((mytid = pvm_mytid()) < 0)
  		exit(-1);
--- 75,86 ----
  	int ntask = 0, i; 
  	char *grpname;
  	char **tmp_argv;
+ #if defined(SP2MPI_NODE)
+         int info, ntasks;
+         struct pvmtaskinfo *taskp;
+ #endif /*SP2MPI_NODE*/
  
! #if defined(PVM) && !defined(SP2MPI_NODE)
  
  	if ((mytid = pvm_mytid()) < 0)
  		exit(-1);
***************
*** 119,124 ****
--- 123,148 ----
  	pvm_exit();
  
  #else /*PVM*/
+ 
+ #if defined(SP2MPI_NODE)
+ #define PROGRAM "nntime"
+ 
+ 	if ((mytid = pvm_mytid()) < 0)
+ 		exit(-1);
+ 	momtid = pvm_parent();
+ 	pvm_setopt(PvmRoute, PvmRouteDirect);	
+ 	info = pvm_tasks(0, &ntasks, &taskp);
+ 	if (!info) {
+ 		for (i=0;i < ntasks;i++) {
+ 			if ((strcmp(taskp[i].ti_a_out,PROGRAM) == 0) && 
+ 			    (mytid != taskp[i].ti_tid)){
+ 				pingpong(taskp[i].ti_tid);
+ 			}
+ 		}
+ 	}
+ 	pvm_exit();
+ 
+ #endif /*SP2MPI_NODE*/
  
  #if defined(PGON_NODE) || defined(I860_NODE)
  
*** /dev/null	Fri May 17 17:40:12 1996
--- examples/starter.c	Tue May 14 10:34:08 1996
***************
*** 0 ****
--- 1,87 ----
+ #include <stdio.h>
+ #include "pvm3.h"
+ char prog_name[256];
+ 
+ void usage(void);
+ 
+ /* extern variables */
+ extern int errno, optind;
+ extern char *optarg;
+ 
+ main(argc, argv)
+     int argc;
+     char **argv;
+ {
+     int mytid;                  /* my task id */
+     int tids[32];		/* slave task ids */
+     int n, nproc, numt, i, who, msgtype, nhost, narch, ch;
+     float data[100], result[32];
+     struct pvmhostinfo *hostp[32];
+     int info, ntasks, done, j;
+     struct pvmtaskinfo *taskp;
+ 
+     /* Set number of slaves to start */
+     while ((ch = getopt(argc, argv, "n:")) != EOF) {
+        switch(ch) {
+           case 'n': nproc = atoi(optarg);
+                     break;
+           default:  usage();
+                     break;
+        }
+     }
+     argc -= optind;
+     argv += optind;
+ 
+     if (argc < 1) {
+        usage();
+     }
+ 
+     /* Get program name */
+     strcpy(prog_name, argv[0]);
+     argv += 1;
+ 
+     printf("%s program to be spawned %d times.\n", prog_name, nproc);
+ 
+     /* enroll in pvm */
+     mytid = pvm_mytid();
+     pvm_setopt(PvmAutoErr, 1);
+     pvm_catchout(stdout);
+ 
+     /* start up slave tasks */
+     numt=pvm_spawn(prog_name, argv, 0, "", nproc, tids);
+     if( numt < nproc ){
+        printf("Trouble spawning slaves. Aborting. Error codes are:\n");
+        for( i=numt ; i<nproc ; i++ ) {
+           printf("TID %d %d\n",i,tids[i]);
+        }
+        for( i=0 ; i<numt ; i++ ){
+           pvm_kill( tids[i] );
+        }
+        pvm_exit();
+        exit();
+     }
+     
+     done = 1;
+     taskp = NULL;
+     while(done) {
+        sleep(1);
+        info = pvm_tasks(0, &ntasks, &taskp);
+        done = 0;
+        for (j=0; j < numt; j++)
+           for (i=0; i < ntasks; i++) {
+              if (tids[j] == taskp[i].ti_tid) {
+                 done = 1;
+                 break;
+              }
+           }
+     }
+     /* Program Finished exit PVM before stopping */
+     pvm_exit();
+ }
+ 
+ void usage(void)
+ {
+     printf("starter -n <number to spawn> <program name> <args>\n");
+     exit(1);
+ }
+ 
*** ../netlib/pvm3.3.10/include/pvm3.h	Thu May 11 12:15:28 1995
--- include/pvm3.h	Tue May 14 12:20:04 1996
***************
*** 205,210 ****
--- 205,211 ----
  int pvm_delete		__ProtoGlarp__(( char *, int ));
  int pvm_delhosts	__ProtoGlarp__(( char **, int, int * ));
  int pvm_exit		__ProtoGlarp__(( void ));
+ int pvm_export		__ProtoGlarp__(( char * ));
  int pvm_freebuf		__ProtoGlarp__(( int ));
  int pvm_gather		__ProtoGlarp__(( void*, void*,
  										int, int, int, char*, int));
***************
*** 293,298 ****
--- 294,300 ----
  										int *, int * ));
  int pvm_tidtohost	__ProtoGlarp__(( int ));
  int pvm_trecv		__ProtoGlarp__(( int, int, struct timeval * ));
+ int pvm_unexport	__ProtoGlarp__(( char * ));
  int pvm_unpackf		__ProtoGlarp__(( const char *, ... ));
  int pvm_upkbyte		__ProtoGlarp__(( char *, int, int ));
  int pvm_upkcplx		__ProtoGlarp__(( float *, int, int ));
*** /dev/null	Fri May 17 17:40:16 1996
--- lib/kshrc.stub	Tue May 14 14:02:48 1996
***************
*** 0 ****
--- 1,30 ----
+ 
+ #
+ # append this file to your .profile to set path according to machine type.
+ # you may wish to use this for your own programs (edit the last part to
+ # point to a different directory f.e. ~/bin/_$PVM_ARCH.
+ #
+ if [[ -z $PVM_ROOT ]]; then
+         if [[ -d ~/pvm3 ]] then
+                 export PVM_ROOT=~/pvm3
+         else
+                 print "Warning - PVM_ROOT not defined"
+                 print "To use PVM, define PVM_ROOT and rerun your .profile"
+         fi
+ fi
+ 
+ if [[ -n $PVM_ROOT ]]; then
+         export PVM_ARCH=`$PVM_ROOT/lib/pvmgetarch`
+ #
+ # uncomment one of the following lines if you want the PVM commands directory
+ # to be added to your shell path.
+ #
+ #       export PATH=$PATH:$PVM_ROOT/lib            # generic
+ #       export PATH=$PATH:$PVM_ROOT/lib/$PVM_ARCH  # arch-specific
+ #
+ # uncomment the following line if you want the PVM executable directory
+ # to be added to your shell path.
+ #
+ #       export PATH=$PATH:$PVM_ROOT/bin/$PVM_ARCH
+ fi
+ 
*** ../netlib/pvm3.3.10/lib/pvm	Fri Sep  8 13:58:57 1995
--- lib/pvm	Mon May 13 15:28:11 1996
***************
*** 29,34 ****
--- 29,45 ----
  	fi
  ;; esac
  
+ #
+ # these lines let you set environment variables on systems
+ # where a shell profile doesn't get read when rshing in.
+ #
+ if [ -f $PVM_ROOT/.pvmprofile ]; then
+ 	. $PVM_ROOT/.pvmprofile
+ fi
+ if [ -f $HOME/.pvmprofile ]; then
+ 	. $HOME/.pvmprofile
+ fi
+ 
  case "x$PVM_ARCH" in x | xUNKNOWN )
  	PVM_ARCH="`$PVM_ROOT/lib/pvmgetarch`"
  	case "x$PVM_ARCH" in x )
*** ../netlib/pvm3.3.10/lib/pvmd	Fri Sep  8 13:58:57 1995
--- lib/pvmd	Mon May 13 15:28:44 1996
***************
*** 29,34 ****
--- 29,45 ----
  	fi
  ;; esac
  
+ #
+ # these lines let you set environment variables on systems
+ # where a shell profile doesn't get read when rshing in.
+ #
+ if [ -f $PVM_ROOT/.pvmprofile ]; then
+ 	. $PVM_ROOT/.pvmprofile
+ fi
+ if [ -f $HOME/.pvmprofile ]; then
+ 	. $HOME/.pvmprofile
+ fi
+ 
  case "x$PVM_ARCH" in x | xUNKNOWN )
  	PVM_ARCH="`$PVM_ROOT/lib/pvmgetarch`"
  	case "x$PVM_ARCH" in x )
*** ../netlib/pvm3.3.10/lib/pvmgetarch	Fri Nov 10 16:58:38 1995
--- lib/pvmgetarch	Mon May 13 15:30:51 1996
***************
*** 57,62 ****
--- 57,64 ----
  	FreeBSD,i386 )          ARCH=FREEBSD ;;
  	SUPER-UX,SX-3 )         ARCH=SX3 ;;
  	uts,* )                 ARCH=UTS2 ;;
+ 	realix,M88* )           ARCH=M88K ;;
+ 	DomainOS,DN* )          ARCH=APOLLO ;;
  	esac
  fi
  
***************
*** 183,188 ****
--- 185,194 ----
  	if [ $nproc -gt 1 ]; then ARCH=RS6KMP; fi
  fi
  if [ "$ARCH" = HPPA -a -f /bin/sysinfo ]; then ARCH=CSPP; fi
+ if [ "$ARCH" = HPPA ]; then
+ 	nproc="`/usr/bin/vmstat -n | wc -l`"
+ 	if [ $nproc -gt 8 ]; then ARCH=HPPAMP; fi
+ fi
  
  #
  # ugh, done.
*** ../netlib/pvm3.3.10/libfpvm/CSPP/Makefile	Thu May 11 12:35:36 1995
--- libfpvm/CSPP/Makefile	Mon May 13 15:50:20 1996
***************
*** 11,17 ****
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
--- 11,17 ----
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
***************
*** 65,70 ****
--- 65,71 ----
  	pvmfsetrbuf.o \
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
  	pvmftasks.o \
  	pvmftidtoh.o \
  	pvmftrecv.o \
***************
*** 321,326 ****
--- 322,331 ----
  	$(MX) $(M4FILE) $(SDIR)/pvmfspawn.m4 $(RWBSPECIAL) >> pvmfspawn.c
  	$(CC) $(CFLAGS) pvmfspawn.c
  	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
  pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(MX) $(M4FILE) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c
*** ../netlib/pvm3.3.10/libfpvm/HPPA/Makefile	Thu May 11 12:35:43 1995
--- libfpvm/HPPA/Makefile	Mon May 13 15:50:59 1996
***************
*** 11,17 ****
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
--- 11,17 ----
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
***************
*** 65,70 ****
--- 65,71 ----
  	pvmfsetrbuf.o \
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
  	pvmftasks.o \
  	pvmftidtoh.o \
  	pvmftrecv.o \
***************
*** 321,326 ****
--- 322,332 ----
  	$(MX) $(M4FILE) $(SDIR)/pvmfspawn.m4 $(RWBSPECIAL) >> pvmfspawn.c
  	$(CC) $(CFLAGS) pvmfspawn.c
  	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 $(RWBSPECIAL) >> pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
  pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(MX) $(M4FILE) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c
*** ../netlib/pvm3.3.10/libfpvm/HPPAMP/Makefile	Wed May 24 15:23:35 1995
--- libfpvm/HPPAMP/Makefile	Mon May 13 15:51:06 1996
***************
*** 11,17 ****
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
--- 11,17 ----
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
***************
*** 65,70 ****
--- 65,71 ----
  	pvmfsetrbuf.o \
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
  	pvmftasks.o \
  	pvmftidtoh.o \
  	pvmftrecv.o \
***************
*** 321,326 ****
--- 322,332 ----
  	$(MX) $(M4FILE) $(SDIR)/pvmfspawn.m4 $(RWBSPECIAL) >> pvmfspawn.c
  	$(CC) $(CFLAGS) pvmfspawn.c
  	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 $(RWBSPECIAL) >> pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
  pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(MX) $(M4FILE) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c
*** ../netlib/pvm3.3.10/libfpvm/Makefile.aimk	Thu May 11 12:35:03 1995
--- libfpvm/Makefile.aimk	Mon May 13 15:51:18 1996
***************
*** 4,10 ****
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4
  FORTRAN=`case "$(FC)@$(F77)" in *@) echo $(FC) ;; @*) echo $(F77) ;; *) echo f77;; esac`
--- 4,10 ----
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4
  FORTRAN=`case "$(FC)@$(F77)" in *@) echo $(FC) ;; @*) echo $(F77) ;; *) echo f77;; esac`
***************
*** 57,62 ****
--- 57,63 ----
  	pvmfsetrbuf.o \
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
  	pvmftasks.o \
  	pvmftidtoh.o \
  	pvmftrecv.o \
***************
*** 267,272 ****
--- 268,277 ----
  	$(M4) $(M4FILE) $(SDIR)/pvmfspawn.m4 > pvmfspawn.c
  	$(CC) $(CFLAGS) pvmfspawn.c
  	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
  pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(CC) $(CFLAGS) pvmftasks.c
*** ../netlib/pvm3.3.10/libfpvm/Makefile.mimd	Tue Apr 11 09:32:21 1995
--- libfpvm/Makefile.mimd	Mon May 13 15:51:29 1996
***************
*** 5,11 ****
  SHELL	=	/bin/sh
  SDIR =  ..
  # CC   =  cc
! CFLAGS = -O -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4
  FORTRAN=`case "$(FC)@$(F77)" in *@) echo $(FC) ;; @*) echo $(F77) ;; *) echo f77;; esac`
--- 5,11 ----
  SHELL	=	/bin/sh
  SDIR =  ..
  # CC   =  cc
! CFLAGS = -O -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4
  FORTRAN=`case "$(FC)@$(F77)" in *@) echo $(FC) ;; @*) echo $(F77) ;; *) echo f77;; esac`
***************
*** 56,61 ****
--- 56,62 ----
  	pvmfsetrbuf.o \
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
  	pvmftasks.o \
  	pvmftidtoh.o \
  	pvmfunpack.o
***************
*** 257,262 ****
--- 258,267 ----
  	$(M4) $(M4FILE) $(SDIR)/pvmfspawn.m4 > pvmfspawn.c
  	$(CC) $(CFLAGS) pvmfspawn.c
  	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
  pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(CC) $(CFLAGS) pvmftasks.c
*** ../netlib/pvm3.3.10/libfpvm/RS6K/Makefile	Thu May 11 12:35:51 1995
--- libfpvm/RS6K/Makefile	Mon May 13 15:51:40 1996
***************
*** 11,17 ****
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
--- 11,17 ----
  
  SHELL	=	/bin/sh
  SDIR =  ..
! CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
  RM = rm -f
  M4 = m4 -DUSCORYES
  MX = m4
***************
*** 65,70 ****
--- 65,71 ----
  	pvmfsetrbuf.o \
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
  	pvmftasks.o \
  	pvmftidtoh.o \
  	pvmftrecv.o \
***************
*** 321,326 ****
--- 322,332 ----
  	$(MX) $(M4FILE) $(SDIR)/pvmfspawn.m4 $(RWBSPECIAL) >> pvmfspawn.c
  	$(CC) $(CFLAGS) pvmfspawn.c
  	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 $(RWBSPECIAL) >> pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
  pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(MX) $(M4FILE) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c
*** /dev/null	Fri May 17 17:40:23 1996
--- libfpvm/RS6KMP/Makefile	Mon May 13 15:52:18 1996
***************
*** 0 ****
--- 1,349 ----
+ ARCHCFLAGS	=	-DSYSVSIGNAL
+ ARCHDLIB	=
+ ARCHDOBJ	=
+ ARCHLIB	=
+ HASRANLIB	=	t
+ PVM_ARCH	=	RS6KMP
+ RWBSPECIAL = |sed '/^.include \"pvm3.h\"/d' |sed '/^.include \"pvm_consts.h\"/d'
+ #
+ # Generic Makefile body to be concatenated to config header.
+ #
+ 
+ SHELL	=	/bin/sh
+ SDIR =  ..
+ CFLAGS = -D$(PVM_ARCH) -c $(ARCHCFLAGS) -I$(SDIR) -I$(SDIR)/../include -I$(SDIR)/../src $(CDEBUGFLAGS)
+ RM = rm -f
+ M4 = m4 -DUSCORYES
+ MX = m4
+ FORTRAN=`case "$(FC)@$(F77)" in *@) echo $(FC) ;; @*) echo $(F77) ;; *) echo f77;; esac`
+ M4FILE	=	../../conf/$(PVM_ARCH).m4
+ PVMLDIR	=	../../lib/$(PVM_ARCH)
+ 
+ LOBS = pvmfaddhost.o \
+ 	pvmfarchcode.o \
+ 	pvmfbarrier.o \
+ 	pvmfbcast.o \
+ 	pvmfbufinfo.o \
+ 	pvmfcatchout.o \
+ 	pvmfconfig.o \
+ 	pvmfdelhost.o \
+ 	pvmfexit.o \
+ 	pvmffreebuf.o \
+ 	pvmffrzgrp.o \
+ 	pvmfgather.o \
+ 	pvmfgetinst.o \
+ 	pvmfgetopt.o \
+ 	pvmfgetrbuf.o \
+ 	pvmfgetsbuf.o \
+ 	pvmfgettid.o \
+ 	pvmfgsize.o \
+ 	pvmfhalt.o \
+ 	pvmfhostsync.o \
+ 	pvmfinitsend.o \
+ 	pvmfjoingrp.o \
+ 	pvmfkill.o \
+ 	pvmflvgrp.o \
+ 	pvmfmcast.o \
+ 	pvmfmkbuf.o \
+ 	pvmfmstat.o \
+ 	pvmfmytid.o \
+ 	pvmfnotify.o \
+ 	pvmfnrecv.o \
+ 	pvmfpack.o \
+ 	pvmfparent.o \
+ 	pvmfperror.o \
+ 	pvmfprecv.o \
+ 	pvmfprobe.o \
+ 	pvmfpsend.o \
+ 	pvmfpstat.o \
+ 	pvmfrecv.o \
+ 	pvmfreduce.o \
+ 	pvmfscatter.o \
+ 	pvmfsend.o \
+ 	pvmfsendsig.o \
+ 	pvmfsetopt.o \
+ 	pvmfsetrbuf.o \
+ 	pvmfsetsbuf.o \
+ 	pvmfspawn.o \
+ 	pvmfstartpvmd.o \
+ 	pvmftasks.o \
+ 	pvmftidtoh.o \
+ 	pvmftrecv.o \
+ 	pvmfunpack.o
+ 
+ default:	libfpvm3.a
+ 
+ install:	libfpvm3.a $(PVMLDIR)
+ 	mv libfpvm3.a $(PVMLDIR)
+ 	case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(PVMLDIR)/libfpvm3.a ;; esac
+ 
+ $(PVMLDIR):
+ 	- mkdir $(PVMLDIR)
+ 
+ libfpvm3.a:  $(LOBS) ftocstr.o
+ 	ar cr libfpvm3.a $?
+ 	case x$(HASRANLIB) in xt ) echo ranlib; ranlib libfpvm3.a ;; esac
+ 
+ clean:
+ 	rm -f $(LOBS) ftocstr.o libfpvm3.a
+ 
+ tidy:
+ 	rm -f $(LOBS)
+ 
+ ftocstr.o: $(SDIR)/ftocstr.c $(SDIR)/../src/bfunc.h
+ 	$(CC) $(CFLAGS) $(SDIR)/ftocstr.c
+ pvmfaddhost.o:	$(SDIR)/pvmfaddhost.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfaddhost.m4 > pvmfaddhost.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfaddhost.m4 $(RWBSPECIAL) >> pvmfaddhost.c
+ 	$(CC) $(CFLAGS) pvmfaddhost.c
+ 	$(RM) pvmfaddhost.c
+ pvmfarchcode.o:	$(SDIR)/pvmfarchcode.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfarchcode.m4 > pvmfarchcode.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfarchcode.m4 $(RWBSPECIAL) >> pvmfarchcode.c
+ 	$(CC) $(CFLAGS) pvmfarchcode.c
+ 	$(RM) pvmfarchcode.c
+ pvmfbarrier.o:	$(SDIR)/pvmfbarrier.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfbarrier.m4 > pvmfbarrier.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfbarrier.m4 $(RWBSPECIAL) >> pvmfbarrier.c
+ 	$(CC) $(CFLAGS) pvmfbarrier.c
+ 	$(RM) pvmfbarrier.c
+ pvmfbcast.o:	$(SDIR)/pvmfbcast.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfbcast.m4 > pvmfbcast.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfbcast.m4 $(RWBSPECIAL) >> pvmfbcast.c
+ 	$(CC) $(CFLAGS) pvmfbcast.c
+ 	$(RM) pvmfbcast.c
+ pvmfbufinfo.o:	$(SDIR)/pvmfbufinfo.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfbufinfo.m4 > pvmfbufinfo.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfbufinfo.m4 $(RWBSPECIAL) >> pvmfbufinfo.c
+ 	$(CC) $(CFLAGS) pvmfbufinfo.c
+ 	$(RM) pvmfbufinfo.c
+ pvmfcatchout.o:	$(SDIR)/pvmfcatchout.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfcatchout.m4 > pvmfcatchout.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfcatchout.m4 $(RWBSPECIAL) >> pvmfcatchout.c
+ 	$(CC) $(CFLAGS) pvmfcatchout.c
+ 	$(RM) pvmfcatchout.c
+ pvmfconfig.o:	$(SDIR)/pvmfconfig.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfconfig.m4 > pvmfconfig.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfconfig.m4 $(RWBSPECIAL) >> pvmfconfig.c
+ 	$(CC) $(CFLAGS) pvmfconfig.c
+ 	$(RM) pvmfconfig.c
+ pvmfdelhost.o:	$(SDIR)/pvmfdelhost.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfdelhost.m4 > pvmfdelhost.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfdelhost.m4 $(RWBSPECIAL) >> pvmfdelhost.c
+ 	$(CC) $(CFLAGS) pvmfdelhost.c
+ 	$(RM) pvmfdelhost.c
+ pvmfexit.o:	$(SDIR)/pvmfexit.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfexit.m4 > pvmfexit.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfexit.m4 $(RWBSPECIAL) >> pvmfexit.c
+ 	$(CC) $(CFLAGS) pvmfexit.c
+ 	$(RM) pvmfexit.c
+ pvmffreebuf.o:	$(SDIR)/pvmffreebuf.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmffreebuf.m4 > pvmffreebuf.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmffreebuf.m4 $(RWBSPECIAL) >> pvmffreebuf.c
+ 	$(CC) $(CFLAGS) pvmffreebuf.c
+ 	$(RM) pvmffreebuf.c
+ pvmffrzgrp.o:	$(SDIR)/pvmffrzgrp.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmffrzgrp.m4 > pvmffrzgrp.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmffrzgrp.m4 $(RWBSPECIAL) >> pvmffrzgrp.c
+ 	$(CC) $(CFLAGS) pvmffrzgrp.c
+ 	$(RM) pvmffrzgrp.c
+ pvmfgather.o:	$(SDIR)/pvmfgather.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgather.m4 > pvmfgather.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgather.m4 $(RWBSPECIAL) >> pvmfgather.c
+ 	$(CC) $(CFLAGS) pvmfgather.c
+ 	$(RM) pvmfgather.c
+ pvmfgetinst.o:	$(SDIR)/pvmfgetinst.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgetinst.m4 > pvmfgetinst.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgetinst.m4 $(RWBSPECIAL) >> pvmfgetinst.c
+ 	$(CC) $(CFLAGS) pvmfgetinst.c
+ 	$(RM) pvmfgetinst.c
+ pvmfgetopt.o:	$(SDIR)/pvmfgetopt.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgetopt.m4 > pvmfgetopt.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgetopt.m4 $(RWBSPECIAL) >> pvmfgetopt.c
+ 	$(CC) $(CFLAGS) pvmfgetopt.c
+ 	$(RM) pvmfgetopt.c
+ pvmfgetrbuf.o:	$(SDIR)/pvmfgetrbuf.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgetrbuf.m4 > pvmfgetrbuf.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgetrbuf.m4 $(RWBSPECIAL) >> pvmfgetrbuf.c
+ 	$(CC) $(CFLAGS) pvmfgetrbuf.c
+ 	$(RM) pvmfgetrbuf.c
+ pvmfgetsbuf.o:	$(SDIR)/pvmfgetsbuf.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgetsbuf.m4 > pvmfgetsbuf.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgetsbuf.m4 $(RWBSPECIAL) >> pvmfgetsbuf.c
+ 	$(CC) $(CFLAGS) pvmfgetsbuf.c
+ 	$(RM) pvmfgetsbuf.c
+ pvmfgettid.o:	$(SDIR)/pvmfgettid.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgettid.m4 > pvmfgettid.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgettid.m4 $(RWBSPECIAL) >> pvmfgettid.c
+ 	$(CC) $(CFLAGS) pvmfgettid.c
+ 	$(RM) pvmfgettid.c
+ pvmfgsize.o:	$(SDIR)/pvmfgsize.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfgsize.m4 > pvmfgsize.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfgsize.m4 $(RWBSPECIAL) >> pvmfgsize.c
+ 	$(CC) $(CFLAGS) pvmfgsize.c
+ 	$(RM) pvmfgsize.c
+ pvmfhalt.o:	$(SDIR)/pvmfhalt.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfhalt.m4 > pvmfhalt.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfhalt.m4 $(RWBSPECIAL) >> pvmfhalt.c
+ 	$(CC) $(CFLAGS) pvmfhalt.c
+ 	$(RM) pvmfhalt.c
+ pvmfhostsync.o:	$(SDIR)/pvmfhostsync.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfhostsync.m4 > pvmfhostsync.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfhostsync.m4 $(RWBSPECIAL) >> pvmfhostsync.c
+ 	$(CC) $(CFLAGS) pvmfhostsync.c
+ 	$(RM) pvmfhostsync.c
+ pvmfinitsend.o:	$(SDIR)/pvmfinitsend.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfinitsend.m4 > pvmfinitsend.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfinitsend.m4 $(RWBSPECIAL) >> pvmfinitsend.c
+ 	$(CC) $(CFLAGS) pvmfinitsend.c
+ 	$(RM) pvmfinitsend.c
+ pvmfjoingrp.o:	$(SDIR)/pvmfjoingrp.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfjoingrp.m4 > pvmfjoingrp.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfjoingrp.m4 $(RWBSPECIAL) >> pvmfjoingrp.c
+ 	$(CC) $(CFLAGS) pvmfjoingrp.c
+ 	$(RM) pvmfjoingrp.c
+ pvmfkill.o:	$(SDIR)/pvmfkill.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfkill.m4 > pvmfkill.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfkill.m4 $(RWBSPECIAL) >> pvmfkill.c
+ 	$(CC) $(CFLAGS) pvmfkill.c
+ 	$(RM) pvmfkill.c
+ pvmflvgrp.o:	$(SDIR)/pvmflvgrp.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmflvgrp.m4 > pvmflvgrp.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmflvgrp.m4 $(RWBSPECIAL) >> pvmflvgrp.c
+ 	$(CC) $(CFLAGS) pvmflvgrp.c
+ 	$(RM) pvmflvgrp.c
+ pvmfmcast.o:	$(SDIR)/pvmfmcast.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfmcast.m4 > pvmfmcast.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfmcast.m4 $(RWBSPECIAL) >> pvmfmcast.c
+ 	$(CC) $(CFLAGS) pvmfmcast.c
+ 	$(RM) pvmfmcast.c
+ pvmfmkbuf.o:	$(SDIR)/pvmfmkbuf.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfmkbuf.m4 > pvmfmkbuf.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfmkbuf.m4 $(RWBSPECIAL) >> pvmfmkbuf.c
+ 	$(CC) $(CFLAGS) pvmfmkbuf.c
+ 	$(RM) pvmfmkbuf.c
+ pvmfmstat.o:	$(SDIR)/pvmfmstat.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfmstat.m4 > pvmfmstat.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfmstat.m4 $(RWBSPECIAL) >> pvmfmstat.c
+ 	$(CC) $(CFLAGS) pvmfmstat.c
+ 	$(RM) pvmfmstat.c
+ pvmfmytid.o:	$(SDIR)/pvmfmytid.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfmytid.m4 > pvmfmytid.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfmytid.m4 $(RWBSPECIAL) >> pvmfmytid.c
+ 	$(CC) $(CFLAGS) pvmfmytid.c
+ 	$(RM) pvmfmytid.c
+ pvmfnotify.o:	$(SDIR)/pvmfnotify.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfnotify.m4 > pvmfnotify.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfnotify.m4 $(RWBSPECIAL) >> pvmfnotify.c
+ 	$(CC) $(CFLAGS) pvmfnotify.c
+ 	$(RM) pvmfnotify.c
+ pvmfnrecv.o:	$(SDIR)/pvmfnrecv.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfnrecv.m4 > pvmfnrecv.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfnrecv.m4 $(RWBSPECIAL) >> pvmfnrecv.c
+ 	$(CC) $(CFLAGS) pvmfnrecv.c
+ 	$(RM) pvmfnrecv.c
+ pvmfpack.o:	$(SDIR)/pvmfpack.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfpack.m4 > pvmfpack.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfpack.m4 $(RWBSPECIAL) >> pvmfpack.c
+ 	$(CC) $(CFLAGS) pvmfpack.c
+ 	$(RM) pvmfpack.c
+ pvmfparent.o:	$(SDIR)/pvmfparent.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfparent.m4 > pvmfparent.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfparent.m4 $(RWBSPECIAL) >> pvmfparent.c
+ 	$(CC) $(CFLAGS) pvmfparent.c
+ 	$(RM) pvmfparent.c
+ pvmfperror.o:	$(SDIR)/pvmfperror.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfperror.m4 > pvmfperror.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfperror.m4 $(RWBSPECIAL) >> pvmfperror.c
+ 	$(CC) $(CFLAGS) pvmfperror.c
+ 	$(RM) pvmfperror.c
+ pvmfprecv.o:	$(SDIR)/pvmfprecv.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfprecv.m4 > pvmfprecv.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfprecv.m4 $(RWBSPECIAL) >> pvmfprecv.c
+ 	$(CC) $(CFLAGS) pvmfprecv.c
+ 	$(RM) pvmfprecv.c
+ pvmfprobe.o:	$(SDIR)/pvmfprobe.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfprobe.m4 > pvmfprobe.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfprobe.m4 $(RWBSPECIAL) >> pvmfprobe.c
+ 	$(CC) $(CFLAGS) pvmfprobe.c
+ 	$(RM) pvmfprobe.c
+ pvmfpsend.o:	$(SDIR)/pvmfpsend.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfpsend.m4 > pvmfpsend.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfpsend.m4 $(RWBSPECIAL) >> pvmfpsend.c
+ 	$(CC) $(CFLAGS) pvmfpsend.c
+ 	$(RM) pvmfpsend.c
+ pvmfpstat.o:	$(SDIR)/pvmfpstat.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfpstat.m4 > pvmfpstat.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfpstat.m4 $(RWBSPECIAL) >> pvmfpstat.c
+ 	$(CC) $(CFLAGS) pvmfpstat.c
+ 	$(RM) pvmfpstat.c
+ pvmfrecv.o:	$(SDIR)/pvmfrecv.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfrecv.m4 > pvmfrecv.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfrecv.m4 $(RWBSPECIAL) >> pvmfrecv.c
+ 	$(CC) $(CFLAGS) pvmfrecv.c
+ 	$(RM) pvmfrecv.c
+ pvmfreduce.o:	$(SDIR)/pvmfreduce.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfreduce.m4 > pvmfreduce.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfreduce.m4 $(RWBSPECIAL) >> pvmfreduce.c
+ 	$(CC) $(CFLAGS) pvmfreduce.c
+ 	$(RM) pvmfreduce.c
+ pvmfscatter.o:	$(SDIR)/pvmfscatter.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfscatter.m4 > pvmfscatter.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfscatter.m4 $(RWBSPECIAL) >> pvmfscatter.c
+ 	$(CC) $(CFLAGS) pvmfscatter.c
+ 	$(RM) pvmfscatter.c
+ pvmfsend.o:	$(SDIR)/pvmfsend.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfsend.m4 > pvmfsend.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfsend.m4 $(RWBSPECIAL) >> pvmfsend.c
+ 	$(CC) $(CFLAGS) pvmfsend.c
+ 	$(RM) pvmfsend.c
+ pvmfsendsig.o:	$(SDIR)/pvmfsendsig.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfsendsig.m4 > pvmfsendsig.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfsendsig.m4 $(RWBSPECIAL) >> pvmfsendsig.c
+ 	$(CC) $(CFLAGS) pvmfsendsig.c
+ 	$(RM) pvmfsendsig.c
+ pvmfsetopt.o:	$(SDIR)/pvmfsetopt.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfsetopt.m4 > pvmfsetopt.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfsetopt.m4 $(RWBSPECIAL) >> pvmfsetopt.c
+ 	$(CC) $(CFLAGS) pvmfsetopt.c
+ 	$(RM) pvmfsetopt.c
+ pvmfsetrbuf.o:	$(SDIR)/pvmfsetrbuf.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfsetrbuf.m4 > pvmfsetrbuf.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfsetrbuf.m4 $(RWBSPECIAL) >> pvmfsetrbuf.c
+ 	$(CC) $(CFLAGS) pvmfsetrbuf.c
+ 	$(RM) pvmfsetrbuf.c
+ pvmfsetsbuf.o:	$(SDIR)/pvmfsetsbuf.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfsetsbuf.m4 > pvmfsetsbuf.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfsetsbuf.m4 $(RWBSPECIAL) >> pvmfsetsbuf.c
+ 	$(CC) $(CFLAGS) pvmfsetsbuf.c
+ 	$(RM) pvmfsetsbuf.c
+ pvmfspawn.o:	$(SDIR)/pvmfspawn.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfspawn.m4 > pvmfspawn.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfspawn.m4 $(RWBSPECIAL) >> pvmfspawn.c
+ 	$(CC) $(CFLAGS) pvmfspawn.c
+ 	$(RM) pvmfspawn.c
+ pvmfstartpvmd.o:	$(SDIR)/pvmfstartpvmd.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfstartpvmd.m4 $(RWBSPECIAL) >> pvmfstartpvmd.c
+ 	$(CC) $(CFLAGS) pvmfstartpvmd.c
+ 	$(RM) pvmfstartpvmd.c
+ pvmftasks.o:	$(SDIR)/pvmftasks.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c
+ 	$(CC) $(CFLAGS) pvmftasks.c
+ 	$(RM) pvmftasks.c
+ pvmftidtoh.o:	$(SDIR)/pvmftidtoh.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmftidtoh.m4 > pvmftidtoh.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmftidtoh.m4 $(RWBSPECIAL) >> pvmftidtoh.c
+ 	$(CC) $(CFLAGS) pvmftidtoh.c
+ 	$(RM) pvmftidtoh.c
+ pvmftrecv.o:	$(SDIR)/pvmftrecv.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmftrecv.m4 > pvmftrecv.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmftrecv.m4 $(RWBSPECIAL) >> pvmftrecv.c
+ 	$(CC) $(CFLAGS) pvmftrecv.c
+ 	$(RM) pvmftrecv.c
+ pvmfunpack.o:	$(SDIR)/pvmfunpack.m4 $(M4FILE)
+ 	$(M4) $(M4FILE) $(SDIR)/pvmfunpack.m4 > pvmfunpack.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmfunpack.m4 $(RWBSPECIAL) >> pvmfunpack.c
+ 	$(CC) $(CFLAGS) pvmfunpack.c
+ 	$(RM) pvmfunpack.c
*** /dev/null	Fri May 17 17:40:23 1996
--- libfpvm/pvmfstartpvmd.m4	Mon May 13 15:55:49 1996
***************
*** 0 ****
--- 1,127 ----
+ /*
+  *----------------------------------------------------------------------
+  * Time-stamp: "1995/11/21 13:31:32 thibaud@kether.cgd.ucar.edu"
+  *----------------------------------------------------------------------
+  */
+ /*
+  *----------------------------------------------------------------------
+  * pvmfstartpvmd.m4
+  *
+  * Interface to Fortran for pvm_start_pvmd()
+  *----------------------------------------------------------------------
+  */
+ 
+ #include <stdio.h>
+ #include "pvm3.h"
+ #include "pvm_consts.h"
+ #include "pvmalloc.h"
+ 
+ void
+ FUNCTION(pvmfstartpvmd) ARGS(`STRING_ARG(args), block, info')
+ STRING_ARG_DECL(args);
+ int *block;
+ int *info;
+ {
+     char *nargs;			/* args (null terminated) */
+     int ac = 0;				/* # of agruments initialize to 0 */
+     char **av;				/* argument vector */
+     register char *ch;			/* temp char pointer */
+     register char *beg;			/* pointer to begining of word */
+     register char *end;			/* pointer to end of word */
+     register int len;			/* length of word */
+     register int i;			/* loop index */
+ 
+ #if ( DEBUG )
+     /* printout incoming nargs */
+     printf( "%d \"%s\"\n", STRING_LEN(args), STRING_PTR(args) );
+ #endif
+     /* Some Fortran compilers allow for strings of zero length */
+     if ( STRING_LEN(args) == 0 ) {	/* null args */
+ 	av = (char **)0;		/* make av a null pointer */
+ 	goto pvmd;
+     } else {				/* something in args */
+ 	if ( ( nargs = TALLOC( STRING_LEN(args) + 1, char, "nargs" ) )
+ 	    == NULL ) {
+ 	    pvmlogerror("pvmfstartpvmd() can't get memory\n");
+ 	    goto bail;
+ 	}
+ 	/* copy args (ftocptr() could have been used for that) */
+ 	strncpy( nargs, STRING_PTR(args), STRING_LEN(args) );
+ 	nargs[STRING_LEN(args)] = '\0'; /* terminate with null */
+     }
+     ch = nargs;				/* pointer at the begining of nargs */
+     /* assume a max of 32 args (8 should be OK from pvmd3(3PVM)) */
+     if ( ( av = TALLOC( 32, char *, "av" ) ) == NULL ) {
+ 	pvmlogerror("pvmfstartpvmd() can't get memory\n");
+ 	PVM_FREE( nargs );		/* avoid memory leeks */
+ 	goto bail;
+     }
+     /* at this point nargs contain at least 1 char */
+     for ( ; ; ) {
+ 	/* move forward until no space nor tab */
+ 	for( ; *ch == ' ' || *ch == '\t'; ch++ );
+ 	beg = ch;			/* that's the begining of a word */
+ 	/* move forward until space, tab or null */
+ 	for( ; *ch != ' ' && *ch != '\t' && *ch != '\0'; ch++ );
+ 	end = ch;			/* that's the end of a word */
+ 	len = end - beg;		/* length of the word */
+ 	/* if nothing else then space, tab or null has been found */
+ 	/* then end of nargs is reached (exit point of loop) */
+ 	if ( len == 0 ) break;
+ 	/* allocate memory for word in agument vector */
+ 	if ( ( av[ac] = TALLOC( len + 1, char, "av[ac]" ) ) == NULL ) {
+ 	    pvmlogerror("pvmfstartpvmd() can't get memory\n");
+ 	    PVM_FREE( nargs );		/* avoid memory leeks */
+ 	    for ( i = 0; i < ac; i++ )
+ 		PVM_FREE( av[i] );
+ 	    goto bail;
+ 	}
+ 	strncpy( av[ac], beg, len );	/* copy word to arg vector */
+ 	*( av[ac] + len ) = '\0';	/* null terminate word */
+ 	ac++;				/* increment arg counter */
+     }
+ #if ( DEBUG )
+     printf( "ac is %d\n", ac );
+ #endif
+     if ( ac == 0 ) {
+ 	/* no args found */
+ 	PVM_FREE( av );			/* free allocated memory */
+ 	av = (char **)0;		/* make av a NULL pointer */
+ #if ( DEBUG )
+     } else {
+ 	/* printout result */
+ 	for ( i = 0; i < ac; i++ )
+ 	    printf( "av[%2d] is \"%s\"\n", i, av[i] );
+ #endif
+     }
+     PVM_FREE( nargs );			/* free allocated memory */
+  pvmd:
+     /* hopefully pvm_start_pvmd is freeing allocated mem for av */
+     *info = pvm_start_pvmd( ac, av, *block );
+     return;
+  bail:
+     *info = -1;
+     return;
+ }
+ 
+ /*
+  *----------------------------------------------------------------------
+  * RCS identification
+  *----------------------------------------------------------------------
+  * $Author:$
+  * $Date:$
+  * $Locker:$
+  * $Revision:$
+  * $Source:$
+  * $State:$
+  *----------------------------------------------------------------------
+  * For GNU Emacs:
+  *----------------------------------------------------------------------
+  * Local Variables:
+  * mode: C
+  * abbrev-mode: t
+  * comment-column: 40
+  * version-control: t
+  * End:
+  *----------------------------------------------------------------------
+  */
*** ../netlib/pvm3.3.10/man/man1/pvm.1	Mon Jun 27 14:51:27 1994
--- man/man1/pvm.1	Wed May 15 17:02:07 1996
***************
*** 29,52 ****
  
  The following console commands are available:
  .nf
!     add  hostname(s)    \- add hosts to virtual machine
!     alias               \- define/list command aliases
!     conf                \- list virtual machine configuration
!     delete  hostname(s) \- delete hosts from virtual machine
!     echo                \- echo arguments
!     halt                \- stop pvmds
!     help [command]      \- print helpful information about a command
!     id                  \- print console task id
!     jobs                \- list running jobs
!     kill  task\-tid      \- terminate tasks
!     mstat host\-tid      \- show status of hosts
!     ps \-a               \- list all PVM tasks
!     pstat task\-tid      \- show status of tasks
!     quit                \- exit console
!     reset               \- kill all tasks
!     setenv              \- display/set environment variables
!     sig  signum task    \- send signal to task
!     spawn [opt] a.out   \- spawn task
           opts are: \-(count)  number of tasks, default is 1
  		   \-(host)   spawn on host, default is any
  		   \-(ARCH)   spawn on hosts of ARCH
--- 29,53 ----
  
  The following console commands are available:
  .nf
!     add  hostname(s)    \- Add hosts to virtual machine
!     alias               \- Define/list command aliases
!     conf                \- List virtual machine configuration
!     delete  hostname(s) \- Delete hosts from virtual machine
!     echo                \- Echo arguments
!     export              \- Add environment variables to spawn export list
!     halt                \- Stop pvmds
!     help [command]      \- Print helpful information about a command
!     id                  \- Print console task id
!     jobs                \- List running jobs
!     kill  task\-tid      \- Terminate tasks
!     mstat host\-tid      \- Show status of hosts
!     ps \-a               \- List all PVM tasks
!     pstat task\-tid      \- Show status of tasks
!     quit                \- Exit console
!     reset               \- Kill all tasks
!     setenv              \- Display/set environment variables
!     sig  signum task    \- Send signal to task
!     spawn [opt] a.out   \- Spawn task
           opts are: \-(count)  number of tasks, default is 1
  		   \-(host)   spawn on host, default is any
  		   \-(ARCH)   spawn on hosts of ARCH
***************
*** 54,62 ****
                     \->        redirect task output to console
                     \-> file   redirect task output to file
                     \->>file   redirect task output append to file
!     trace               \- set/display trace event mask
!     unalias \- undefine command alias
!     version \- show libpvm version
  .fi
  .PP
  .I pvm
--- 55,64 ----
                     \->        redirect task output to console
                     \-> file   redirect task output to file
                     \->>file   redirect task output append to file
!     trace               \- Set/display trace event mask
!     unexport \- Remove environment variables from spawn export list
!     unalias \- Undefine command alias
!     version \- Show libpvm version
  .fi
  .PP
  .I pvm
*** ../netlib/pvm3.3.10/man/man1/pvm_intro.1	Fri Nov 10 16:58:38 1995
--- man/man1/pvm_intro.1	Tue May 14 11:05:30 1996
***************
*** 33,38 ****
--- 33,41 ----
  ALPHAMP
  DEC Alpha/OSF-1 / using shared memory
  .TP
+ APOLLO
+ HP 300 running Domain/OS
+ .TP
  ATT
  AT&T/NCR 3600 running SysVR4
  .TP
***************
*** 99,104 ****
--- 102,110 ----
  LINUX
  80[345]86 running Linux
  .TP
+ M88K
+ Motorola M88100 running Real/IX
+ .TP
  MASPAR
  Maspar
  .TP
***************
*** 208,217 ****
  .\".SH INSTALLING
  
  .SH ENVIRONMENT VARIABLES
! The following environment variables are used by PVM and may be used
  to customize your PVM environment.
! If you set them,
! you should do so in your \fI.cshrc\fR or \fI.profile\fR file.
  .IP PVM_ROOT
  The path where PVM libraries and system programs are installed,
  for example /usr/local/pvm3 or $HOME/pvm3.
--- 214,249 ----
  .\".SH INSTALLING
  
  .SH ENVIRONMENT VARIABLES
! The following environment variables are read by PVM and may be set
! in order
  to customize your PVM environment.
! To set them,
! you can add commands to your \fI.cshrc\fR or \fI.profile\fR file.
! See the manual page for the shell you normally use for information
! about how to do this.
! 
! For \fIcsh\fR users:
! Note that setting them in \fI.login\fR does not have the same effect.  .login
! is only read when you are actually logging in,
! whereas .cshrc is read every time csh starts up.
! PVM needs to have environment variables set when it starts a slave
! pvmd with "rsh host pvmd ...",
! so they must be set in .cshrc.
! 
! [v3.3.10 and later]
! For those using a shell that doesn't always read a startup script
! (e.g. \fIsh\fR, \fIksh\fR),
! there is another way to set environment variables
! for PVM.
! Before running the PVM executables,
! the \fIpvm\fR and \fIpvmd\fR startup scripts
! source any commands in \fI$HOME/.pvmprofile\fR
! if this file exists.
! You will still need to use pvmd host file options (e.g. dx=)
! or environment variables (PVM_DPATH) on the master host
! to tell PVM
! where things are installed
! on slave hosts.
  .IP PVM_ROOT
  The path where PVM libraries and system programs are installed,
  for example /usr/local/pvm3 or $HOME/pvm3.
*** /dev/null	Fri May 17 17:40:32 1996
--- man/man1/pvmd.1	Tue May 14 10:53:52 1996
***************
*** 0 ****
--- 1 ----
+ .so man1/pvmd3.1
*** ../netlib/pvm3.3.10/man/man1/pvmd3.1	Fri Nov 10 16:58:38 1995
--- man/man1/pvmd3.1	Tue May 14 11:07:12 1996
***************
*** 1,6 ****
  .TH PVMD 1PVM "06 May, 1994"
  .SH NAME
! pvmd3 \- PVM version 3 daemon
  .SH SYNOPSIS
  .ft B
  pvmd
--- 1,6 ----
  .TH PVMD 1PVM "06 May, 1994"
  .SH NAME
! pvmd, pvmd3 \- PVM daemon
  .SH SYNOPSIS
  .ft B
  pvmd
***************
*** 27,32 ****
--- 27,38 ----
  The name of the daemon executable is \fIpvmd3\fR.
  It is usually started by a shell script, \fI$PVM_ROOT/lib/pvmd\fR.
  
+ [v3.3.10 and later]
+ Before running pvmd3,
+ pvmd
+ sources any commands in \fI$HOME/.pvmprofile\fR
+ if this file exists.
+ 
  .SH OPTIONS
  The following options may be specified on the command line when
  starting the master pvmd or PVM console:
***************
*** 237,243 ****
  $PVM_ROOT/lib/pvmd (or environment variable PVM_DPATH)
  .TP 8
  ep
! pvm3/bin/$PVM_ARCH:$PVM_ROOT/bin/$PVM_ARCH
  .TP 8
  wd
  $HOME
--- 243,249 ----
  $PVM_ROOT/lib/pvmd (or environment variable PVM_DPATH)
  .TP 8
  ep
! $HOME/pvm3/bin/$PVM_ARCH:$PVM_ROOT/bin/$PVM_ARCH
  .TP 8
  wd
  $HOME
***************
*** 270,276 ****
  	# host file for testing on various platforms
  	fonebone
  	refuge
! 	# installed in /usr/local/here
  	sigi.cs            dx=/usr/local/pvm3/lib/pvmd
  	# borrowed accts, "guest", don't trust fonebone
  	*                  lo=guest  so=pw
--- 276,282 ----
  	# host file for testing on various platforms
  	fonebone
  	refuge
! 	# installed in /usr/local here
  	sigi.cs            dx=/usr/local/pvm3/lib/pvmd
  	# borrowed accts, "guest", don't trust fonebone
  	*                  lo=guest  so=pw
***************
*** 340,345 ****
           | awk -F: '{print "/tmp/pvmd."$3; exit}'` 
  .fi
  
  .SH SEE ALSO
  pvm(1PVM),
! pvm_intro(1PVM)
--- 346,367 ----
           | awk -F: '{print "/tmp/pvmd."$3; exit}'` 
  .fi
  
+ .SH FILES
+ .ta 4 40
+ .nf
+ 	$PVM_ROOT/lib/pvmd	PVM daemon startup script
+ 	$PVM_ROOT/lib/$PVM_ARCH/pvmd3	PVM daemon executable
+ 	$HOME/.pvmprofile	Shell commands read by pvmd before
+ 		running pvmd3
+ 	$HOME/pvm3/bin/$PVM_ARCH	Private PVM executable directory
+ 	$PVM_ROOT/pvm3/bin/$PVM_ARCH	System PVM executable directory
+ 	/tmp/pvmd.\fIuid\fR	Pvmd local socket address
+ 	/tmp/pvml.\fIuid\fR	Pvmd runtime error log
+ 	$HOME/.rhosts	File allowing access to a host from
+ 		other hosts
+ .fi
+ 
  .SH SEE ALSO
  pvm(1PVM),
! pvm_intro(1PVM),
! rhosts(5)
*** /dev/null	Fri May 17 17:40:33 1996
--- man/man3/pvm_export.3	Wed May 15 17:02:19 1996
***************
*** 0 ****
--- 1,53 ----
+ .TH EXPORT 3PVM "15 May, 1996"
+ .SH NAME
+ pvm_export, pvm_unexport \- Mark environment variables to export through spawn
+ 
+ .SH SYNOPSIS
+ .nf
+ .ft B
+ C	int cc = pvm_export( char *name )
+ 	int cc = pvm_unexport( char *name )
+ .br
+ 
+ Fortran	Not available
+ .fi
+ 
+ .SH PARAMETERS
+ .IP name 0.8i
+ Name of an environment variable to add to or delete from export list.
+ 
+ .SH DESCRIPTION
+ The routines
+ .I pvm_export
+ and
+ .I pvm_unexport
+ are provided for convenience in editing environment variable
+ .I PVM_EXPORT,
+ while maintaining the colon-separated list syntax
+ it requires.
+ The variable can be modified by other means,
+ and at the same time by the pvm_export functions.
+ .PP
+ pvm_export checks to see if a name is already in PVM_EXPORT before
+ including it,
+ and exporting a name more than once is not considered an error.
+ Likewise,
+ pvm_unexport will not complain if you specify a name not in PVM_EXPORT.
+ 
+ .SH EXAMPLES
+ .nf
+ C:
+ 	/* PVM_EXPORT=SHELL:HOME */
+ 	pvm_export("DISPLAY");
+ 	pvm_export("TERM");
+ 	pvm_unexport("HOME");
+ 	/* PVM_EXPORT=SHELL:DISPLAY:TERM */
+ .fi
+ 
+ .SH ERRORS
+ No error conditions are currently returned by pvm_export and pvm_unexport.
+ 
+ .SH SEE ALSO
+ pvm(1PVM)
+ pvm_spawn(3PVM)
+ 
*** ../netlib/pvm3.3.10/man/man3/pvm_spawn.3	Mon Jul  3 13:56:01 1995
--- man/man3/pvm_spawn.3	Wed May 15 16:58:49 1996
***************
*** 3,8 ****
--- 3,9 ----
  pvm_spawn \- Starts new PVM processes.
  
  .SH SYNOPSIS
+ .nf
  .ft B
  C	int numt = pvm_spawn( char *task, char **argv, int flag,
  char *where, int ntask, int *tids )
***************
*** 227,230 ****
--- 228,232 ----
  .PP
  
  .SH SEE ALSO
+ pvm_export(3PVM)
  
*** ../netlib/pvm3.3.10/man/man3/pvm_start_pvmd.3	Mon Jul  3 14:02:56 1995
--- man/man3/pvm_start_pvmd.3	Mon May 13 15:57:57 1996
***************
*** 1,4 ****
! .TH START_PVMD 3PVM "29 April, 1994"
  .SH NAME
  pvm_start_pvmd \- Starts new PVM daemon.
  
--- 1,4 ----
! .TH START_PVMD 3PVM "11 December, 1995"
  .SH NAME
  pvm_start_pvmd \- Starts new PVM daemon.
  
***************
*** 7,13 ****
  C	int info = pvm_start_pvmd( int argc, char **argv, int block )
  .br
  
! Fortran	NOT AVAILABLE
  .fi
  
  .SH PARAMETERS
--- 7,13 ----
  C	int info = pvm_start_pvmd( int argc, char **argv, int block )
  .br
  
! Fortran	call pvmfstartpvmd( args, block, info )
  .fi
  
  .SH PARAMETERS
***************
*** 17,22 ****
--- 17,25 ----
  .IP argv
  An array of arguments to the executable.
  .br
+ .IP args
+ A character string containing the arguments to the executable.
+ .br
  .IP block
  Integer specifying whether to block until startup of all hosts complete
  or return immediately.
***************
*** 41,46 ****
--- 44,63 ----
  pvm_start_pvmd sets environment variable \fIPVMSOCK\fR to the address printed
  by the pvmd as it starts up.
  
+ .SH EXAMPLES
+ .nf
+ C:
+ 	static char *argv[] = {
+ 	    "-d41",
+ 	    "/u/jones/pvmd_hosts",
+ 	};
+ 	argc = 2
+ 	info = pvm_start_pvmd( argc, argv, block );
+ .sp
+ Fortran:
+ 	CALL PVMFSTART_PVMD( '-d41 /u/jones/pvmd_hosts', BLOCK, INFO )
+ .fi
+ 
  .SH ERRORS
  The following error conditions can be returned
  .IP  PvmDupHost
***************
*** 50,53 ****
  .PP
  
  .SH SEE ALSO
! pvm_addhosts(3PVM)
--- 67,71 ----
  .PP
  
  .SH SEE ALSO
! pvm_addhosts(3PVM),
! pvmd3(1PVM)
*** /dev/null	Fri May 17 17:40:43 1996
--- man/man3/pvm_unexport.3	Wed May 15 16:54:57 1996
***************
*** 0 ****
--- 1 ----
+ .so man3/pvm_export.3
*** /dev/null	Fri May 17 17:40:43 1996
--- man/man3/pvmfstartpvmd.3	Mon May 13 15:58:09 1996
***************
*** 0 ****
--- 1 ----
+ .so man3/pvm_start_pvmd.3
*** ../netlib/pvm3.3.10/misc/xhoster/xhoster.c	Fri Nov 10 16:58:39 1995
--- misc/xhoster/xhoster.c	Fri May 17 17:36:03 1996
***************
*** 35,40 ****
--- 35,41 ----
  #include <pvm3.h>
  #include <pvmsdpro.h>
  #include "hostc.h"
+ #include "../../src/bfunc.h"
  
  #ifndef	RSHCOMMAND
  #define	RSHCOMMAND	"/usr/ucb/rsh"
***************
*** 61,69 ****
  #define	STRALLOC(s)			strcpy(TALLOC(strlen(s)+1,char,"str"),s)
  
  #define	LISTPUTAFTER(o,n,f,r) \
! 	{ (n)->f=(o)->f; (n)->r=o; (o)->f->r=n; (o)->f=n; }
  #define	LISTPUTBEFORE(o,n,f,r) \
! 	{ (n)->r=(o)->r; (n)->f=o; (o)->r->f=n; (o)->r=n; }
  #define	LISTDELETE(e,f,r) \
  	{ (e)->f->r=(e)->r; (e)->r->f=(e)->f; (e)->r=(e)->f=0; }
  
--- 62,70 ----
  #define	STRALLOC(s)			strcpy(TALLOC(strlen(s)+1,char,"str"),s)
  
  #define	LISTPUTAFTER(o,n,f,r) \
! 	{ (n)->f=(o)->f; (n)->r=(o); (o)->f->r=(n); (o)->f=(n); }
  #define	LISTPUTBEFORE(o,n,f,r) \
! 	{ (n)->r=(o)->r; (n)->f=(o); (o)->r->f=(n); (o)->r=(n); }
  #define	LISTDELETE(e,f,r) \
  	{ (e)->f->r=(e)->r; (e)->r->f=(e)->f; (e)->r=(e)->f=0; }
  
***************
*** 92,99 ****
  		(ztv)->tv_usec = (xtv)->tv_usec + 1000000 - (ytv)->tv_usec;	\
  	}
  
- #define	BZERO(p,n)	bzero((p),(n))
- 
  /*
  *	for keeping state assoc. with a host
  */
--- 93,98 ----
***************
*** 118,124 ****
--- 117,134 ----
  #define	HostAdded	1		/* for notify */
  #define	HostDeleted	2
  
+ struct slot {
+ 	struct slot *s_link, *s_rlink;		/* free/active list */
+ 	struct hst *s_hst;					/* host table entry */
+ 	struct timeval s_bail;				/* timeout time */
+ 	int s_rfd, s_wfd, s_efd;			/* slave stdin/out/err */
+ 	char s_buf[256];					/* config reply line */
+ 	char s_ebuf[256];					/* stderr from host */
+ 	int s_len;							/* length of s_buf */
+ 	int s_elen;							/* length of s_ebuf */
+ };
  
+ 
  int debugmask = 0;
  char *username = 0;
  Display *xDisp = 0;
***************
*** 140,145 ****
--- 150,157 ----
  int curhost = 0;				/* waiting for password for this host */
  char scribble[1024];
  
+ static struct slot slots[RSHNPLL+2];	/* state var/context for each slot */
+ static struct slot *slfree = 0;			/* free list of slots */
  static Arg args[16];
  static XtCallbackRec callback[2] = { { 0, 0 }, { 0, 0 } };
  
***************
*** 684,707 ****
  }
  
  
- /********************************************
- *  this is the new (parallel) startup code  *
- *                                           *
- ********************************************/
- 
- struct slot {
- 	struct slot *s_link, *s_rlink;		/* free/active list */
- 	struct hst *s_hst;					/* host table entry */
- 	struct timeval s_bail;				/* timeout time */
- 	int s_rfd, s_wfd, s_efd;			/* slave stdin/out/err */
- 	char s_buf[256];					/* config reply line */
- 	int s_len;							/* length of s_buf */
- };
- 
- 
- static struct slot slots[RSHNPLL+2];	/* state var/context for each slot */
- static struct slot *slfree = 0;			/* free list of slots */
- 
  close_slot(sp)
  	struct slot *sp;
  {
--- 696,701 ----
***************
*** 731,738 ****
  	int nfds;
  	int i;
  	int n;
! 	char *p, *q;
! 	char ebuf[256];						/* for reading stderr */
  
  	/* init slot free list */
  
--- 725,731 ----
  	int nfds;
  	int i;
  	int n;
! 	char *p;
  
  	/* init slot free list */
  
***************
*** 767,772 ****
--- 760,766 ----
  			LISTDELETE(sp, s_link, s_rlink);
  			sp->s_hst = hp;
  			sp->s_len = 0;
+ 			sp->s_elen = 0;
  			if (debugmask) {
  				fprintf(stderr, "pl_startup() trying %s\n", hp->h_name);
  			}
***************
*** 802,808 ****
  		gettimeofday(&tnow, (struct timezone*)0);
  		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
  			if (TVXLTY(&sp->s_bail, &tnow)) {
! 				sprintf(scribble, "Giving up on %s after %d secs\n",
  						sp->s_hst->h_name, RSHTIMEOUT);
  				log_this(scribble);
  				sp->s_hst->h_result = STRALLOC("PvmCantStart");
--- 796,802 ----
  		gettimeofday(&tnow, (struct timezone*)0);
  		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
  			if (TVXLTY(&sp->s_bail, &tnow)) {
! 				sprintf(scribble, "Giving up on host %s after %d secs\n",
  						sp->s_hst->h_name, RSHTIMEOUT);
  				log_this(scribble);
  				sp->s_hst->h_result = STRALLOC("PvmCantStart");
***************
*** 838,844 ****
  			fprintf(stderr, "pl_startup() select timeout is %d.%06d\n",
  					tout.tv_sec, tout.tv_usec);
  		}
! 		if ((n = select(nfds, &rfds, (fd_set*)0, (fd_set*)0, &tout)) == -1) {
  			if (errno != EINTR) {
  				pvmlogperror("work() select");
  				pvmbailout(0);
--- 832,844 ----
  			fprintf(stderr, "pl_startup() select timeout is %d.%06d\n",
  					tout.tv_sec, tout.tv_usec);
  		}
! 		if ((n = select(nfds,
! #ifdef	FDSETISINT
! 				(int *)&rfds, (int *)0, (int *)0,
! #else
! 				&rfds, (fd_set *)0, (fd_set *)0,
! #endif
! 				&tout)) == -1) {
  			if (errno != EINTR) {
  				pvmlogperror("work() select");
  				pvmbailout(0);
***************
*** 862,907 ****
  		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
  
  			/*
! 			* stdout ready.  get complete line then scan config info from it.
  			*/
  			if (sp->s_rfd >= 0 && FD_ISSET(sp->s_rfd, &rfds)) {
  				n = read(sp->s_rfd, sp->s_buf + sp->s_len,
! 						sizeof(sp->s_buf) - sp->s_len);
  				if (n > 0) {
  					sp->s_len += n;
- 					if (sp->s_len >= sizeof(sp->s_buf)) {
- 						sprintf(scribble, "Got gibberish back from %s\n",
- 								sp->s_hst->h_name);
- 						log_this(scribble);
- 						sp->s_hst->h_result = STRALLOC("PvmCantStart");
- 					}
  					sp->s_buf[sp->s_len] = 0;
! 					if (p = CINDEX(sp->s_buf + sp->s_len - n, '\n')) {
! 						if (debugmask) {
! 							sprintf(scribble, "From %s: %s",
  									sp->s_hst->h_name, sp->s_buf);
  							log_this(scribble);
  						}
- 						*p = 0;
- 						sp->s_hst->h_result = STRALLOC(sp->s_buf);
- 						if (!strncmp(sp->s_hst->h_result, "ddpro", 5)) {
- 							sprintf(scribble, "Host %s ok\n",
- 									sp->s_hst->h_name);
- 							log_this(scribble);
- 						}
  					}
  
  				} else {
  					if (n) {
! 						fprintf(stderr, "pl_startup() pvmd@%s\n",
  								sp->s_hst->h_name);
! 						perror("");
  					} else {
! 						sprintf(scribble, "From %s: EOF\n",
  								sp->s_hst->h_name);
  						log_this(scribble);
  					}
  					sp->s_hst->h_result = STRALLOC("PvmCantStart");
  				}
  				if (sp->s_hst->h_result) {
  					sp2 = sp->s_rlink;
--- 862,969 ----
  		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
  
  			/*
! 			* stderr ready.  log output with remote's host name.
  			*/
+ 			if (sp->s_efd >= 0 && FD_ISSET(sp->s_efd, &rfds)) {
+ 				n = read(sp->s_efd, sp->s_ebuf + sp->s_elen,
+ 						sizeof(sp->s_ebuf) - sp->s_elen - 1);
+ 				if (n > 0) {
+ 					sp->s_elen += n;
+ 					sp->s_ebuf[sp->s_elen] = 0;
+ 					while (p = CINDEX(sp->s_ebuf, '\n')) {
+ 						*p = 0;
+ 						sprintf(scribble, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						log_this(scribble);
+ 						p++;
+ 						sp->s_elen -= p - sp->s_ebuf;
+ 						if (sp->s_elen > 0) {
+ 							BCOPY(p, sp->s_ebuf, sp->s_elen);
+ 							sp->s_ebuf[sp->s_elen] = 0;
+ 						}
+ 					}
+ 					if (sp->s_elen == sizeof(sp->s_ebuf) - 1) {
+ 						sprintf(scribble, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						log_this(scribble);
+ 						sp->s_elen = 0;
+ 					}
+ 
+ 				} else {
+ 					if (sp->s_elen > 0) {
+ 						sprintf(scribble, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						log_this(scribble);
+ 						sp->s_elen = 0;
+ 					}
+ 					(void)close(sp->s_efd);
+ 					sp->s_efd = -1;
+ 				}
+ 			}
+ 
+ 			/*
+ 			* stdout ready.
+ 			* look for a complete line starting with "ddpro".
+ 			*/
  			if (sp->s_rfd >= 0 && FD_ISSET(sp->s_rfd, &rfds)) {
  				n = read(sp->s_rfd, sp->s_buf + sp->s_len,
! 						sizeof(sp->s_buf) - sp->s_len - 1);
  				if (n > 0) {
  					sp->s_len += n;
  					sp->s_buf[sp->s_len] = 0;
! 					while (p = CINDEX(sp->s_buf, '\n')) {
! 						*p = 0;
! 						if (!strncmp(sp->s_buf, "ddpro", 5)) {
! 							if (debugmask) {
! 								sprintf(scribble, "stdout@%s: %s\n",
! 										sp->s_hst->h_name, sp->s_buf);
! 								log_this(scribble);
! 							}
! 							sp->s_hst->h_result = STRALLOC(sp->s_buf);
! 							break;
! 
! 						} else {
! 							sprintf(scribble, "stdout@%s: %s\n",
  									sp->s_hst->h_name, sp->s_buf);
  							log_this(scribble);
+ 							p++;
+ 							sp->s_len -= p - sp->s_buf;
+ 							if (sp->s_len > 0) {
+ 								BCOPY(p, sp->s_buf, sp->s_len);
+ 								sp->s_buf[sp->s_len] = 0;
+ 							}
  						}
  					}
+ 					if (sp->s_len == sizeof(sp->s_buf) - 1) {
+ 						sprintf(scribble, "stdout@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_buf);
+ 						log_this(scribble);
+ 						sp->s_len = 0;
+ 					}
  
  				} else {
+ 					if (sp->s_len > 0) {
+ 						sprintf(scribble, "stdout@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_buf);
+ 						log_this(scribble);
+ 						sp->s_len = 0;
+ 					}
  					if (n) {
! 						sprintf(scribble, "stdout@%s",
  								sp->s_hst->h_name);
! 						pvmlogperror(scribble);
  					} else {
! 						sprintf(scribble, "stdout@%s: EOF\n",
  								sp->s_hst->h_name);
  						log_this(scribble);
  					}
  					sp->s_hst->h_result = STRALLOC("PvmCantStart");
+ 					if (sp->s_elen > 0) {
+ 						sprintf(scribble, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						log_this(scribble);
+ 						sp->s_elen = 0;
+ 					}
  				}
  				if (sp->s_hst->h_result) {
  					sp2 = sp->s_rlink;
***************
*** 911,955 ****
  				}
  			}
  
- 			/*
- 			* response on stderr.  log prefixed by remote's host name.
- 			*/
- 			if (sp->s_efd >= 0 && FD_ISSET(sp->s_efd, &rfds)) {
- 				if ((n = read(sp->s_efd, ebuf, sizeof(ebuf)-1)) > 0) {
- 					char *p = ebuf, *q, c;
- 
- 					ebuf[n] = 0;
- 					sprintf(scribble, "From %s stderr: ",
- 							sp->s_hst->h_name);
- 					q = scribble + strlen(scribble);
- 					while (c = *p++ & 0x7f) {
- 						if (isprint(c))
- 							*q++ = c;
- /*
- 							fputc(c, stderr);
- */
- 
- 						else {
- 							*q++ = '^';
- 							*q++ = (c + '@') & 0x7f;
- /*
- 							fputc('^', stderr);
- 							fputc((c + '@') & 0x7f, stderr);
- */
- 						}
- 					}
- 					*q++ = '\n';
- 					*q++ = 0;
- 					log_this(scribble);
- /*
- 					fputc('\n', stderr);
- */
- 
- 				} else {
- 					(void)close(sp->s_efd);
- 					sp->s_efd = -1;
- 				}
- 			}
  		}
  	}
  	return 0;
--- 973,978 ----
***************
*** 1111,1117 ****
  
  oops:
  	hp->h_result = STRALLOC("PvmCantStart");
- oops2:
  	if (sp->s_wfd != -1)
  		close(sp->s_wfd);
  	if (sp->s_rfd != -1)
--- 1134,1139 ----
*** ../netlib/pvm3.3.10/patches/Contents	Fri Nov 10 16:58:39 1995
--- patches/Contents	Wed May 15 17:20:30 1996
***************
*** 1,3 ****
--- 1,98 ----
+ patch #11
+ version:
+     3.3.10 -> 3.3.11
+ files:
+     patch  src/patchlevel.h
+     patch  Readme.mp
+     create conf/APOLLO.def
+     create conf/APOLLO.m4
+     create conf/M88K.def
+     create conf/M88K.m4
+     patch  conf/RS6K.def
+     patch  conf/RS6KMP.def
+     patch  conf/SCO.def
+     patch  conf/SP2MPI.def
+     create console/HPPAMP/Makefile
+     patch  console/cmds.c
+     patch  doc/bugreport
+     patch  examples/SP2MPI/Makefile
+     patch  examples/nntime.c
+     create examples/starter.c
+     patch  include/pvm3.h
+     create lib/kshrc.stub
+     patch  lib/pvm
+     patch  lib/pvmd
+     patch  lib/pvmgetarch
+     patch  libfpvm/CSPP/Makefile
+     patch  libfpvm/HPPA/Makefile
+     patch  libfpvm/HPPAMP/Makefile
+     patch  libfpvm/Makefile.aimk
+     patch  libfpvm/Makefile.mimd
+     patch  libfpvm/RS6K/Makefile
+     create libfpvm/RS6KMP/Makefile
+     create libfpvm/pvmfstartpvmd.m4
+     patch  man/man1/pvm.1
+     patch  man/man1/pvm_intro.1
+     create man/man1/pvmd.1
+     patch  man/man1/pvmd3.1
+     create man/man3/pvm_export.3
+     patch  man/man3/pvm_spawn.3
+     patch  man/man3/pvm_start_pvmd.3
+     create man/man3/pvm_unexport.3
+     create man/man3/pvmfstartpvmd.3
+     patch  misc/xhoster/xhoster.c
+     patch  patches/Contents
+     patch  pvmgs/pvmgs_func.c
+     patch  src/Makefile.aimk
+     patch  src/Makefile.mimd
+     patch  src/Makefile.shmem
+     patch  src/SP2MPI/Makefile
+     patch  src/SP2MPI/pvmdmimd.c
+     patch  src/ddpro.c
+     patch  src/ddpro.h
+     patch  src/global.h
+     patch  src/host.c
+     create src/hoster.c
+     patch  src/listmac.h
+     patch  src/lpvm.c
+     patch  src/lpvmgen.c
+     patch  src/lpvmpack.c
+     patch  src/lpvmshmem.c
+     patch  src/pvmarchc.c
+     patch  src/pvmd.c
+     patch  src/pvmdshmem.c
+     patch  src/pvmmimd.h
+     patch  src/startup.c
+ what:
+     + added APOLLO (HP 300, Domain/OS) port.
+     + added M88K (M88100, Real/IX) port.
+     + if $HOME/.pvmprofile exists, it is sourced in lib/pvm and lib/pvmd
+       scripts before starting the console or pvmd.
+     + created libpvm functions pvm_export(char *name) and pvm_export(name)
+       to make it easier to edit PVM_EXPORT environment variable.
+       also, new console commands export and unexport.
+     . several fixes from IBM for the SP2MPI port.
+     . fixed RouteDirect bug - simultaneous connect from both sides
+       with Unix-domain sockets fails.
+     . fixed bug in replacement encode/decode XDR short int routines for I860.
+       they now pack/unpack 4 bytes instead of 2.
+     . pvmd can now tolerate network going down for a short time
+       (ignores ENETDOWN).  this is useful when rebooting switch hardware
+       on multiprocessors.
+     . made pvmd hoster (and xhoster) more robust,
+       now ignores garbage in .cshrc and looks for "ddpro" token.
+       split code into separate file, hoster.c.
+     . pvmd host file now works with RS6K, RS6KMP and AIX 4.x.
+       (needed to define SOCKADHASLEN)
+     . fixed typo in pvmgs_func.c`gs_newstaticcache().
+     . added switch in lib/pvmgetarch to detect HPPAMP architecture on HPPA.
+     . fixed race between pvmd forking a task to spawn and catching a signal
+       and thinking it was still a pvmd, doing cleanup etc.
+     . libpvm now processes control messages arriving over direct routes.
+     . added some parens to the listmac macros, to keep old compilers happy.
+     . added some tests so shared memory pvmd and libpvm don't segfault
+       if they fail to allocate resources.
+     . changed RSHCOMMAND for SCO arch to /usr/bin/rcmd.
  patch #10
  version:
      3.3.9 -> 3.3.10
*** ../netlib/pvm3.3.10/pvmgs/pvmgs_func.c	Fri Nov 10 16:58:40 1995
--- pvmgs/pvmgs_func.c	Mon May 13 16:06:22 1996
***************
*** 1,5 ****
  /* File: pvmgs_func.c - functions supported by pvmgs                       */
! /* $Id: pvmgs_func.c,v 1.4 1995/11/02 15:53:33 manchek Exp $      */ 
  
  #include <stdio.h>
  #include "pvm3.h"
--- 1,5 ----
  /* File: pvmgs_func.c - functions supported by pvmgs                       */
! /* $Id: pvmgs_func.c,v 1.5 1996/05/13 20:06:00 manchek Exp $      */ 
  
  #include <stdio.h>
  #include "pvm3.h"
***************
*** 745,751 ****
                 if (group->infotids[i] == tid) break;
             if (i == group->ninfotids) /* haven't sent info to this tid yet */
             {
!                group->infotids[group->ninfotids] == tid;
                 group->ninfotids++;
             }
             return (PvmgsNotCached);
--- 745,751 ----
                 if (group->infotids[i] == tid) break;
             if (i == group->ninfotids) /* haven't sent info to this tid yet */
             {
!                group->infotids[group->ninfotids] = tid;
                 group->ninfotids++;
             }
             return (PvmgsNotCached);
*** ../netlib/pvm3.3.10/src/Makefile.aimk	Fri Nov 10 16:58:40 1995
--- src/Makefile.aimk	Mon May 13 16:12:46 1996
***************
*** 51,57 ****
  #OPTIONS	=	-p
  CFLAGS	=	$(OPTIONS) -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
  
! DOBJ	=	ddpro.o pvmfrag.o host.o imalloc.o \
  			mesg.o nmdclass.o pkt.o pvmalloc.o pvmarchc.o \
  			pvmcruft.o pvmd.o pvmdabuf.o pvmlog.o sdpro.o \
  			startup.o task.o tdpro.o waitc.o
--- 51,57 ----
  #OPTIONS	=	-p
  CFLAGS	=	$(OPTIONS) -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
  
! DOBJ	=	ddpro.o pvmfrag.o host.o hoster.o imalloc.o \
  			mesg.o nmdclass.o pkt.o pvmalloc.o pvmarchc.o \
  			pvmcruft.o pvmd.o pvmdabuf.o pvmlog.o sdpro.o \
  			startup.o task.o tdpro.o waitc.o
***************
*** 87,93 ****
  
  lintd:
  	lint -DARCHCLASS=\"$(PVM_ARCH)\" \
! 		pvmarchc.c ddpro.c host.c mesg.c imalloc.c pkt.c \
  		pvmcruft.c pvmd.c pvmfrag.c pvmlog.c pvmalloc.c startup.c \
  		task.c tdpro.c waitc.c > Ld
  
--- 87,93 ----
  
  lintd:
  	lint -DARCHCLASS=\"$(PVM_ARCH)\" \
! 		pvmarchc.c ddpro.c host.c hoster.c mesg.c imalloc.c pkt.c \
  		pvmcruft.c pvmd.c pvmfrag.c pvmlog.c pvmalloc.c startup.c \
  		task.c tdpro.c waitc.c > Ld
  
***************
*** 102,107 ****
--- 102,109 ----
  	$(CC) $(CFLAGS) -c $(SDIR)/pvmfrag.c
  host.o:	$(SDIR)/host.c
  	$(CC) $(CFLAGS) -c $(SDIR)/host.c
+ hoster.o:	$(SDIR)/hoster.c
+ 	$(CC) $(CFLAGS) -c $(SDIR)/hoster.c
  imalloc.o:	$(SDIR)/imalloc.c
  	$(CC) $(CFLAGS) -c $(SDIR)/imalloc.c
  lpvm.o:	$(SDIR)/lpvm.c
***************
*** 166,171 ****
--- 168,183 ----
  host.o: $(SDIR)/pkt.h
  host.o: $(SDIR)/protoglarp.h
  host.o: $(SDIR)/pvmalloc.h
+ hoster.o: $(SDIR)/bfunc.h
+ hoster.o: $(SDIR)/ddpro.h
+ hoster.o: $(SDIR)/fromlib.h
+ hoster.o: $(SDIR)/global.h
+ hoster.o: $(SDIR)/host.h
+ hoster.o: $(SDIR)/listmac.h
+ hoster.o: $(SDIR)/mesg.h
+ hoster.o: $(SDIR)/protoglarp.h
+ hoster.o: $(SDIR)/pvmalloc.h
+ hoster.o: $(SDIR)/tvdefs.h
  imalloc.o: $(SDIR)/bfunc.h
  lpvm.o: $(SDIR)/../include/pvm3.h
  lpvm.o: $(SDIR)/../include/pvmtev.h
*** ../netlib/pvm3.3.10/src/Makefile.mimd	Fri Apr 22 19:38:59 1994
--- src/Makefile.mimd	Mon May 13 16:19:38 1996
***************
*** 27,33 ****
  SDIR	=	..
  CFLAGS	=	-O -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
  #CFLAGS	=	-g -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
! DOBJ	=	ddpro.o pvmfrag.o host.o imalloc.o \
  			mesg.o nmdclass.o pkt.o pvmalloc.o pvmarchc.o \
  			pvmcruft.o pvmd.o pvmdabuf.o \
  			pvmlog.o sdpro.o startup.o task.o tdpro.o waitc.o pvmdmimd.o
--- 27,33 ----
  SDIR	=	..
  CFLAGS	=	-O -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
  #CFLAGS	=	-g -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
! DOBJ	=	ddpro.o pvmfrag.o host.o hoster.o imalloc.o \
  			mesg.o nmdclass.o pkt.o pvmalloc.o pvmarchc.o \
  			pvmcruft.o pvmd.o pvmdabuf.o \
  			pvmlog.o sdpro.o startup.o task.o tdpro.o waitc.o pvmdmimd.o
***************
*** 58,64 ****
  #
  lint:
  	lint -DARCHCLASS=\"$(PVM_ARCH)\" \
! 		archcode.c ddpro.c host.c mesg.c imalloc.c pkt.c \
  		pvmcruft.c pvmd.c pvmfrag.c pvmlog.c pvmalloc.c startup.c \
  		task.c tdpro.c waitc.c > Ld
  	lint \
--- 58,64 ----
  #
  lint:
  	lint -DARCHCLASS=\"$(PVM_ARCH)\" \
! 		pvmarchc.c ddpro.c host.c hoster.c mesg.c imalloc.c pkt.c \
  		pvmcruft.c pvmd.c pvmfrag.c pvmlog.c pvmalloc.c startup.c \
  		task.c tdpro.c waitc.c > Ld
  	lint \
***************
*** 71,76 ****
--- 71,78 ----
  	$(CC) $(CFLAGS) -c $(SDIR)/pvmfrag.c
  host.o:	$(SDIR)/host.c
  	$(CC) $(CFLAGS) -c $(SDIR)/host.c
+ hoster.o:	$(SDIR)/hoster.c
+ 	$(CC) $(CFLAGS) -c $(SDIR)/hoster.c
  imalloc.o:	$(SDIR)/imalloc.c
  	$(CC) $(CFLAGS) -c $(SDIR)/imalloc.c
  lpvm.o:	$(SDIR)/lpvm.c
***************
*** 118,154 ****
  
  # .h deps
  ddpro.o: $(SDIR)/../include/pvmsdpro.h
! ddpro.o: $(SDIR)/global.h
! ddpro.o: $(SDIR)/fromlib.h
! ddpro.o: $(SDIR)/tdpro.h
  ddpro.o: $(SDIR)/ddpro.h
! ddpro.o: $(SDIR)/protoglarp.h
! ddpro.o: $(SDIR)/pvmalloc.h
  ddpro.o: $(SDIR)/host.h
- ddpro.o: $(SDIR)/mesg.h
- ddpro.o: $(SDIR)/waitc.h
- ddpro.o: $(SDIR)/task.h
  ddpro.o: $(SDIR)/listmac.h
  ddpro.o: $(SDIR)/pvmdmp.h
! ddpro.o: $(SDIR)/bfunc.h
! host.o: $(SDIR)/protoglarp.h
  host.o: $(SDIR)/global.h
- host.o: $(SDIR)/pvmalloc.h
  host.o: $(SDIR)/host.h
  host.o: $(SDIR)/mesg.h
  host.o: $(SDIR)/pkt.h
! host.o: $(SDIR)/bfunc.h
  imalloc.o: $(SDIR)/bfunc.h
  lpvm.o: $(SDIR)/../include/pvm3.h
  lpvm.o: $(SDIR)/../include/pvmtev.h
! lpvm.o: $(SDIR)/global.h
! lpvm.o: $(SDIR)/tdpro.h
  lpvm.o: $(SDIR)/ddpro.h
  lpvm.o: $(SDIR)/pvmalloc.h
  lpvm.o: $(SDIR)/pvmfrag.h
  lpvm.o: $(SDIR)/pvmumbuf.h
! lpvm.o: $(SDIR)/listmac.h
! lpvm.o: $(SDIR)/bfunc.h
  lpvm.o: $(SDIR)/tevmac.h
  lpvm.o: $(SDIR)/tvdefs.h
  lpvmcat.o: $(SDIR)/../include/pvm3.h
--- 120,167 ----
  
  # .h deps
  ddpro.o: $(SDIR)/../include/pvmsdpro.h
! ddpro.o: $(SDIR)/bfunc.h
  ddpro.o: $(SDIR)/ddpro.h
! ddpro.o: $(SDIR)/fromlib.h
! ddpro.o: $(SDIR)/global.h
  ddpro.o: $(SDIR)/host.h
  ddpro.o: $(SDIR)/listmac.h
+ ddpro.o: $(SDIR)/mesg.h
+ ddpro.o: $(SDIR)/protoglarp.h
+ ddpro.o: $(SDIR)/pvmalloc.h
  ddpro.o: $(SDIR)/pvmdmp.h
! ddpro.o: $(SDIR)/task.h
! ddpro.o: $(SDIR)/tdpro.h
! ddpro.o: $(SDIR)/waitc.h
! host.o: $(SDIR)/bfunc.h
! host.o: $(SDIR)/ddpro.h
  host.o: $(SDIR)/global.h
  host.o: $(SDIR)/host.h
  host.o: $(SDIR)/mesg.h
  host.o: $(SDIR)/pkt.h
! host.o: $(SDIR)/protoglarp.h
! host.o: $(SDIR)/pvmalloc.h
! hoster.o: $(SDIR)/bfunc.h
! hoster.o: $(SDIR)/ddpro.h
! hoster.o: $(SDIR)/fromlib.h
! hoster.o: $(SDIR)/global.h
! hoster.o: $(SDIR)/host.h
! hoster.o: $(SDIR)/listmac.h
! hoster.o: $(SDIR)/mesg.h
! hoster.o: $(SDIR)/protoglarp.h
! hoster.o: $(SDIR)/pvmalloc.h
! hoster.o: $(SDIR)/tvdefs.h
  imalloc.o: $(SDIR)/bfunc.h
  lpvm.o: $(SDIR)/../include/pvm3.h
  lpvm.o: $(SDIR)/../include/pvmtev.h
! lpvm.o: $(SDIR)/bfunc.h
  lpvm.o: $(SDIR)/ddpro.h
+ lpvm.o: $(SDIR)/global.h
+ lpvm.o: $(SDIR)/listmac.h
  lpvm.o: $(SDIR)/pvmalloc.h
  lpvm.o: $(SDIR)/pvmfrag.h
  lpvm.o: $(SDIR)/pvmumbuf.h
! lpvm.o: $(SDIR)/tdpro.h
  lpvm.o: $(SDIR)/tevmac.h
  lpvm.o: $(SDIR)/tvdefs.h
  lpvmcat.o: $(SDIR)/../include/pvm3.h
***************
*** 160,257 ****
  lpvmcat.o: $(SDIR)/tdpro.h
  lpvmcat.o: $(SDIR)/tevmac.h
  lpvmcat.o: $(SDIR)/tvdefs.h
- lpvmmimd.o: $(SDIR)/../include/pvm3.h
- lpvmmimd.o: $(SDIR)/global.h
- lpvmmimd.o: $(SDIR)/tdpro.h
- lpvmmimd.o: $(SDIR)/ddpro.h
- lpvmmimd.o: $(SDIR)/pvmalloc.h
- lpvmmimd.o: $(SDIR)/pvmfrag.h
- lpvmmimd.o: $(SDIR)/pvmumbuf.h
- lpvmmimd.o: $(SDIR)/listmac.h
- lpvmmimd.o: $(SDIR)/pvmmimd.h
  lpvmgen.o: $(SDIR)/../include/pvm3.h
  lpvmgen.o: $(SDIR)/global.h
  lpvmgen.o: $(SDIR)/pvmalloc.h
- lpvmgen.o: $(SDIR)/tdpro.h
  lpvmgen.o: $(SDIR)/pvmumbuf.h
! lpvmgen.o: $(SDIR)/listmac.h
! lpvmgen.o: $(SDIR)/bfunc.h
! lpvmgen.o: $(SDIR)/../include/pvmsdpro.h
! lpvmgen.o: $(SDIR)/../include/pvmtev.h
  lpvmgen.o: $(SDIR)/tevmac.h
  lpvmgen.o: $(SDIR)/tvdefs.h
  lpvmpack.o: $(SDIR)/../include/pvm3.h
  lpvmpack.o: $(SDIR)/../include/pvmtev.h
! lpvmpack.o: $(SDIR)/global.h
! lpvmpack.o: $(SDIR)/tdpro.h
  lpvmpack.o: $(SDIR)/ddpro.h
  lpvmpack.o: $(SDIR)/pvmfrag.h
  lpvmpack.o: $(SDIR)/pvmumbuf.h
! lpvmpack.o: $(SDIR)/listmac.h
! lpvmpack.o: $(SDIR)/bfunc.h
  lpvmpack.o: $(SDIR)/tevmac.h
  mesg.o: $(SDIR)/bfunc.h
  mesg.o: $(SDIR)/ddpro.h
  mesg.o: $(SDIR)/global.h
  mesg.o: $(SDIR)/protoglarp.h
  mesg.o: $(SDIR)/pvmalloc.h
  mesg.o: $(SDIR)/pvmfrag.h
- mesg.o: $(SDIR)/mesg.h
- mesg.o: $(SDIR)/listmac.h
  mesg.o: $(SDIR)/tdpro.h
  nmdclass.o: $(SDIR)/protoglarp.h
  nmdclass.o: $(SDIR)/pvmalloc.h
! nmdclass.o: $(SDIR)/listmac.h
  pkt.o: $(SDIR)/protoglarp.h
  pkt.o: $(SDIR)/pvmalloc.h
- pkt.o: $(SDIR)/pkt.h
  pkt.o: $(SDIR)/pvmdabuf.h
- pkt.o: $(SDIR)/listmac.h
- pkt.o: $(SDIR)/bfunc.h
  pvmalloc.o: $(SDIR)/protoglarp.h
  pvmalloc.o: $(SDIR)/pvmalloc.h
  pvmd.o: $(SDIR)/../include/pvmsdpro.h
! pvmd.o: $(SDIR)/global.h
! pvmd.o: $(SDIR)/fromlib.h
! pvmd.o: $(SDIR)/tdpro.h
  pvmd.o: $(SDIR)/ddpro.h
  pvmd.o: $(SDIR)/protoglarp.h
  pvmd.o: $(SDIR)/pvmalloc.h
- pvmd.o: $(SDIR)/host.h
  pvmd.o: $(SDIR)/pvmdabuf.h
  pvmd.o: $(SDIR)/pvmfrag.h
- pvmd.o: $(SDIR)/mesg.h
- pvmd.o: $(SDIR)/pkt.h
  pvmd.o: $(SDIR)/task.h
! pvmd.o: $(SDIR)/waitc.h
! pvmd.o: $(SDIR)/listmac.h
! pvmd.o: $(SDIR)/pvmdmp.h
! pvmd.o: $(SDIR)/bfunc.h
  pvmd.o: $(SDIR)/tvdefs.h
  pvmdabuf.o: $(SDIR)/protoglarp.h
  pvmdabuf.o: $(SDIR)/pvmalloc.h
- pvmdmimd.o: $(SDIR)/global.h
  pvmdmimd.o: $(SDIR)/ddpro.h
! pvmdmimd.o: $(SDIR)/tdpro.h
! pvmdmimd.o: $(SDIR)/protoglarp.h
! pvmdmimd.o: $(SDIR)/pvmalloc.h
  pvmdmimd.o: $(SDIR)/mesg.h
  pvmdmimd.o: $(SDIR)/pkt.h
! pvmdmimd.o: $(SDIR)/task.h
! pvmdmimd.o: $(SDIR)/listmac.h
! pvmdmimd.o: $(SDIR)/pvmmimd.h
  pvmdmimd.o: $(SDIR)/pvmdmp.h
  pvmfrag.o: $(SDIR)/protoglarp.h
  pvmfrag.o: $(SDIR)/pvmalloc.h
- pvmfrag.o: $(SDIR)/pvmfrag.h
- pvmfrag.o: $(SDIR)/listmac.h
  pvmfrag.o: $(SDIR)/pvmdabuf.h
  pvmumbuf.o: $(SDIR)/../include/pvm3.h
  pvmumbuf.o: $(SDIR)/pvmalloc.h
  pvmumbuf.o: $(SDIR)/pvmfrag.h
  pvmumbuf.o: $(SDIR)/pvmumbuf.h
- pvmumbuf.o: $(SDIR)/listmac.h
- pvmumbuf.o: $(SDIR)/bfunc.h
  sdpro.o: $(SDIR)/../include/pvmsdpro.h
  sdpro.o: $(SDIR)/bfunc.h
  sdpro.o: $(SDIR)/ddpro.h
--- 173,278 ----
  lpvmcat.o: $(SDIR)/tdpro.h
  lpvmcat.o: $(SDIR)/tevmac.h
  lpvmcat.o: $(SDIR)/tvdefs.h
  lpvmgen.o: $(SDIR)/../include/pvm3.h
+ lpvmgen.o: $(SDIR)/../include/pvmsdpro.h
+ lpvmgen.o: $(SDIR)/../include/pvmtev.h
+ lpvmgen.o: $(SDIR)/bfunc.h
  lpvmgen.o: $(SDIR)/global.h
+ lpvmgen.o: $(SDIR)/listmac.h
  lpvmgen.o: $(SDIR)/pvmalloc.h
  lpvmgen.o: $(SDIR)/pvmumbuf.h
! lpvmgen.o: $(SDIR)/tdpro.h
  lpvmgen.o: $(SDIR)/tevmac.h
  lpvmgen.o: $(SDIR)/tvdefs.h
+ lpvmmimd.o: $(SDIR)/../include/pvm3.h
+ lpvmmimd.o: $(SDIR)/ddpro.h
+ lpvmmimd.o: $(SDIR)/global.h
+ lpvmmimd.o: $(SDIR)/listmac.h
+ lpvmmimd.o: $(SDIR)/pvmalloc.h
+ lpvmmimd.o: $(SDIR)/pvmfrag.h
+ lpvmmimd.o: $(SDIR)/pvmmimd.h
+ lpvmmimd.o: $(SDIR)/pvmumbuf.h
+ lpvmmimd.o: $(SDIR)/tdpro.h
  lpvmpack.o: $(SDIR)/../include/pvm3.h
  lpvmpack.o: $(SDIR)/../include/pvmtev.h
! lpvmpack.o: $(SDIR)/bfunc.h
  lpvmpack.o: $(SDIR)/ddpro.h
+ lpvmpack.o: $(SDIR)/global.h
+ lpvmpack.o: $(SDIR)/listmac.h
  lpvmpack.o: $(SDIR)/pvmfrag.h
  lpvmpack.o: $(SDIR)/pvmumbuf.h
! lpvmpack.o: $(SDIR)/tdpro.h
  lpvmpack.o: $(SDIR)/tevmac.h
  mesg.o: $(SDIR)/bfunc.h
  mesg.o: $(SDIR)/ddpro.h
  mesg.o: $(SDIR)/global.h
+ mesg.o: $(SDIR)/listmac.h
+ mesg.o: $(SDIR)/mesg.h
  mesg.o: $(SDIR)/protoglarp.h
  mesg.o: $(SDIR)/pvmalloc.h
  mesg.o: $(SDIR)/pvmfrag.h
  mesg.o: $(SDIR)/tdpro.h
+ nmdclass.o: $(SDIR)/listmac.h
  nmdclass.o: $(SDIR)/protoglarp.h
  nmdclass.o: $(SDIR)/pvmalloc.h
! pkt.o: $(SDIR)/bfunc.h
! pkt.o: $(SDIR)/listmac.h
! pkt.o: $(SDIR)/pkt.h
  pkt.o: $(SDIR)/protoglarp.h
  pkt.o: $(SDIR)/pvmalloc.h
  pkt.o: $(SDIR)/pvmdabuf.h
  pvmalloc.o: $(SDIR)/protoglarp.h
  pvmalloc.o: $(SDIR)/pvmalloc.h
+ pvmarchc.o: $(SDIR)/protoglarp.h
+ pvmarchc.o: $(SDIR)/pvmalloc.h
+ pvmcruft.o: $(SDIR)/../include/pvmsdpro.h
+ pvmcruft.o: $(SDIR)/ddpro.h
+ pvmcruft.o: $(SDIR)/global.h
+ pvmcruft.o: $(SDIR)/protoglarp.h
+ pvmcruft.o: $(SDIR)/pvmalloc.h
+ pvmcruft.o: $(SDIR)/tdpro.h
  pvmd.o: $(SDIR)/../include/pvmsdpro.h
! pvmd.o: $(SDIR)/bfunc.h
  pvmd.o: $(SDIR)/ddpro.h
+ pvmd.o: $(SDIR)/fromlib.h
+ pvmd.o: $(SDIR)/global.h
+ pvmd.o: $(SDIR)/host.h
+ pvmd.o: $(SDIR)/listmac.h
+ pvmd.o: $(SDIR)/mesg.h
+ pvmd.o: $(SDIR)/pkt.h
  pvmd.o: $(SDIR)/protoglarp.h
  pvmd.o: $(SDIR)/pvmalloc.h
  pvmd.o: $(SDIR)/pvmdabuf.h
+ pvmd.o: $(SDIR)/pvmdmp.h
  pvmd.o: $(SDIR)/pvmfrag.h
  pvmd.o: $(SDIR)/task.h
! pvmd.o: $(SDIR)/tdpro.h
  pvmd.o: $(SDIR)/tvdefs.h
+ pvmd.o: $(SDIR)/waitc.h
  pvmdabuf.o: $(SDIR)/protoglarp.h
  pvmdabuf.o: $(SDIR)/pvmalloc.h
  pvmdmimd.o: $(SDIR)/ddpro.h
! pvmdmimd.o: $(SDIR)/global.h
! pvmdmimd.o: $(SDIR)/listmac.h
  pvmdmimd.o: $(SDIR)/mesg.h
  pvmdmimd.o: $(SDIR)/pkt.h
! pvmdmimd.o: $(SDIR)/protoglarp.h
! pvmdmimd.o: $(SDIR)/pvmalloc.h
  pvmdmimd.o: $(SDIR)/pvmdmp.h
+ pvmdmimd.o: $(SDIR)/pvmmimd.h
+ pvmdmimd.o: $(SDIR)/task.h
+ pvmdmimd.o: $(SDIR)/tdpro.h
+ pvmfrag.o: $(SDIR)/listmac.h
  pvmfrag.o: $(SDIR)/protoglarp.h
  pvmfrag.o: $(SDIR)/pvmalloc.h
  pvmfrag.o: $(SDIR)/pvmdabuf.h
+ pvmfrag.o: $(SDIR)/pvmfrag.h
  pvmumbuf.o: $(SDIR)/../include/pvm3.h
+ pvmumbuf.o: $(SDIR)/bfunc.h
+ pvmumbuf.o: $(SDIR)/listmac.h
  pvmumbuf.o: $(SDIR)/pvmalloc.h
  pvmumbuf.o: $(SDIR)/pvmfrag.h
  pvmumbuf.o: $(SDIR)/pvmumbuf.h
  sdpro.o: $(SDIR)/../include/pvmsdpro.h
  sdpro.o: $(SDIR)/bfunc.h
  sdpro.o: $(SDIR)/ddpro.h
***************
*** 263,308 ****
  sdpro.o: $(SDIR)/task.h
  sdpro.o: $(SDIR)/tdpro.h
  sdpro.o: $(SDIR)/waitc.h
! startup.o: $(SDIR)/global.h
! startup.o: $(SDIR)/fromlib.h
  startup.o: $(SDIR)/ddpro.h
! startup.o: $(SDIR)/tdpro.h
! startup.o: $(SDIR)/protoglarp.h
! startup.o: $(SDIR)/pvmalloc.h
! startup.o: $(SDIR)/mesg.h
  startup.o: $(SDIR)/host.h
  startup.o: $(SDIR)/listmac.h
! startup.o: $(SDIR)/bfunc.h
  startup.o: $(SDIR)/tvdefs.h
  task.o: $(SDIR)/../include/pvmsdpro.h
! task.o: $(SDIR)/global.h
  task.o: $(SDIR)/ddpro.h
! task.o: $(SDIR)/protoglarp.h
  task.o: $(SDIR)/mesg.h
  task.o: $(SDIR)/pkt.h
  task.o: $(SDIR)/task.h
  task.o: $(SDIR)/waitc.h
- task.o: $(SDIR)/pvmalloc.h
- task.o: $(SDIR)/listmac.h
- task.o: $(SDIR)/bfunc.h
  tdpro.o: $(SDIR)/../include/pvmsdpro.h
! tdpro.o: $(SDIR)/global.h
! tdpro.o: $(SDIR)/fromlib.h
! tdpro.o: $(SDIR)/tdpro.h
  tdpro.o: $(SDIR)/ddpro.h
  tdpro.o: $(SDIR)/protoglarp.h
  tdpro.o: $(SDIR)/pvmalloc.h
- tdpro.o: $(SDIR)/mesg.h
  tdpro.o: $(SDIR)/task.h
! tdpro.o: $(SDIR)/host.h
  tdpro.o: $(SDIR)/waitc.h
! tdpro.o: $(SDIR)/listmac.h
! tdpro.o: $(SDIR)/bfunc.h
  waitc.o: $(SDIR)/global.h
  waitc.o: $(SDIR)/protoglarp.h
  waitc.o: $(SDIR)/pvmalloc.h
  waitc.o: $(SDIR)/waitc.h
- waitc.o: $(SDIR)/mesg.h
- waitc.o: $(SDIR)/host.h
- waitc.o: $(SDIR)/listmac.h
- waitc.o: $(SDIR)/bfunc.h
--- 284,330 ----
  sdpro.o: $(SDIR)/task.h
  sdpro.o: $(SDIR)/tdpro.h
  sdpro.o: $(SDIR)/waitc.h
! startup.o: $(SDIR)/bfunc.h
  startup.o: $(SDIR)/ddpro.h
! startup.o: $(SDIR)/fromlib.h
! startup.o: $(SDIR)/global.h
  startup.o: $(SDIR)/host.h
  startup.o: $(SDIR)/listmac.h
! startup.o: $(SDIR)/mesg.h
! startup.o: $(SDIR)/protoglarp.h
! startup.o: $(SDIR)/pvmalloc.h
  startup.o: $(SDIR)/tvdefs.h
  task.o: $(SDIR)/../include/pvmsdpro.h
! task.o: $(SDIR)/bfunc.h
  task.o: $(SDIR)/ddpro.h
! task.o: $(SDIR)/fromlib.h
! task.o: $(SDIR)/global.h
! task.o: $(SDIR)/listmac.h
  task.o: $(SDIR)/mesg.h
  task.o: $(SDIR)/pkt.h
+ task.o: $(SDIR)/protoglarp.h
+ task.o: $(SDIR)/pvmalloc.h
  task.o: $(SDIR)/task.h
  task.o: $(SDIR)/waitc.h
  tdpro.o: $(SDIR)/../include/pvmsdpro.h
! tdpro.o: $(SDIR)/bfunc.h
  tdpro.o: $(SDIR)/ddpro.h
+ tdpro.o: $(SDIR)/fromlib.h
+ tdpro.o: $(SDIR)/global.h
+ tdpro.o: $(SDIR)/host.h
+ tdpro.o: $(SDIR)/listmac.h
+ tdpro.o: $(SDIR)/mesg.h
  tdpro.o: $(SDIR)/protoglarp.h
  tdpro.o: $(SDIR)/pvmalloc.h
  tdpro.o: $(SDIR)/task.h
! tdpro.o: $(SDIR)/tdpro.h
  tdpro.o: $(SDIR)/waitc.h
! waitc.o: $(SDIR)/bfunc.h
! waitc.o: $(SDIR)/ddpro.h
  waitc.o: $(SDIR)/global.h
+ waitc.o: $(SDIR)/host.h
+ waitc.o: $(SDIR)/listmac.h
+ waitc.o: $(SDIR)/mesg.h
  waitc.o: $(SDIR)/protoglarp.h
  waitc.o: $(SDIR)/pvmalloc.h
  waitc.o: $(SDIR)/waitc.h
*** ../netlib/pvm3.3.10/src/Makefile.shmem	Fri Jul 28 12:42:15 1995
--- src/Makefile.shmem	Mon May 13 16:14:30 1996
***************
*** 46,52 ****
  #OPTIONS	=	-g
  #OPTIONS	=	-g -DUSE_PVM_ALLOC -DSTATISTICS -DTIMESTAMPLOG
  CFLAGS	=	$(OPTIONS) -DSHMEM -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
! DOBJ	=	ddpro.o pvmfrag.o host.o imalloc.o \
  			mesg.o nmdclass.o pkt.o pvmalloc.o pvmarchc.o pvmcruft.o pvmd.o \
  			pvmlog.o sdpro.o startup.o task.o tdpro.o waitc.o \
  			pvmshmem.o pvmdshmem.o
--- 46,52 ----
  #OPTIONS	=	-g
  #OPTIONS	=	-g -DUSE_PVM_ALLOC -DSTATISTICS -DTIMESTAMPLOG
  CFLAGS	=	$(OPTIONS) -DSHMEM -I$(SDIR)/../include -DARCHCLASS=\"$(PVM_ARCH)\" -DIMA_$(PVM_ARCH) $(ARCHCFLAGS)
! DOBJ	=	ddpro.o pvmfrag.o host.o hoster.o imalloc.o \
  			mesg.o nmdclass.o pkt.o pvmalloc.o pvmarchc.o pvmcruft.o pvmd.o \
  			pvmlog.o sdpro.o startup.o task.o tdpro.o waitc.o \
  			pvmshmem.o pvmdshmem.o
***************
*** 78,88 ****
  #
  lint:
  	lint -DARCHCLASS=\"$(PVM_ARCH)\" \
! 		archcode.c ddpro.c host.c mesg.c imalloc.c pkt.c \
  		pvmcruft.c pvmd.c pvmfrag.c pvmlog.c pvmalloc.c startup.c \
  		task.c tdpro.c waitc.c > Ld
  	lint \
! 		imalloc.c lpvmshmem.c lpvmgen.c lpvmpack.c \
  		pvmalloc.c pvmcruft.c pvmfrag.c pvmumbuf.c > Ll
  
  ddpro.o:	$(SDIR)/ddpro.c
--- 78,88 ----
  #
  lint:
  	lint -DARCHCLASS=\"$(PVM_ARCH)\" \
! 		pvmarchc.c ddpro.c host.c hoster.c mesg.c imalloc.c pkt.c \
  		pvmcruft.c pvmd.c pvmfrag.c pvmlog.c pvmalloc.c startup.c \
  		task.c tdpro.c waitc.c > Ld
  	lint \
! 		imalloc.c lpvmshmem.c lpvmcat.c lpvmgen.c lpvmpack.c \
  		pvmalloc.c pvmcruft.c pvmfrag.c pvmumbuf.c > Ll
  
  ddpro.o:	$(SDIR)/ddpro.c
***************
*** 91,96 ****
--- 91,98 ----
  	$(CC) $(CFLAGS) -c $(SDIR)/pvmfrag.c
  host.o:	$(SDIR)/host.c
  	$(CC) $(CFLAGS) -c $(SDIR)/host.c
+ hoster.o:	$(SDIR)/hoster.c
+ 	$(CC) $(CFLAGS) -c $(SDIR)/hoster.c
  imalloc.o:	$(SDIR)/imalloc.c
  	$(CC) $(CFLAGS) -c $(SDIR)/imalloc.c
  lpvm.o:	$(SDIR)/lpvm.c
***************
*** 161,166 ****
--- 163,178 ----
  host.o: $(SDIR)/pkt.h
  host.o: $(SDIR)/protoglarp.h
  host.o: $(SDIR)/pvmalloc.h
+ hoster.o: $(SDIR)/bfunc.h
+ hoster.o: $(SDIR)/ddpro.h
+ hoster.o: $(SDIR)/fromlib.h
+ hoster.o: $(SDIR)/global.h
+ hoster.o: $(SDIR)/host.h
+ hoster.o: $(SDIR)/listmac.h
+ hoster.o: $(SDIR)/mesg.h
+ hoster.o: $(SDIR)/protoglarp.h
+ hoster.o: $(SDIR)/pvmalloc.h
+ hoster.o: $(SDIR)/tvdefs.h
  imalloc.o: $(SDIR)/bfunc.h
  lpvm.o: $(SDIR)/../include/pvm3.h
  lpvm.o: $(SDIR)/../include/pvmtev.h
*** ../netlib/pvm3.3.10/src/SP2MPI/Makefile	Mon Jun 12 11:45:25 1995
--- src/SP2MPI/Makefile	Tue May 14 10:34:29 1996
***************
*** 9,15 ****
  	make -f $(CONFFILE) -f ../Makefile.mimd pvmd3 libpvm3.a 
  
  pelib:
! 	make CC=mpicc -f $(CONFFILE) -f ../Makefile.mimd libpvm3pe.a
  	
  
  clean:
--- 9,16 ----
  	make -f $(CONFFILE) -f ../Makefile.mimd pvmd3 libpvm3.a 
  
  pelib:
! 	cd ../../include; rm -f mpi.h; ln -s /usr/lpp/ppe.poe/include/mpi.h .
! 	make CC=mpcc -f $(CONFFILE) -f ../Makefile.mimd libpvm3pe.a
  	
  
  clean:
*** ../netlib/pvm3.3.10/src/SP2MPI/pvmdmimd.c	Tue Jul 25 13:41:29 1995
--- src/SP2MPI/pvmdmimd.c	Tue May 14 10:36:25 1996
***************
*** 86,91 ****
--- 86,94 ----
   *			tp: task pointer.
   *
  $Log: pvmdmimd.c,v $
+  * Revision 1.3  1996/05/14  14:35:59  manchek
+  * inc'd changes from chulho@kgn.ibm.com
+  *
   * Revision 1.2  1995/07/25  17:41:27  manchek
   * mpp_output returns int
   *
***************
*** 144,151 ****
  #define MPIOPT1		"-procs"
  #define MPIOPT2		"-euilib"
  #define MPIOPT3		"-hfile"
  #define MPIOPARG2	"us"		/* options: -procs # -euilib us */
! #define MPIARGC		7			/* number of command line arguments */
  
  char *getenv();
  
--- 147,156 ----
  #define MPIOPT1		"-procs"
  #define MPIOPT2		"-euilib"
  #define MPIOPT3		"-hfile"
+ #define MPIOPT4		"-rmpool"
  #define MPIOPARG2	"us"		/* options: -procs # -euilib us */
! #define MPIOPARG3	"ip"		/* Enable IP over switch */
! #define MPIARGC		7		/* number of command line arguments */
  
  char *getenv();
  
***************
*** 154,160 ****
  extern int debugmask;			/* from pvmd.c */
  extern char **epaths;			/* from pvmd.c */
  extern int myhostpart;			/* from pvmd.c */
! extern int myndf;				/* from pvmd.c */
  extern int tidhmask;			/* from pvmd.c */
  extern int ourudpmtu;			/* from pvmd.c */
  extern struct htab *hosts;		/* from pvmd.c */
--- 159,165 ----
  extern int debugmask;			/* from pvmd.c */
  extern char **epaths;			/* from pvmd.c */
  extern int myhostpart;			/* from pvmd.c */
! extern int myndf;			/* from pvmd.c */
  extern int tidhmask;			/* from pvmd.c */
  extern int ourudpmtu;			/* from pvmd.c */
  extern struct htab *hosts;		/* from pvmd.c */
***************
*** 165,177 ****
  
  /* private */
  
! static char rcsid[] = "$Id: pvmdmimd.c,v 1.2 1995/07/25 17:41:27 manchek Exp $";
  static struct nodeset *busynodes;	/* active nodes; ordered by proc type */
! static char pvmtxt[512];			/* scratch for error log */
  static int ptypemask;			/* mask; we use these bits of ptype in tids */
  static char nodefile[L_tmpnam];	/* tmp node file */
  static char **nodelist = 0;		/* default poe node list */
! static int partsize = 0;		/* number of nodes listed in MP_HOSTFILE */
  
  
  void
--- 170,185 ----
  
  /* private */
  
! static char rcsid[] = "$Id: pvmdmimd.c,v 1.3 1996/05/14 14:35:59 manchek Exp $";
  static struct nodeset *busynodes;	/* active nodes; ordered by proc type */
! static char pvmtxt[512];		/* scratch for error log */
  static int ptypemask;			/* mask; we use these bits of ptype in tids */
  static char nodefile[L_tmpnam];	/* tmp node file */
  static char **nodelist = 0;		/* default poe node list */
! static int partsize = 0;		/* total number of nodes allocated */
! static int hostfileused = TRUE;		/* Check if MP_HOSTFILE used */
! static char defaultpool[64]="1";	/* default MP_POOL if not set */
! static char mpiadapter[]={MPIOPARG2};   /* default User-Space */
  
  
  void
***************
*** 180,213 ****
  	char **argv;
  {
  	struct stat sb;
! 	char *hfn;			/* host file name */
  	char nname[128];	/* node name */
  	FILE *hfp;
  	int i;
  
! 	if ((hfn = getenv("MP_HOSTFILE")) || stat(hfn = "host.list", &sb) != -1)
  	{
  		if (!(hfp = fopen(hfn, "r"))) {
! 			sprintf(pvmtxt, "sp2hostfile() fopen %s", hfn);
  			pvmlogperror(pvmtxt);
! 			return;
  		}
  	} else {
! 		pvmlogerror("mpp_init() no POE host file");
! 		return;
  	}
! 	while (fscanf(hfp, "%s", nname) != EOF)
! 		partsize++;
! 	sprintf(pvmtxt, "%d nodes in %s\n", partsize, hfn);
!    	pvmlogerror(pvmtxt);
! 
! 	nodelist = TALLOC(partsize, char*, "nname");
! 	rewind(hfp);
! 	for (i = 0; i < partsize; i++) {
! 		fscanf(hfp, "%s", nname);
! 		nodelist[i] = STRALLOC(nname);
  	}
! 	fclose(hfp);
  
  	busynodes = TALLOC(1, struct nodeset, "nsets");
  	BZERO((char*)busynodes, sizeof(struct nodeset));
--- 188,267 ----
  	char **argv;
  {
  	struct stat sb;
! 	char *hfn;		/* host file name */
  	char nname[128];	/* node name */
  	FILE *hfp;
  	int i;
  
! 	if ((hfn = getenv("LOADLBATCH"))) {
! 		if (strcmp(hfn, "yes") == 0) {
! 			if ((hfn = getenv("LOADL_PROCESSOR_LIST"))) {
! 				sprintf(pvmtxt, 
! 				  "LOADL_PROCESSOR_LIST=%s.\n",hfn);
! 				pvmlogperror(pvmtxt);
! 				hostfileused=FALSE;
! 				for (hfn;*hfn!='\0';hfn++) {
! 					if (*hfn == ' ')
! 						partsize++;
! 				}
! 			} else {
! 				sprintf(pvmtxt, 
! 				  "LOADL_PROCESSOR_LIST=%s - is not set\n",hfn);
! 				pvmlogperror(pvmtxt);
! 				exit(PvmHostFail);
! 			}
! 		} else {
! 			sprintf(pvmtxt,"LOADLBATCH=%s - not set to yes\n",hfn);
! 			pvmlogperror(pvmtxt);
! 			exit(PvmHostFail);
!                 }
!         } else if ((hfn = getenv("MP_PROCS"))) {
! 		if ((partsize = atoi(hfn)) < 1) {
! 			sprintf(pvmtxt,"MP_PROCS=%d must be >= to 1\n",partsize);
! 			pvmlogperror(pvmtxt);
! 			exit(PvmHostFail);
! 		}
! 		hostfileused=FALSE;
!         	if ((hfn = getenv("MP_RMPOOL"))) {
! 			if (atoi(hfn) < 0) {
! 				sprintf(pvmtxt,
! 				   "MP_RMPOOL=%d must be >= to 0\n",defaultpool);
! 				pvmlogperror(pvmtxt);
! 				exit(PvmHostFail);
! 			}
! 			strcpy(defaultpool,hfn);
! 		}
!         } else if ((hfn = getenv("MP_HOSTFILE")))
  	{
  		if (!(hfp = fopen(hfn, "r"))) {
! 			sprintf(pvmtxt, "sp2hostfile() fopen %s\n", hfn);
  			pvmlogperror(pvmtxt);
! 			exit(PvmHostFail);
  		}
+ 		hostfileused=TRUE;
+ 		while (fscanf(hfp, "%s", nname) != EOF)
+ 			partsize++;
+ 
+ 		nodelist = TALLOC(partsize, char*, "nname");
+ 		rewind(hfp);
+ 		for (i = 0; i < partsize; i++) {
+ 			fscanf(hfp, "%s", nname);
+ 			nodelist[i] = STRALLOC(nname);
+ 		}
+ 		fclose(hfp);
+ 
  	} else {
! 		pvmlogerror("mpp_init() no POE host file.\n");
! 		pvmlogerror("mpp_init() MP_PROCS, MP_RMPOOL or MP_HOSTFILE must be set.\n");
! 		exit(PvmHostFail);
  	}
! 	if ((hfn = getenv("MP_EUILIB"))) {
! 		if (strcmp(hfn, "ip") == 0) {
! 			strcpy(mpiadapter,MPIOPARG3);  /* IP over switch */
! 		}
  	}
! 	sprintf(pvmtxt, "%d nodes allocated.\n", partsize);
! 	pvmlogerror(pvmtxt);
  
  	busynodes = TALLOC(1, struct nodeset, "nsets");
  	BZERO((char*)busynodes, sizeof(struct nodeset));
***************
*** 309,317 ****
  		pvmlogerror(pvmtxt);
  	}
  	newp->n_first = last + 1;
! 	if (!sp2hostfile(newp->n_first, count)) {
! 		PVM_FREE(newp);
! 		return (struct nodeset *)0;
  	}
  	newp->n_ptype = ptype;
  	newp->n_ptid = ptid;
--- 363,373 ----
  		pvmlogerror(pvmtxt);
  	}
  	newp->n_first = last + 1;
! 	if (hostfileused) {
! 		if (!sp2hostfile(newp->n_first, count)) {
! 			PVM_FREE(newp);
! 			return (struct nodeset *)0;
! 		}
  	}
  	newp->n_ptype = ptype;
  	newp->n_ptid = ptid;
***************
*** 444,457 ****
  		/* ar[-1], poe, -procs, #, -euilib, us, -hfile fname */
  		nargs += MPIARGC + 1;
  		av = TALLOC(nargs + 1, char*, "argv");
! 		av++;						/* reserve room for debugger */
  		BZERO((char*)av, nargs * sizeof(char*));
  		av[0] = MPICOMM;
  		av[1] = path;
  		av[--nargs] = 0;
! 		av[--nargs] = nodefile;
! 		av[--nargs] = MPIOPT3;
! 		av[--nargs] = MPIOPARG2;
  		av[--nargs] = MPIOPT2;
  		sprintf(c, "%d", count+1);
  		av[--nargs] = c;
--- 500,518 ----
  		/* ar[-1], poe, -procs, #, -euilib, us, -hfile fname */
  		nargs += MPIARGC + 1;
  		av = TALLOC(nargs + 1, char*, "argv");
! 		av++;				/* reserve room for debugger */
  		BZERO((char*)av, nargs * sizeof(char*));
  		av[0] = MPICOMM;
  		av[1] = path;
  		av[--nargs] = 0;
! 		if (hostfileused) {
! 			av[--nargs] = nodefile;
! 			av[--nargs] = MPIOPT3;
! 		} else {
! 			av[--nargs] = defaultpool;
! 			av[--nargs] = MPIOPT4;
! 		}
! 		av[--nargs] = mpiadapter;
  		av[--nargs] = MPIOPT2;
  		sprintf(c, "%d", count+1);
  		av[--nargs] = c;
*** ../netlib/pvm3.3.10/src/ddpro.c	Mon Jul 24 14:23:18 1995
--- src/ddpro.c	Mon May 13 16:23:28 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Entry points for messages from network.
   *
  $Log: ddpro.c,v $
+  * Revision 1.15  1996/05/13  20:23:21  manchek
+  * a few fixes to manual startup code
+  *
   * Revision 1.14  1995/07/24  18:23:14  manchek
   * spelling problem
   *
***************
*** 148,155 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: ddpro.c,v 1.14 1995/07/24 18:23:14 manchek Exp $";
! static char pvmtxt[512];			/* scratch for error log */
  
  int dm_add();
  int dm_addack();
--- 151,158 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: ddpro.c,v 1.15 1996/05/13 20:23:21 manchek Exp $";
! static char pvmtxt[1024];			/* scratch for error log */
  
  int dm_add();
  int dm_addack();
***************
*** 672,679 ****
  		else
  			strcpy(buf, (hp->hd_aname ? hp->hd_aname : hp->hd_name));
  		pkstr(mp2, buf);
! 		(void)sprintf(buf, "%s -s -d%x -n%s %d %s %d",
  				(hp->hd_dpath ? hp->hd_dpath : pvmdpath),
  				debugmask,
  				hp->hd_name,
  				hosts->ht_master,
--- 675,683 ----
  		else
  			strcpy(buf, (hp->hd_aname ? hp->hd_aname : hp->hd_name));
  		pkstr(mp2, buf);
! 		(void)sprintf(buf, "%s %s -d%x -n%s %d %s %d",
  				(hp->hd_dpath ? hp->hd_dpath : pvmdpath),
+ 				(hp->hd_sopts && !strcmp(hp->hd_sopts, "ms") ? "-S" : "-s"),
  				debugmask,
  				hp->hd_name,
  				hosts->ht_master,
***************
*** 1550,1556 ****
  	int i, j;
  	int t;
  	int hh;
! 	char buf[512];
  
  	/*
  	* unpack startup results, update hosts in wait context
--- 1554,1560 ----
  	int i, j;
  	int t;
  	int hh;
! 	char buf[1024];
  
  	/*
  	* unpack startup results, update hosts in wait context
***************
*** 1584,1591 ****
  		hp = wxp->w_hosts[i];
  		ac = sizeof(av)/sizeof(av[0]);
  		if (crunchzap(buf, &ac, av) || ac != 4) {
! 			sprintf(pvmtxt, "startack() host %s expected version\n",
! 					hp->hd_name);
  			pvmlogerror(pvmtxt);
  			hp->hd_err = errnamecode(buf);
  			continue;
--- 1588,1595 ----
  		hp = wxp->w_hosts[i];
  		ac = sizeof(av)/sizeof(av[0]);
  		if (crunchzap(buf, &ac, av) || ac != 4) {
! 			sprintf(pvmtxt, "startack() host %s expected version, got \"%s\"\n",
! 					hp->hd_name, buf);
  			pvmlogerror(pvmtxt);
  			hp->hd_err = errnamecode(buf);
  			continue;
*** ../netlib/pvm3.3.10/src/ddpro.h	Wed May 17 12:06:36 1995
--- src/ddpro.h	Mon May 13 16:24:10 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Pvmd-pvmd protocol
   *
  $Log: ddpro.h,v $
+  * Revision 1.5  1996/05/13  20:24:06  manchek
+  * added PVMDISTASK
+  *
   * Revision 1.4  1995/05/17  16:06:18  manchek
   * cast DM_FIRST to int.
   * added debugging classes
***************
*** 138,141 ****
--- 141,145 ----
  #define	PVMDPRIME		4		/* am pvmd' */
  #define	PVMDHALTING		5		/* stopping rsn */
  #define	PVMDSHUTDOWN	6		/* in timeout to halt, waiting for FIN|ACK */
+ #define	PVMDISTASK		7		/* between fork and exec to spawn task */
  
*** ../netlib/pvm3.3.10/src/global.h	Fri Nov 10 16:58:40 1995
--- src/global.h	Mon May 13 16:25:17 1996
***************
*** 32,37 ****
--- 32,41 ----
   *	Generic includes.
   *
  $Log: global.h,v $
+  * Revision 1.21  1996/05/13  20:24:52  manchek
+  * changed DEFBINDIR to $HOME...
+  * release patch 11
+  *
   * Revision 1.20  1995/11/02  16:00:37  manchek
   * version change
   *
***************
*** 97,103 ****
  
  /* release version */
  
! #define	PVM_VER	"3.3.10"
  
  /* UDPMAXLEN should be set to the largest UDP message length
     your system can handle. */
--- 101,107 ----
  
  /* release version */
  
! #define	PVM_VER	"3.3.11"
  
  /* UDPMAXLEN should be set to the largest UDP message length
     your system can handle. */
***************
*** 148,154 ****
  #define	FFEOM		2		/* final frag of msg */
  
  #ifndef	DEFBINDIR
! #define	DEFBINDIR	"pvm3/bin/$PVM_ARCH:$PVM_ROOT/bin/$PVM_ARCH"
  #endif
  
  #ifndef	DEFDEBUGGER
--- 152,158 ----
  #define	FFEOM		2		/* final frag of msg */
  
  #ifndef	DEFBINDIR
! #define	DEFBINDIR	"$HOME/pvm3/bin/$PVM_ARCH:$PVM_ROOT/bin/$PVM_ARCH"
  #endif
  
  #ifndef	DEFDEBUGGER
*** ../netlib/pvm3.3.10/src/host.c	Fri Nov 10 16:58:40 1995
--- src/host.c	Mon May 13 16:25:59 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Host table functions.
   *
  $Log: host.c,v $
+  * Revision 1.10  1996/05/13  20:25:48  manchek
+  * missing pvmlogerror in readhostfile
+  *
   * Revision 1.9  1995/11/02  16:01:49  manchek
   * use NET_IF_IN_SYS if include/sys/net/if.h
   *
***************
*** 123,129 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: host.c,v 1.9 1995/11/02 16:01:49 manchek Exp $";
  static char pvmtxt[1024];			/* scratch space for error messages */
  
  
--- 126,132 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: host.c,v 1.10 1996/05/13 20:25:48 manchek Exp $";
  static char pvmtxt[1024];			/* scratch space for error messages */
  
  
***************
*** 671,676 ****
--- 674,680 ----
  
  	if (iflist(&my_in_addrs, &num_addrs) == -1 || num_addrs < 1) {
  		sprintf(pvmtxt, "readhostfile() iflist failed\n");
+ 		pvmlogerror(pvmtxt);
  		goto bail;
  	}
  
*** /dev/null	Fri May 17 17:41:08 1996
--- src/hoster.c	Fri May 17 17:33:58 1996
***************
*** 0 ****
--- 1,767 ----
+ 
+ /*
+  *         PVM version 3.3:  Parallel Virtual Machine System
+  *               University of Tennessee, Knoxville TN.
+  *           Oak Ridge National Laboratory, Oak Ridge TN.
+  *                   Emory University, Atlanta GA.
+  *      Authors:  A. L. Beguelin, J. J. Dongarra, G. A. Geist,
+  *    W. C. Jiang, R. J. Manchek, B. K. Moore, and V. S. Sunderam
+  *                   (C) 1992 All Rights Reserved
+  *
+  *                              NOTICE
+  *
+  * Permission to use, copy, modify, and distribute this software and
+  * its documentation for any purpose and without fee is hereby granted
+  * provided that the above copyright notice appear in all copies and
+  * that both the copyright notice and this permission notice appear in
+  * supporting documentation.
+  *
+  * Neither the Institutions (Emory University, Oak Ridge National
+  * Laboratory, and University of Tennessee) nor the Authors make any
+  * representations about the suitability of this software for any
+  * purpose.  This software is provided ``as is'' without express or
+  * implied warranty.
+  *
+  * PVM version 3 was funded in part by the U.S. Department of Energy,
+  * the National Science Foundation and the State of Tennessee.
+  */
+ 
+ /*
+  *	hoster.c
+  *
+  *	Slave pvmd starter.
+  *
+ $Log: hoster.c,v $
+  * Revision 1.2  1996/05/17  21:33:50  manchek
+  * missed a few bcopys
+  *
+  * Revision 1.1  1996/05/13  20:26:12  manchek
+  * Initial revision
+  *
+  * Revision 1.17  1995/11/02  16:36:14  manchek
+  * added NEEDSENDIAN switch
+  *
+  * Revision 1.16  1995/07/28  16:41:01  manchek
+  * wrap HASERRORVARS around errno declarations
+  *
+  * Revision 1.15  1995/07/28  16:04:06  manchek
+  * switch endian includes on flag, not arch name
+  *
+  * Revision 1.14  1995/07/11  18:55:33  manchek
+  * moved printing of PVMSOCK in master_config to main
+  *
+  * Revision 1.13  1995/07/03  19:06:54  manchek
+  * removed POWER4 ifdefs
+  *
+  * Revision 1.12  1995/05/30  17:53:08  manchek
+  * Added ifdefs and small changes for SP2MPI arch
+  *
+  * Revision 1.11  1995/05/17  16:53:03  manchek
+  * use FDSETISINT in select
+  *
+  * Revision 1.10  1995/02/06  21:35:59  manchek
+  * host table mtu set from ourudpmtu instead of UDPMAXLEN
+  *
+  * Revision 1.9  1994/10/15  19:31:31  manchek
+  * fixed typo in log message
+  *
+  * Revision 1.8  1994/06/04  21:45:24  manchek
+  * added unix domain sockets.
+  * ripped out old (serial) startup code
+  *
+  * Revision 1.7  1994/06/03  20:38:27  manchek
+  * version 3.3.0
+  *
+  * Revision 1.6  1993/11/30  19:54:41  manchek
+  * check the default entry in filehosts when adding new hosts
+  *
+  * Revision 1.5  1993/11/30  16:46:10  manchek
+  * pass whole remote command as a single arg to rsh
+  *
+  * Revision 1.4  1993/11/30  15:54:37  manchek
+  * master pvmd once again doesn't close fds 0..2 -
+  * this broke rexec startup
+  *
+  * Revision 1.3  1993/10/25  20:53:51  manchek
+  * fixed a few typos in error log messages.
+  * added code to close all fds and reopen 0..2 as /dev/null
+  *
+  * Revision 1.2  1993/10/04  20:30:30  manchek
+  * mksocks() now uses pvmdsockfile() instead of TDSOCKNAME
+  *
+  * Revision 1.1  1993/08/30  23:26:51  manchek
+  * Initial revision
+  *
+  */
+ 
+ #ifdef NEEDMENDIAN
+ #include <machine/endian.h>
+ #endif
+ #ifdef NEEDENDIAN
+ #include <endian.h>
+ #endif
+ #ifdef NEEDSENDIAN
+ #include <sys/endian.h>
+ #endif
+ #ifdef IMA_TITN
+ #include <bsd/sys/types.h>
+ #else
+ #include <sys/types.h>
+ #endif
+ #include <sys/time.h>
+ #if defined(IMA_RS6K) || defined(IMA_SP2MPI)
+ #include <sys/select.h>
+ #endif
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ctype.h>
+ #ifdef	SYSVSTR
+ #include <string.h>
+ #define	CINDEX(s,c)	strchr(s,c)
+ #else
+ #include <strings.h>
+ #define	CINDEX(s,c)	index(s,c)
+ #endif
+ #include <netdb.h>
+ 
+ #include "global.h"
+ #include "fromlib.h"
+ #include "ddpro.h"
+ #include "protoglarp.h"
+ #include "pvmalloc.h"
+ #include "mesg.h"
+ #include "host.h"
+ #include "listmac.h"
+ #include "tvdefs.h"
+ #include "bfunc.h"
+ 
+ #ifndef	RSHCOMMAND
+ #define	RSHCOMMAND	"/usr/ucb/rsh"
+ #endif
+ 
+ #ifndef	RSHTIMEOUT
+ #define	RSHTIMEOUT	60
+ #endif
+ 
+ #ifndef	RSHNPLL
+ #define	RSHNPLL	5
+ #endif
+ 
+ #ifndef	max
+ #define	max(a,b)	((a)>(b)?(a):(b))
+ #endif
+ 
+ #ifndef	min
+ #define	min(a,b)	((a)<(b)?(a):(b))
+ #endif
+ 
+ 
+ struct hst {
+ 	int h_tid;
+ 	char *h_name;
+ 	char *h_login;
+ 	char *h_sopts;
+ 	int h_flag;
+ #define	HST_PASSWORD	1		/* ask for a password */
+ #define	HST_MANUAL		2		/* do manual startup */
+ 	char *h_cmd;
+ 	char *h_result;
+ };
+ 
+ struct slot {
+ 	struct slot *s_link, *s_rlink;		/* free/active list */
+ 	struct hst *s_hst;					/* host table entry */
+ 	struct timeval s_bail;				/* timeout time */
+ 	int s_rfd, s_wfd, s_efd;			/* slave stdin/out/err */
+ 	char s_buf[256];					/* stdout from host */
+ 	char s_ebuf[256];					/* stderr from host */
+ 	int s_len;							/* length of s_buf */
+ 	int s_elen;							/* length of s_ebuf */
+ };
+ 
+ 
+ /***************
+  **  Globals  **
+  **           **
+  ***************/
+ 
+ #ifndef HASERRORVARS
+ extern int errno;
+ #endif
+ 
+ extern void pvmbailout();
+ 
+ extern int debugmask;				/* from pvmd.c */
+ extern char *username;				/* from pvmd.c */
+ 
+ 
+ /***************
+  **  Private  **
+  **           **
+  ***************/
+ 
+ static char rcsid[] = "$Id: hoster.c,v 1.2 1996/05/17 21:33:50 manchek Exp $";
+ static struct slot slots[RSHNPLL+2];	/* state var/context for each slot */
+ static struct slot *slfree = 0;			/* free list of slots */
+ static char pvmtxt[1024];				/* scratch for error log */
+ 
+ 
+ int
+ hoster(mp)
+ 	struct mesg *mp;
+ {
+ 	struct mesg *mp2;
+ 	int num;
+ 	int i;
+ 	struct hst **hostlist;
+ 	struct hst *hp;
+ 	char *p;
+ 
+ 	/*
+ 	* unpack the startup message
+ 	*/
+ 
+ 	upkint(mp, &num);
+ 	if (debugmask & PDMSTARTUP) {
+ 		sprintf(pvmtxt, "hoster() %d to start\n", num);
+ 		pvmlogerror(pvmtxt);
+ 	}
+ 	if (num > 0) {
+ 		hostlist = TALLOC(num, struct hst *, "hsts");
+ 		for (i = 0; i < num; i++) {
+ 			hp = TALLOC(1, struct hst, "hst");
+ 			hostlist[i] = hp;
+ 			hp->h_flag = 0;
+ 			hp->h_result = 0;
+ 			if (upkint(mp, &hp->h_tid)
+ 			|| upkstralloc(mp, &hp->h_sopts)
+ 			|| upkstralloc(mp, &hp->h_login)
+ 			|| upkstralloc(mp, &hp->h_cmd)) {
+ 				pvmlogerror("hoster() bad message format\n");
+ 				pvmbailout(0);
+ 			}
+ 			if (debugmask & PDMSTARTUP) {
+ 				sprintf(pvmtxt, "%d. t%x %s so=\"%s\"\n", i,
+ 						hp->h_tid,
+ 						hp->h_login,
+ 						hp->h_sopts);
+ 				pvmlogerror(pvmtxt);
+ 			}
+ 			if (p = CINDEX(hp->h_login, '@')) {
+ 				hp->h_name = STRALLOC(p + 1);
+ 				*p = 0;
+ 				p = STRALLOC(hp->h_login);
+ 				PVM_FREE(hp->h_login);
+ 				hp->h_login = p;
+ 
+ 			} else {
+ 				hp->h_name = hp->h_login;
+ 				hp->h_login = 0;
+ 			}
+ 			if (!strcmp(hp->h_sopts, "pw"))
+ 				hp->h_flag |= HST_PASSWORD;
+ 			if (!strcmp(hp->h_sopts, "ms"))
+ 				hp->h_flag |= HST_MANUAL;
+ 		}
+ 	}
+ 
+ 	/*
+ 	* do it
+ 	*/
+ 
+ 	pl_startup(num, hostlist);
+ 
+ 	/*
+ 	* send results back to pvmd
+ 	*/
+ 
+ 	mp2 = mesg_new(0);
+ 	mp2->m_dst = mp->m_src;
+ 	mp2->m_cod = DM_STARTACK;
+ 	mp2->m_wid = mp->m_wid;
+ 	pkint(mp2, num);
+ 	for (i = 0; i < num; i++) {
+ 		pkint(mp2, hostlist[i]->h_tid);
+ 		pkstr(mp2, hostlist[i]->h_result
+ 				? hostlist[i]->h_result : "PvmDSysErr");
+ 	}
+ 	if (debugmask & PDMSTARTUP)
+ 		pvmlogerror("hoster() pvmd' sending back host table\n");
+ 	sendmessage(mp2);
+ 	work();		/* no return */
+ 	return 0;	/* not reached */
+ }
+ 
+ 
+ char *
+ makevis(dst, src)
+ 	char *dst;
+ 	char *src;
+ {
+ 	char c;
+ 
+ 	while (c = *src++ & 0x7f) {
+ 		if (isprint(c))
+ 			*dst++ = c;
+ 
+ 		else {
+ 			*dst++ = '^';
+ 			*dst++ = (c + '@') & 0x7f;
+ 		}
+ 	}
+ 	*dst = 0;
+ 	return dst;
+ }
+ 
+ 
+ close_slot(sp)
+ 	struct slot *sp;
+ {
+ 	if (sp->s_wfd != -1)
+ 		(void)close(sp->s_wfd);
+ 	if (sp->s_rfd != -1)
+ 		(void)close(sp->s_rfd);
+ 	if (sp->s_efd != -1)
+ 		(void)close(sp->s_efd);
+ 	LISTDELETE(sp, s_link, s_rlink);
+ 	LISTPUTBEFORE(slfree, sp, s_link, s_rlink);
+ 	return 0;
+ }
+ 
+ 
+ pl_startup(num, hostlist)
+ 	int num;
+ 	struct hst **hostlist;
+ {
+ 	int nxth = 0;						/* next host in list to start */
+ 	struct slot *slact = 0;				/* active list of slots */
+ 	struct hst *hp;
+ 	struct slot *sp, *sp2;
+ 	struct timeval tnow;
+ 	struct timeval tout;
+ 	struct fd_set rfds;
+ 	int nfds;
+ 	int i;
+ 	int n;
+ 	char *p;
+ 
+ 	/* init slot free list */
+ 
+ 	slfree = &slots[RSHNPLL+1];
+ 	slfree->s_link = slfree->s_rlink = slfree;
+ 	slact = &slots[RSHNPLL];
+ 	slact->s_link = slact->s_rlink = slact;
+ 	for (i = RSHNPLL; i-- > 0; ) {
+ 		LISTPUTAFTER(slfree, &slots[i], s_link, s_rlink);
+ 	}
+ 
+ 	/*
+ 	* keep at this until all hosts in table are completed
+ 	*/
+ 
+ 	for (; ; ) {
+ 
+ 		/*
+ 		* if empty slots, start on new hosts
+ 		*/
+ 
+ 		for (; ; ) {
+ 
+ 			/* find a host for slot */
+ 
+ 			if (slfree->s_link != slfree && nxth < num)
+ 				hp = hostlist[nxth++];
+ 			else
+ 				break;
+ 
+ 			sp = slfree->s_link;
+ 			LISTDELETE(sp, s_link, s_rlink);
+ 			sp->s_hst = hp;
+ 			sp->s_len = 0;
+ 			sp->s_elen = 0;
+ 			if (debugmask & PDMSTARTUP) {
+ 				sprintf(pvmtxt, "pl_startup() trying %s\n", hp->h_name);
+ 				pvmlogerror(pvmtxt);
+ 			}
+ 			phase1(sp);
+ 			if (hp->h_result) {
+ 				/* error or fully started (manual startup) */
+ 
+ 				LISTPUTBEFORE(slfree, sp, s_link, s_rlink);
+ 
+ 			} else {
+ 				/* partially started */
+ 
+ 				LISTPUTBEFORE(slact, sp, s_link, s_rlink);
+ 				gettimeofday(&sp->s_bail, (struct timezone*)0);
+ 				tout.tv_sec = RSHTIMEOUT;
+ 				tout.tv_usec = 0;
+ 				TVXADDY(&sp->s_bail, &sp->s_bail, &tout);
+ 			}
+ 		}
+ 
+ 		/* if no hosts in progress, we are finished */
+ 
+ 		if (slact->s_link == slact)
+ 			break;
+ 
+ 		/*
+ 		* until next timeout, get output from any slot
+ 		*/
+ 
+ 		FD_ZERO(&rfds);
+ 		nfds = 0;
+ 		TVCLEAR(&tout);
+ 		gettimeofday(&tnow, (struct timezone*)0);
+ 		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
+ 			if (TVXLTY(&sp->s_bail, &tnow)) {
+ 				sprintf(pvmtxt, "pl_startup() giving up on host %s after %d secs\n",
+ 						sp->s_hst->h_name, RSHTIMEOUT);
+ 				pvmlogerror(pvmtxt);
+ 				sp->s_hst->h_result = STRALLOC("PvmCantStart");
+ 				sp2 = sp->s_rlink;
+ 				close_slot(sp);
+ 				sp = sp2;
+ 				continue;
+ 			}
+ 
+ 			if (!TVISSET(&tout) || TVXLTY(&sp->s_bail, &tout))
+ 				tout = sp->s_bail;
+ 			if (sp->s_rfd >= 0)
+ 				FD_SET(sp->s_rfd, &rfds);
+ 			if (sp->s_rfd > nfds)
+ 				nfds = sp->s_rfd;
+ 			if (sp->s_efd >= 0)
+ 				FD_SET(sp->s_efd, &rfds);
+ 			if (sp->s_efd > nfds)
+ 				nfds = sp->s_efd;
+ 		}
+ 
+ 		if (slact->s_link == slact)
+ 			break;
+ 
+ 		nfds++;
+ 
+ 		if (TVXLTY(&tnow, &tout)) {
+ 			TVXSUBY(&tout, &tout, &tnow);
+ 		} else {
+ 			TVCLEAR(&tout);
+ 		}
+ 		if (debugmask & PDMSTARTUP) {
+ 			sprintf(pvmtxt, "pl_startup() select timeout is %d.%06d\n",
+ 					tout.tv_sec, tout.tv_usec);
+ 			pvmlogerror(pvmtxt);
+ 		}
+ 		if ((n = select(nfds,
+ #ifdef	FDSETISINT
+ 				(int *)&rfds, (int *)0, (int *)0,
+ #else
+ 				&rfds, (fd_set *)0, (fd_set *)0,
+ #endif
+ 				&tout)) == -1) {
+ 			if (errno != EINTR) {
+ 				pvmlogperror("pl_startup() select");
+ 				pvmbailout(0);
+ 			}
+ 		}
+ 		if (debugmask & PDMSTARTUP) {
+ 			(void)sprintf(pvmtxt, "pl_startup() select returns %d\n", n);
+ 			pvmlogerror(pvmtxt);
+ 		}
+ 		if (n < 1) {
+ 			if (n == -1 && errno != EINTR) {
+ 				pvmlogperror("pl_startup() select");
+ 				pvmbailout(0);	/* XXX this is too harsh */
+ 			}
+ 			continue;
+ 		}
+ 
+ 		/*
+ 		* check for response on stdout or stderr of any slave.
+ 		*/
+ 
+ 		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
+ 
+ 			/*
+ 			* stderr ready.  log output with remote's host name.
+ 			*/
+ 			if (sp->s_efd >= 0 && FD_ISSET(sp->s_efd, &rfds)) {
+ 				n = read(sp->s_efd, sp->s_ebuf + sp->s_elen,
+ 						sizeof(sp->s_ebuf) - sp->s_elen - 1);
+ 				if (n > 0) {
+ 					sp->s_elen += n;
+ 					sp->s_ebuf[sp->s_elen] = 0;
+ 					while (p = CINDEX(sp->s_ebuf, '\n')) {
+ 						*p = 0;
+ 						sprintf(pvmtxt, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						pvmlogerror(pvmtxt);
+ 						p++;
+ 						sp->s_elen -= p - sp->s_ebuf;
+ 						if (sp->s_elen > 0) {
+ 							BCOPY(p, sp->s_ebuf, sp->s_elen);
+ 							sp->s_ebuf[sp->s_elen] = 0;
+ 						}
+ 					}
+ 					if (sp->s_elen == sizeof(sp->s_ebuf) - 1) {
+ 						sprintf(pvmtxt, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						pvmlogerror(pvmtxt);
+ 						sp->s_elen = 0;
+ 					}
+ 
+ 				} else {
+ 					if (sp->s_elen > 0) {
+ 						sprintf(pvmtxt, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						pvmlogerror(pvmtxt);
+ 						sp->s_elen = 0;
+ 					}
+ 					(void)close(sp->s_efd);
+ 					sp->s_efd = -1;
+ 				}
+ 			}
+ 
+ 			/*
+ 			* stdout ready.
+ 			* look for a complete line starting with "ddpro".
+ 			*/
+ 			if (sp->s_rfd >= 0 && FD_ISSET(sp->s_rfd, &rfds)) {
+ 				n = read(sp->s_rfd, sp->s_buf + sp->s_len,
+ 						sizeof(sp->s_buf) - sp->s_len - 1);
+ 				if (n > 0) {
+ 					sp->s_len += n;
+ 					sp->s_buf[sp->s_len] = 0;
+ 					while (p = CINDEX(sp->s_buf, '\n')) {
+ 						*p = 0;
+ 						if (!strncmp(sp->s_buf, "ddpro", 5)) {
+ 							if (debugmask & PDMSTARTUP) {
+ 								sprintf(pvmtxt, "stdout@%s: %s\n",
+ 										sp->s_hst->h_name, sp->s_buf);
+ 								pvmlogerror(pvmtxt);
+ 							}
+ 							sp->s_hst->h_result = STRALLOC(sp->s_buf);
+ 							break;
+ 
+ 						} else {
+ 							sprintf(pvmtxt, "stdout@%s: %s\n",
+ 									sp->s_hst->h_name, sp->s_buf);
+ 							pvmlogerror(pvmtxt);
+ 							p++;
+ 							sp->s_len -= p - sp->s_buf;
+ 							if (sp->s_len > 0) {
+ 								BCOPY(p, sp->s_buf, sp->s_len);
+ 								sp->s_buf[sp->s_len] = 0;
+ 							}
+ 						}
+ 					}
+ 					if (sp->s_len == sizeof(sp->s_buf) - 1) {
+ 						sprintf(pvmtxt, "stdout@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_buf);
+ 						pvmlogerror(pvmtxt);
+ 						sp->s_len = 0;
+ 					}
+ 
+ 				} else {
+ 					if (sp->s_len > 0) {
+ 						sprintf(pvmtxt, "stdout@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_buf);
+ 						pvmlogerror(pvmtxt);
+ 						sp->s_len = 0;
+ 					}
+ 					if (n) {
+ 						sprintf(pvmtxt, "stdout@%s",
+ 								sp->s_hst->h_name);
+ 						pvmlogperror(pvmtxt);
+ 					} else {
+ 						sprintf(pvmtxt, "stdout@%s: EOF\n",
+ 								sp->s_hst->h_name);
+ 						pvmlogerror(pvmtxt);
+ 					}
+ 					sp->s_hst->h_result = STRALLOC("PvmCantStart");
+ 					if (sp->s_elen > 0) {
+ 						sprintf(pvmtxt, "stderr@%s: %s\n",
+ 								sp->s_hst->h_name, sp->s_ebuf);
+ 						pvmlogerror(pvmtxt);
+ 						sp->s_elen = 0;
+ 					}
+ 				}
+ 				if (sp->s_hst->h_result) {
+ 					sp2 = sp->s_rlink;
+ 					close_slot(sp);
+ 					sp = sp2;
+ 					continue;
+ 				}
+ 			}
+ 		}
+ 	}
+ 	return 0;
+ }
+ 
+ 
+ phase1(sp)
+ 	struct slot *sp;
+ {
+ 	struct hst *hp;
+ 	char *hn;
+ 	char *av[16];			/* for rsh args */
+ 	int ac;
+ 	char buf[512];
+ 	int pid = -1;			/* pid of rsh */
+ 	char *p;
+ 
+ #ifndef NOREXEC
+ 	struct servent *se;
+ 	static u_short execport = 0;
+ 
+ 	if (!execport) {
+ 		if (!(se = getservbyname("exec", "tcp"))) {
+ 			sprintf(pvmtxt, "phase1() can't getservbyname(): %s\n", "exec");
+ 			pvmbailout(0);
+ 		}
+ 		execport = se->s_port;
+ 		endservent();
+ 	}
+ #endif
+ 
+ 	hp = sp->s_hst;
+ 	hn = hp->h_name;
+ 	sp->s_rfd = sp->s_wfd = sp->s_efd = -1;
+ 
+ 	/*
+ 	* XXX manual startup hack... this is if we can't use rexec or rsh
+ 	*/
+ 
+ 	if (hp->h_flag & HST_MANUAL) {
+ 		fprintf(stderr, "*** Manual startup ***\n");
+ 		fprintf(stderr, "Login to \"%s\" and type:\n", hn);
+ 		fprintf(stderr, "%s\n", hp->h_cmd);
+ 
+ 	/* get version */
+ 
+ 		fprintf(stderr, "Type response: ");
+ 		fflush(stderr);
+ 		if (!(fgets(buf, sizeof(buf), stdin))) {
+ 			sprintf(pvmtxt, "host %s read error\n", hn);
+ 			pvmlogerror(pvmtxt);
+ 			goto oops;
+ 		}
+ 		p = buf + strlen(buf) - 1;
+ 		if (*p == '\n')
+ 			*p = 0;
+ 		hp->h_result = STRALLOC(buf);
+ 		fprintf(stderr, "Thanks\n");
+ 		fflush(stderr);
+ 		return 0;
+ 	}
+ 
+ 	/*
+ 	* XXX end manual startup hack
+ 	*/
+ 
+ 	if (!(hp->h_flag & HST_PASSWORD)) {		/* use rsh to start */
+ 		int wpfd[2], rpfd[2], epfd[2];
+ 		int i;
+ 
+ 		if (debugmask & PDMSTARTUP) {
+ 			sprintf(pvmtxt, "phase1() trying rsh to %s\n", hn);
+ 			pvmlogerror(pvmtxt);
+ 		}
+ 
+ 	/* fork an rsh to startup the slave pvmd */
+ 
+ #ifdef	IMA_TITN
+ 		if (socketpair(AF_UNIX, SOCK_STREAM, 0, wpfd) == -1
+ 		|| socketpair(AF_UNIX, SOCK_STREAM, 0, rpfd) == -1
+ 		|| socketpair(AF_UNIX, SOCK_STREAM, 0, epfd) == -1) {
+ 			pvmlogperror("phase1() socketpair");
+ 			goto oops;
+ 		}
+ #else
+ 		if (pipe(wpfd) == -1 || pipe(rpfd) == -1 || pipe(epfd) == -1) {
+ 			pvmlogperror("phase1() pipe");
+ 			goto oops;
+ 		}
+ #endif
+ 
+ 		if (debugmask & PDMSTARTUP) {
+ 			sprintf(pvmtxt, "phase1() pipes: %d %d %d %d %d %d\n",
+ 					wpfd[0], wpfd[1], rpfd[0], rpfd[1], epfd[0], epfd[1]);
+ 			pvmlogerror(pvmtxt);
+ 		}
+ 
+ 		if ((pid = fork()) == -1) {
+ 			pvmlogperror("phase1() fork");
+ 			pvmbailout(0);
+ 		}
+ 		if (!pid) {
+ 			(void)dup2(wpfd[0], 0);
+ 			(void)dup2(rpfd[1], 1);
+ 			(void)dup2(epfd[1], 2);
+ 			for (i = getdtablesize(); --i > 2; )
+ 				(void)close(i);
+ 			ac = 0;
+ 			av[ac++] = RSHCOMMAND;
+ 			av[ac++] = hn;
+ 			if (hp->h_login) {
+ 				av[ac++] = "-l";
+ 				av[ac++] = hp->h_login;
+ 			}
+ 			av[ac++] = hp->h_cmd;
+ 			av[ac++] = 0;
+ 			if (debugmask & PDMSTARTUP) {
+ 				for (ac = 0; av[ac]; ac++)
+ 					fprintf(stderr, "av[%d]=\"%s\" ", ac, av[ac]);
+ 				fputc('\n', stderr);
+ 			}
+ 			execvp(av[0], av);
+ 			fputs("phase1() execvp failed\n", stderr);
+ 			fflush(stderr);
+ 			_exit(1);
+ 		}
+ 		(void)close(wpfd[0]);
+ 		(void)close(rpfd[1]);
+ 		(void)close(epfd[1]);
+ 		sp->s_wfd = wpfd[1];
+ 		sp->s_rfd = rpfd[0];
+ 		sp->s_efd = epfd[0];
+ 
+ 	} else {		/* use rexec to start */
+ 
+ #ifdef NOREXEC
+ 		sprintf(pvmtxt, "slconfg() PVM was built without rexec support, can't take passwords\n");
+ 		pvmlogerror(pvmtxt);
+ 		goto oops;
+ #else
+ 		if (debugmask & PDMSTARTUP) {
+ 			sprintf(pvmtxt, "phase1() rexec \"%s\"\n", hp->h_cmd);
+ 			pvmlogerror(pvmtxt);
+ 		}
+ 		if ((sp->s_wfd = sp->s_rfd = rexec(&hn, execport,
+ 				(hp->h_login ? hp->h_login : username),
+ 				(char*)0, hp->h_cmd, &sp->s_efd))
+ 		== -1) {
+ 			sprintf(pvmtxt, "phase1() rexec failed for host %s\n", hn);
+ 			pvmlogerror(pvmtxt);
+ 			goto oops;
+ 		}
+ #endif
+ 	}
+ 	return 0;
+ 
+ oops:
+ 	hp->h_result = STRALLOC("PvmCantStart");
+ 	if (sp->s_wfd != -1)
+ 		close(sp->s_wfd);
+ 	if (sp->s_rfd != -1)
+ 		close(sp->s_rfd);
+ 	if (sp->s_efd != -1)
+ 		close(sp->s_efd);
+ 	sp->s_wfd = sp->s_rfd = sp->s_efd = -1;
+ 	return 1;
+ }
+ 
+ 
*** ../netlib/pvm3.3.10/src/listmac.h	Fri Jun  3 16:38:15 1994
--- src/listmac.h	Mon May 13 16:28:09 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Dll macros.
   *
  $Log: listmac.h,v $
+  * Revision 1.3  1996/05/13  20:27:36  manchek
+  * added a few parens in LISTPUTAFTER, LISTPUTBEFORE for picky (old) compilers
+  *
   * Revision 1.2  1994/06/03  20:38:15  manchek
   * version 3.3.0
   *
***************
*** 40,46 ****
   *
   */
  
! #define	LISTPUTAFTER(o,n,f,r)	{ (n)->f=(o)->f; (n)->r=o; (o)->f->r=n; (o)->f=n; }
! #define	LISTPUTBEFORE(o,n,f,r)	{ (n)->r=(o)->r; (n)->f=o; (o)->r->f=n; (o)->r=n; }
  #define	LISTDELETE(e,f,r)	{ (e)->f->r=(e)->r; (e)->r->f=(e)->f; (e)->r=(e)->f=0; }
  
--- 43,49 ----
   *
   */
  
! #define	LISTPUTAFTER(o,n,f,r)	{ (n)->f=(o)->f; (n)->r=(o); (o)->f->r=(n); (o)->f=(n); }
! #define	LISTPUTBEFORE(o,n,f,r)	{ (n)->r=(o)->r; (n)->f=(o); (o)->r->f=(n); (o)->r=(n); }
  #define	LISTDELETE(e,f,r)	{ (e)->f->r=(e)->r; (e)->r->f=(e)->f; (e)->r=(e)->f=0; }
  
*** ../netlib/pvm3.3.10/src/lpvm.c	Fri Nov 10 16:58:41 1995
--- src/lpvm.c	Tue May 14 12:27:39 1996
***************
*** 32,37 ****
--- 32,44 ----
   *	Libpvm core for unix environment.
   *
  $Log: lpvm.c,v $
+  * Revision 1.34  1996/05/14  16:26:52  manchek
+  * fixed direct routing / simultaneous connect with unix sockets must
+  * be handled by calling listen on one end and connect on the other.
+  *
+  * Revision 1.33  1996/05/13  20:29:35  manchek
+  * accept control messages coming through direct routes, too
+  *
   * Revision 1.32  1995/11/02  16:07:10  manchek
   * added NEEDSENDIAN switch.
   * must declare ptr to sys_errlist const in pvmlogperror for FREEBSD.
***************
*** 347,353 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvm.c,v 1.32 1995/11/02 16:07:10 manchek Exp $";
  static int debugmask = 0;				/* which debugging info */
  static int mxfersingle = 1;				/* mxfer returns after single frag */
  static char pvmtxt[512];				/* scratch for error log */
--- 354,360 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvm.c,v 1.34 1996/05/14 16:26:52 manchek Exp $";
  static int debugmask = 0;				/* which debugging info */
  static int mxfersingle = 1;				/* mxfer returns after single frag */
  static char pvmtxt[512];				/* scratch for error log */
***************
*** 703,708 ****
--- 710,717 ----
  	char spath[LEN_OF_TMP_NAM];
  #endif
  
+ 	/* if sending a message, decide whether we need to route it. */
+ 
  	if (up = midtobuf(mid)) {
  		up->ub_dst = dtid;
  		up->ub_cod = code;
***************
*** 782,787 ****
--- 791,798 ----
  			}
  #endif
  
+ 	/* send a connection request message to the destination task */
+ 
  			if (s >= 0) {
  				sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
  				l = TDPROTOCOL;
***************
*** 792,797 ****
--- 803,810 ----
  				up->ub_dst = dtid;
  				up->ub_cod = TC_CONREQ;
  
+ 	/* now send a task exit notify to my pvmd */
+ 
  				sbf2 = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
  				l = PvmTaskExit;
  				pvm_pkint(&l, 1, 1);
***************
*** 809,815 ****
  					sprintf(pvmtxt, "mroute() CONREQ to t%x\n", dtid);
  					pvmlogerror(pvmtxt);
  				}
! /* XXX it would be better if mxfer() took a list of send messages */
  				do {
  					if ((cc = mxfer(sbf,
  							(sbf2 ? &ztv : (struct timeval *)0))) < 0)
--- 822,830 ----
  					sprintf(pvmtxt, "mroute() CONREQ to t%x\n", dtid);
  					pvmlogerror(pvmtxt);
  				}
! 
! 	/* wait until the route pcb changes state */
! 
  				do {
  					if ((cc = mxfer(sbf,
  							(sbf2 ? &ztv : (struct timeval *)0))) < 0)
***************
*** 823,833 ****
  						} else
  							sbf = 0;
  					}
! 				} while (pcbp->tt_state == TTCONWAIT);
  			}
  		}
  	}
  
  	cc = mxfer(mid, tmout);
  	pcbp = ttlist->tt_link;
  	while (pcbp != ttlist)
--- 838,851 ----
  						} else
  							sbf = 0;
  					}
! 				} while (pcbp->tt_state == TTCONWAIT
! 						|| pcbp->tt_state == TTGRNWAIT);
  			}
  		}
  	}
  
+ 	/* now send the original message with whatever route we have */
+ 
  	cc = mxfer(mid, tmout);
  	pcbp = ttlist->tt_link;
  	while (pcbp != ttlist)
***************
*** 891,898 ****
--- 909,925 ----
  				"pvmmctl() CONREQ from t%x, Unix domain socket unsupported\n",
  						up->ub_src);
  				pvmlogerror(pvmtxt);
+ 	/* XXX should send nack here so we can keep going */
  
  #else /*NOUNIXDOM*/
+ 
+ 	/* must handle simultaneous connect from both ends with Unix sockets:
+ 	 *  lower tid of the two just ignores the CONREQ.
+ 	 *  higher tid pretends it didn't send a CONREQ, sends a CONACK back.
+ 	 * this makes the connection single-sided.
+ 	 */
+ 
+ #if 0
  				BZERO((char*)&uns, sizeof(uns));
  				uns.sun_family = AF_UNIX;
  				strcpy(uns.sun_path, buf);
***************
*** 904,909 ****
--- 931,960 ----
  					pvmlogperror("pvmmctl() connect");
  				else
  					pcbp->tt_state = TTOPEN;
+ #endif
+ 
+ 				if (debugmask & TDMROUTE) {
+ 					pvmlogerror("pvmmctl() handling crossed CONREQ with unix sockets\n");
+ 				}
+ 				if (pvmmytid > up->ub_src) {
+ 					if (listen(pcbp->tt_fd, 1) == -1)
+ 						pvmlogperror("pvmmctl() listen");
+ 
+ 					else {
+ 						pcbp->tt_state = TTGRNWAIT;
+ 						pvm_fd_add(pcbp->tt_fd, 1);
+ 						ackd = 0;
+ 						sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
+ 						ttpro = TDPROTOCOL;
+ 						pvm_pkint(&ttpro, 1, 1);
+ 						pvm_pkint(&ackd, 1, 1);
+ 						pvm_pkstr(pcbp->tt_spath);
+ 						sbf = pvm_setsbuf(sbf);
+ 						up2 = midtobuf(sbf);
+ 						up2->ub_dst = up->ub_src;
+ 						up2->ub_cod = TC_CONACK;
+ 					}
+ 				}
  #endif /*NOUNIXDOM*/
  
  			} else {
***************
*** 1644,1649 ****
--- 1695,1701 ----
  
  		for (pcbp = ttlist->tt_link; pcbp != ttlist; pcbp = pcbp->tt_link) {
  			if (pcbp->tt_state == TTOPEN && FD_ISSET(pcbp->tt_fd, &rfds)) {
+ 				up = pvmrxlist->ub_rlink;
  				if ((n = mxinput(pcbp)) < 0)
  					ttpcb_dead(pcbp);
  
***************
*** 1650,1655 ****
--- 1702,1728 ----
  				else {
  					if (gotem += n)
  						wantmore = 0;
+ 
+ 	/* pass any control messages to pvmmctl() */
+ 
+ 						while ((up = up->ub_link) != pvmrxlist) {
+ 							if (up->ub_cod >= (int)TC_FIRST && up->ub_cod <= (int)TC_LAST) {
+ 								up = up->ub_rlink;
+ 								if ((sbf = pvmmctl(up->ub_link)) > 0) {
+ 									if (txfp)
+ 										tstk[tstkp++] = sbf;
+ 									else {
+ 										txup = midtobuf(sbf);
+ 										txfp = txup->ub_frag->fr_link;
+ 										txfp = txfp->fr_buf ? txfp : 0;
+ 										if (!(txpcbp = ttpcb_find(txup->ub_dst))
+ 										|| txpcbp->tt_state != TTOPEN)
+ 											txpcbp = topvmd;
+ 										freethis = 1;
+ 									}
+ 								}
+ 							}
+ 						}
  				}
  
  			} else
*** ../netlib/pvm3.3.10/src/lpvmgen.c	Fri Nov 10 16:58:41 1995
--- src/lpvmgen.c	Tue May 14 12:26:45 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Libpvm generic functions.
   *
  $Log: lpvmgen.c,v $
+  * Revision 1.11  1996/05/14  16:26:38  manchek
+  * added pvm_export and pvm_unexport functions
+  *
   * Revision 1.10  1995/11/02  16:09:32  manchek
   * added NEEDSENDIAN switch.
   * pass environment through spawn on PGON
***************
*** 134,140 ****
  
  static int def_match();
  
! static char rcsid[] = "$Id: lpvmgen.c,v 1.10 1995/11/02 16:09:32 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static int (*recv_match)() = def_match;
  
--- 137,143 ----
  
  static int def_match();
  
! static char rcsid[] = "$Id: lpvmgen.c,v 1.11 1996/05/14 16:26:38 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static int (*recv_match)() = def_match;
  
***************
*** 2113,2115 ****
--- 2116,2214 ----
  }
  
  
+ int
+ pvm_export(name)
+ 	char *name;
+ {
+ 	char *vn = "PVM_EXPORT";
+ 	char *e;
+ 	char *p, *q;
+ 	int l;
+ 
+ 	if (!name[0])
+ 		goto done;
+ 
+ 	if (e = getenv(vn)) {
+ 		p = e;
+ 		while (*p) {
+ 			while (*p == ':')
+ 				p++;
+ 			q = p;
+ 			while (*q && *q != ':')
+ 				q++;
+ 			l = q - p;
+ 			if (strlen(name) == l && !strncmp(name, p, l))
+ 				goto done;
+ 			p = q;
+ 		}
+ 		p = TALLOC(strlen(vn) + strlen(e) + strlen(name) + 3, char, "str");
+ 		strcpy(p, vn);
+ 		strcat(p, "=");
+ 		strcat(p, e);
+ 		if (e[0])
+ 			strcat(p, ":");
+ 		strcat(p, name);
+ 		pvmputenv(p);
+ 
+ 	} else {
+ 		e = TALLOC(strlen(vn) + strlen(name) + 2, char, "str");
+ 		strcpy(e, vn);
+ 		strcat(e, "=");
+ 		strcat(e, name);
+ 		pvmputenv(e);
+ 	}
+ 
+ done:
+ /*
+ 	e = getenv(vn);
+ 	pvmlogprintf("pvm_export() %s=%s\n", vn, e);
+ */
+ 	return 0;
+ }
+ 
+ 
+ int
+ pvm_unexport(name)
+ 	char *name;
+ {
+ 	char *vn = "PVM_EXPORT";
+ 	char *e, *enew;
+ 	char *p, *q;
+ 	int l;
+ 
+ 	if (!name[0])
+ 		goto done;
+ 
+ 	if (e = getenv(vn)) {
+ 		p = e;
+ 		while (*p) {
+ 			while (*p == ':')
+ 				p++;
+ 			q = p;
+ 			while (*q && *q != ':')
+ 				q++;
+ 			l = q - p;
+ 			if (strlen(name) == l && !strncmp(name, p, l)) {
+ 				if (*q == ':')
+ 					q++;
+ 				else if (p > e && *(p - 1) == ':')
+ 					p--;
+ 				enew = TALLOC(strlen(vn) + (p - e) + strlen(q) + 2, char, "str");
+ 				strcpy(enew, vn);
+ 				strcat(enew, "=");
+ 				strncat(enew, e, p - e);
+ 				strcat(enew, q);
+ 				pvmputenv(enew);
+ 				goto done;
+ 			}
+ 			p = q;
+ 		}
+ 	}
+ 
+ done:
+ /*
+ 	e = getenv(vn);
+ 	pvmlogprintf("pvm_export() %s=%s\n", vn, e);
+ */
+ 	return 0;
+ }
*** ../netlib/pvm3.3.10/src/lpvmpack.c	Fri Nov 10 16:58:41 1995
--- src/lpvmpack.c	Mon May 13 16:50:11 1996
***************
*** 32,37 ****
--- 32,41 ----
   *	Typed packing/unpacking, message buffer manip.
   *
  $Log: lpvmpack.c,v $
+  * Revision 1.13  1996/05/13  20:49:48  manchek
+  * bogus enc_xdr_short and dec_xdr_short needed to pack/unpack 4 bytes
+  * instead of 2
+  *
   * Revision 1.12  1995/11/02  16:13:16  manchek
   * added NEEDSENDIAN switch
   *
***************
*** 127,133 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmpack.c,v 1.12 1995/11/02 16:13:16 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  
  
--- 131,137 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmpack.c,v 1.13 1996/05/13 20:49:48 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  
  
***************
*** 398,411 ****
  {
      register short *np;
      register char *cp;
!     char     buf[2];
      int cc = 0;
  
      for (np = (short*)vp; cnt-- > 0; np += std) {
          cp = (char *)np;
!         buf[1] = *cp;
!         buf[0] = *(cp+1);
!         if (cc = bytepk(buf, 2, 1, 1))
              return cc;
      }
      return 0;
--- 402,415 ----
  {
      register short *np;
      register char *cp;
!     char     buf[4];
      int cc = 0;
  
      for (np = (short*)vp; cnt-- > 0; np += std) {
          cp = (char *)np;
!         buf[3] = *cp;
!         buf[2] = *(cp+1);
!         if (cc = bytepk(buf, 4, 1, 1))
              return cc;
      }
      return 0;
***************
*** 599,613 ****
  {
      register short *np;
      register char *cp;
!     char     buf[2];
      int cc = 0;
  
      for (np = (short*)vp; cnt-- > 0; np += std) {
!         if (cc = byteupk(buf, 2, 1, 1))
              return cc;
          cp = (char *)np;
!         *cp = buf[1];
!         *(cp+1) = buf[0];
      }
      return 0;
  }
--- 603,617 ----
  {
      register short *np;
      register char *cp;
!     char     buf[4];
      int cc = 0;
  
      for (np = (short*)vp; cnt-- > 0; np += std) {
!         if (cc = byteupk(buf, 4, 1, 1))
              return cc;
          cp = (char *)np;
!         *cp = buf[3];
!         *(cp+1) = buf[2];
      }
      return 0;
  }
*** ../netlib/pvm3.3.10/src/lpvmshmem.c	Fri Nov 10 16:58:41 1995
--- src/lpvmshmem.c	Mon May 13 17:35:11 1996
***************
*** 32,37 ****
--- 32,42 ----
   *	Libpvm core for MPP environment.
   *
  $Log: lpvmshmem.c,v $
+  * Revision 1.40  1996/05/13  21:34:28  manchek
+  * added flag so we only install SIGTERM handler once.
+  * cleaned up code in beatask so we don't segfault if we can't
+  * allocate resources
+  *
   * Revision 1.39  1995/11/10  21:37:46  manchek
   * check for EINTR from semop in peer_wait
   *
***************
*** 343,349 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmshmem.c,v 1.39 1995/11/10 21:37:46 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static struct umbuf *rxfrag = 0;		/* not-assembled incm msgs */
  static struct frag *rxbuf;				/* buffer for incoming packets */
--- 348,354 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmshmem.c,v 1.40 1996/05/13 21:34:28 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static struct umbuf *rxfrag = 0;		/* not-assembled incm msgs */
  static struct frag *rxbuf;				/* buffer for incoming packets */
***************
*** 373,378 ****
--- 378,384 ----
  
  static int pvmrouteopt = PvmDontRoute;	/* task-task routing style */
  static void (*pvmoldtermhdlr)() = 0;
+ static int pvmsettermhdlr = 1;			/* need to install TERM handler */
  static int outta_here = 0;
  
  
***************
*** 1230,1244 ****
  	char *p;
  	int cc = 0;
  	int sbf = 0, rbf = 0;			/* saved rx and tx message handles */
! 	union semun {
! 		int val;
! 		struct semid_ds *buf;
! 		ushort *array;
! 	} sunion;
  #ifdef LOG
  	char fname[32];
  #endif
  	int key, firstkeytried;
  
  	if (pvmmytid != -1)
  		return 0;
--- 1236,1247 ----
  	char *p;
  	int cc = 0;
  	int sbf = 0, rbf = 0;			/* saved rx and tx message handles */
! 
  #ifdef LOG
  	char fname[32];
  #endif
  	int key, firstkeytried;
+ 	int mytid;
  
  	if (pvmmytid != -1)
  		return 0;
***************
*** 1305,1311 ****
  	* SIGTERM handler to clean up our shared memory
  	*/
  
! 	pvmoldtermhdlr = signal(SIGTERM, catch_kill);
  
  	/*
  	* get pvmd's message buffer, check protocol revision
--- 1308,1317 ----
  	* SIGTERM handler to clean up our shared memory
  	*/
  
! 	if (pvmsettermhdlr) {
! 		pvmoldtermhdlr = signal(SIGTERM, catch_kill);
! 		pvmsettermhdlr = 0;
! 	}
  
  	/*
  	* get pvmd's message buffer, check protocol revision
***************
*** 1385,1391 ****
  	*/
  
  	pid = altpid ? altpid : pvmmyupid;
! 	while (pvmmytid == -1) {
  		int ntids;			/* number of entries in pid-tid table */
  
  		PAGELOCK(&((struct shmpghdr *)infopage)->pg_lock);
--- 1391,1398 ----
  	*/
  
  	pid = altpid ? altpid : pvmmyupid;
! 	mytid = -1;
! 	while (mytid == -1) {
  		int ntids;			/* number of entries in pid-tid table */
  
  		PAGELOCK(&((struct shmpghdr *)infopage)->pg_lock);
***************
*** 1392,1398 ****
  		ntids = min(maxpidtid, ((struct shmpghdr *)infopage)->pg_ref);
  		for (i = 0; i < ntids; i++)
  			if (pidtids[i].pt_pid == pid) {
! 				pvmmytid = pidtids[i].pt_tid;
  				pvmmyptid = pidtids[i].pt_ptid;
  				/* pidtids[i].pt_pid = pvmmyupid; */
  				mypidtid = i;
--- 1399,1405 ----
  		ntids = min(maxpidtid, ((struct shmpghdr *)infopage)->pg_ref);
  		for (i = 0; i < ntids; i++)
  			if (pidtids[i].pt_pid == pid) {
! 				mytid = pidtids[i].pt_tid;
  				pvmmyptid = pidtids[i].pt_ptid;
  				/* pidtids[i].pt_pid = pvmmyupid; */
  				mypidtid = i;
***************
*** 1430,1442 ****
  				}
  
  			} else {
- /*
- 				sunion.val = 0;
- 				if (semctl(mysemid, 0, SETVAL, sunion) == -1) {
- 					pvmlogperror("pvmbeatask() semctl SETVAL");
- 					return PvmSysErr;
- 				}
- */
  				break;
  			}
  #else
--- 1437,1442 ----
***************
*** 1471,1476 ****
--- 1471,1478 ----
  	pidtids[mypidtid].pt_node = current_node();
  #endif
  	/* XXX PAGEUNLOCK(pvminfo); */
+ 
+ 	pvmmytid = mytid;
  
  	/*
  	*	Request task trace/output paramters from daemon
*** ../netlib/pvm3.3.10/src/pvmarchc.c	Fri Nov 10 16:58:41 1995
--- src/pvmarchc.c	Mon May 13 16:32:26 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Architecture classification.  Used to be archcode.c
   *
  $Log: pvmarchc.c,v $
+  * Revision 1.10  1996/05/13  20:32:22  manchek
+  * added APOLLO, M88K
+  *
   * Revision 1.9  1995/11/02  16:18:12  manchek
   * added X86SOL2 and ATT to arch array
   *
***************
*** 87,93 ****
  	struct nl *nl_next;
  };
  
! static char rcsid[] = "$Id: pvmarchc.c,v 1.9 1995/11/02 16:18:12 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static struct nl *morearches = 0;
  static int lastarch = 0;
--- 90,96 ----
  	struct nl *nl_next;
  };
  
! static char rcsid[] = "$Id: pvmarchc.c,v 1.10 1996/05/13 20:32:22 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static struct nl *morearches = 0;
  static int lastarch = 0;
***************
*** 104,109 ****
--- 107,113 ----
  static struct archtypes arches[] = {
  	{"", 10},
  
+ 	{"APOLLO", 11},
  	{"AFX8", 11},
  	{"BFLY", 11},
  	{"CM2", 11},
***************
*** 116,121 ****
--- 120,126 ----
  	{"HP300", 11},
  	{"HPPA", 11},
  	{"HPPAMP", 11},
+ 	{"M88K", 11},
  	{"MIPS", 11},
  	{"NETBSDAMIGA", 11},
  	{"NETBSDHP300", 11},
*** ../netlib/pvm3.3.10/src/pvmd.c	Fri Nov 10 16:58:42 1995
--- src/pvmd.c	Mon May 13 17:40:10 1996
***************
*** 32,37 ****
--- 32,44 ----
   *	Mr. pvm daemon.
   *
  $Log: pvmd.c,v $
+  * Revision 1.41  1996/05/13  21:38:44  manchek
+  * added errno checks for ENETDOWN, etc. if sendto fails, so we can
+  * tolerate short network outages.
+  * change runstate to PVMDISTASK during fork in case we get signalled
+  * right then, exit instead of cleaning up in evilsig and catch.
+  * reset dead fifo in beprime so pvmd' doesn't try to clean up after SIGCHLDs
+  *
   * Revision 1.40  1995/11/02  16:29:24  manchek
   * added -t flag for test mode.
   * put back save under packet header in netoutput.
***************
*** 345,351 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmd.c,v 1.40 1995/11/02 16:29:24 manchek Exp $";
  static struct deaddata *deads = 0;	/* circ queue of dead task data */
  static char pvmtxt[512];		/* scratch for error log */
  static int ndead = 0;			/* len of deads */
--- 352,358 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmd.c,v 1.41 1996/05/13 21:38:44 manchek Exp $";
  static struct deaddata *deads = 0;	/* circ queue of dead task data */
  static char pvmtxt[512];		/* scratch for error log */
  static int ndead = 0;			/* len of deads */
***************
*** 650,655 ****
--- 657,664 ----
  evilsig(sig)
  	int sig;
  {
+ 	if (runstate == PVMDISTASK)
+ 		exit(sig);
  	(void)signal(SIGILL, SIG_DFL);
  	(void)signal(SIGFPE, SIG_DFL);
  #ifdef	SIGBUS
***************
*** 683,688 ****
--- 692,699 ----
  catch(sig)
  	int sig;
  {
+ 	if (runstate == PVMDISTASK)
+ 		exit(sig);
  	(void)signal(SIGINT, SIG_DFL);
  	(void)signal(SIGTERM, SIG_DFL);
  	sprintf(pvmtxt, "catch() caught signal %d\n", sig);
***************
*** 975,982 ****
  
  	gettimeofday(&tnow, (struct timezone*)0);
  	if (debugmask || myhostpart) {
! 		sprintf(pvmtxt, "ready  %s   %s", PVM_VER, ctime(&tnow.tv_sec));
  		pvmlogerror(pvmtxt);
  	}
  
  	/*
--- 986,999 ----
  
  	gettimeofday(&tnow, (struct timezone*)0);
  	if (debugmask || myhostpart) {
! 		sprintf(pvmtxt, "%s (%s) %s %s\n",
! 				hosts->ht_hosts[hosts->ht_local]->hd_name,
! 				inadport_decimal(&hosts->ht_hosts[hosts->ht_local]->hd_sad),
! 				myarchname,
! 				PVM_VER);
  		pvmlogerror(pvmtxt);
+ 		sprintf(pvmtxt, "ready %s", ctime(&tnow.tv_sec));
+ 		pvmlogerror(pvmtxt);
  	}
  
  	/*
***************
*** 1058,1064 ****
  					tp->t_status = deads[rdead].dd_es;
  					tp->t_utime = deads[rdead].dd_ut;
  					tp->t_stime = deads[rdead].dd_st;
! 					if (tp->t_out >= 0) {
  						fd_set rfds;
  
  						FD_ZERO(&rfds);
--- 1075,1081 ----
  					tp->t_status = deads[rdead].dd_es;
  					tp->t_utime = deads[rdead].dd_ut;
  					tp->t_stime = deads[rdead].dd_st;
! 					while (tp->t_out >= 0) {
  						fd_set rfds;
  
  						FD_ZERO(&rfds);
***************
*** 1072,1077 ****
--- 1089,1097 ----
  #endif
  								&tout) == 1)
  							loclstout(tp);
+ 
+ 						else
+ 							break;
  					}
  #if defined(IMA_PGON)
  					mpp_free(tp);
***************
*** 1436,1441 ****
--- 1456,1477 ----
  #endif
  			) {
  				pvmlogperror("netoutput() sendto");
+ #ifdef	ENETDOWN
+ 				if (errno == ENETDOWN) ;
+ 				else
+ #endif
+ #ifdef	ENETUNREACH
+ 				if (errno == ENETUNREACH) ;
+ 				else
+ #endif
+ #ifdef	EHOSTDOWN
+ 				if (errno == EHOSTDOWN) ;
+ 				else
+ #endif
+ #ifdef	EHOSTUNREACH
+ 				if (errno == EHOSTUNREACH) ;
+ 				else
+ #endif
  #if defined(IMA_SUN4SOL2) || defined(IMA_X86SOL2) || defined(IMA_SUNMP) || defined(IMA_UXPM)
  	/* life, don't talk to me about life... */
  				if (errno == ECHILD)
***************
*** 2220,2226 ****
  		tp->t_rxp = pk_new(TDFRAGHDR + 2);
  */
  		if (DDFRAGHDR > TDFRAGHDR)
! 			pp->pk_dat += DDFRAGHDR - TDFRAGHDR;
  	}
  	pp = tp->t_rxp;
  
--- 2256,2262 ----
  		tp->t_rxp = pk_new(TDFRAGHDR + 2);
  */
  		if (DDFRAGHDR > TDFRAGHDR)
! 			tp->t_rxp->pk_dat += DDFRAGHDR - TDFRAGHDR;
  	}
  	pp = tp->t_rxp;
  
***************
*** 2884,2889 ****
--- 2920,2926 ----
  	struct mesg *mp;		/* message to tasker */
  	struct waitc *wp;
  	int ac;
+ 	int realrunstate;
  	char buf[32];
  
  	static char *nullep[] = { "", 0 };
***************
*** 2961,2971 ****
--- 2998,3018 ----
  			}
  #endif
  
+ 	/*
+ 	* switch runstate to is-task before forking to avoid race.
+ 	* if we're killed as a task, we don't want to clean up pvmd stuff.
+ 	*/
+ 			realrunstate = runstate;
+ 			runstate = PVMDISTASK;
+ 
  #if defined(IMA_CSPP) && defined(BALANCED_SPAWN)
  			pid = cnx_sc_fork(CNX_INHERIT_SC, (int) __get_node_id());
  #else
  			pid = fork();
  #endif
+ 			if (pid)
+ 				runstate = realrunstate;
+ 
  			if (!pid) {
  
  	/* close any random fds */
***************
*** 3099,3104 ****
--- 3146,3154 ----
  
  	opq = pk_new(0);
  	opq->pk_tlink = opq->pk_trlink = opq;
+ 
+ 	wdead = 0;
+ 	rdead = 0;
  
  	return 0;
  }
*** ../netlib/pvm3.3.10/src/pvmdshmem.c	Fri Nov 10 16:58:42 1995
--- src/pvmdshmem.c	Mon May 13 16:33:40 1996
***************
*** 32,37 ****
--- 32,40 ----
   * Shared-memory MPP interface.
   *
  $Log: pvmdshmem.c,v $
+  * Revision 1.21  1996/05/13  20:33:25  manchek
+  * added a few checks in mpp_init so that if init fails pvmd doesn't segfault
+  *
   * Revision 1.20  1995/11/02  16:31:23  manchek
   * skip over stale packets from dead tasks in mpp_input
   *
***************
*** 180,186 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmdshmem.c,v 1.20 1995/11/02 16:31:23 manchek Exp $";
  static char pvmtxt[512];		/* scratch for error log */
  static int inboxsz = 0;			/* size of incoming message buffer */
  static struct pkt *ovfpkts = 0;	/* packets waiting to be delivered */
--- 183,189 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmdshmem.c,v 1.21 1996/05/13 20:33:25 manchek Exp $";
  static char pvmtxt[512];		/* scratch for error log */
  static int inboxsz = 0;			/* size of incoming message buffer */
  static struct pkt *ovfpkts = 0;	/* packets waiting to be delivered */
***************
*** 266,271 ****
--- 269,275 ----
  	key = pvmshmkey(0);
  	if ((myshmbufid = shmget((key_t)key, shmbufsiz, IPC_CREAT|PERMS)) == -1) {
  		pvmlogperror("mpp_init() can't create msg buffer");
+ 		pvmbailout(0);
  		return;
  	}
  #ifdef IMA_CSPP
***************
*** 284,289 ****
--- 288,295 ----
  	if (!(outbufsz = (shmbufsiz - INBOXPAGE*pgsz - pgsz)/pvmpgsz)) {
  		pvmlogerror("mpp_init() SHMBUFSIZE too small!");
  		shmctl(myshmbufid, IPC_RMID, (struct shmid_ds *)0);
+ 		myshmbufid = -1;
+ 		pvmbailout(0);
  		return;
  	}
  	nbufsowned = 0;
*** ../netlib/pvm3.3.10/src/pvmmimd.h	Fri Jun 16 12:09:40 1995
--- src/pvmmimd.h	Tue May 14 10:38:35 1996
***************
*** 30,35 ****
--- 30,38 ----
   *  pvmmimd.h
   *
  $Log: pvmmimd.h,v $
+  * Revision 1.9  1996/05/14  14:38:24  manchek
+  * tweak mpi ifdefs
+  *
   * Revision 1.8  1995/06/16  16:09:30  manchek
   * changed size of PGON host info array to 10
   *
***************
*** 133,139 ****
  
  #endif /*IMA_PGON/IMA_I860*/
  
! #if defined(IMA_SP2MPI) && defined(MPI_H)
  
  #define ASYNCDONE(req)	(!MPI_Test(&req,&mpiflag,&mpista) && mpiflag)
  #define ASYNCWAIT(req)	MPI_Wait(&req,&mpista)
--- 136,142 ----
  
  #endif /*IMA_PGON/IMA_I860*/
  
! #if defined(IMA_SP2MPI) && (defined(MPI_H) || defined(_H_MPI))
  
  #define ASYNCDONE(req)	(!MPI_Test(&req,&mpiflag,&mpista) && mpiflag)
  #define ASYNCWAIT(req)	MPI_Wait(&req,&mpista)
*** ../netlib/pvm3.3.10/src/startup.c	Fri Nov 10 16:58:42 1995
--- src/startup.c	Mon May 13 16:35:51 1996
***************
*** 32,37 ****
--- 32,40 ----
   *	Exec more pvmds.  It's good for you.
   *
  $Log: startup.c,v $
+  * Revision 1.18  1996/05/13  20:35:44  manchek
+  * moved hoster functions to hoster.c
+  *
   * Revision 1.17  1995/11/02  16:36:14  manchek
   * added NEEDSENDIAN switch
   *
***************
*** 103,111 ****
  #include <sys/types.h>
  #endif
  #include <sys/time.h>
- #if defined(IMA_RS6K) || defined(IMA_SP2MPI)
- #include <sys/select.h>
- #endif
  #include <sys/socket.h>
  #ifndef NOUNIXDOM
  #include <sys/un.h>
--- 106,111 ----
***************
*** 124,130 ****
  #define	CINDEX(s,c)	index(s,c)
  #endif
  #include <netdb.h>
- #include <signal.h>
  
  #include "global.h"
  #include "fromlib.h"
--- 124,129 ----
***************
*** 137,156 ****
  #include "tvdefs.h"
  #include "bfunc.h"
  
- #ifndef	RSHCOMMAND
- #define	RSHCOMMAND	"/usr/ucb/rsh"
- #endif
- 
- #ifndef	RSHTIMEOUT
- #define	RSHTIMEOUT	60
- #endif
- 
- /* if > 1, uses parallel startup strategy */
- 
- #ifndef	RSHNPLL
- #define	RSHNPLL	5
- #endif
- 
  #ifndef	max
  #define	max(a,b)	((a)>(b)?(a):(b))
  #endif
--- 136,141 ----
***************
*** 164,181 ****
  #endif
  
  
- struct hst {
- 	int h_tid;
- 	char *h_name;
- 	char *h_login;
- 	char *h_sopts;
- 	int h_flag;
- #define	HST_PASSWORD	1		/* ask for a password */
- #define	HST_MANUAL		2		/* do manual startup */
- 	char *h_cmd;
- 	char *h_result;
- };
- 
  #ifdef	NOTMPNAM
  #define	TMPNAMFUN(x)	pvmtmpnam(x)
  #define	LEN_OF_TMP_NAM	32
--- 149,154 ----
***************
*** 227,233 ****
  extern int ppnetsock;				/* from pvmd.c */
  extern int runstate;				/* from pvmd.c */
  extern int tidhmask;				/* from pvmd.c */
- extern char *username;				/* from pvmd.c */
  
  
  /***************
--- 200,205 ----
***************
*** 235,241 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: startup.c,v 1.17 1995/11/02 16:36:14 manchek Exp $";
  static char pvmtxt[1024];		/* scratch for error log */
  
  
--- 207,213 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: startup.c,v 1.18 1996/05/13 20:35:44 manchek Exp $";
  static char pvmtxt[1024];		/* scratch for error log */
  
  
***************
*** 837,1357 ****
  	PVM_FREE(p);
  	runstate = PVMDSTARTUP;
  	return 0;
- }
- 
- 
- int
- hoster(mp)
- 	struct mesg *mp;
- {
- 	struct mesg *mp2;
- 	int num;
- 	int i;
- 	struct hst **hostlist;
- 	struct hst *hp;
- 	char *p;
- 
- 	/*
- 	* unpack the startup message
- 	*/
- 
- 	upkint(mp, &num);
- 	if (debugmask & PDMSTARTUP) {
- 		sprintf(pvmtxt, "hoster() %d to start\n", num);
- 		pvmlogerror(pvmtxt);
- 	}
- 	if (num > 0) {
- 		hostlist = TALLOC(num, struct hst *, "xxx");
- 		for (i = 0; i < num; i++) {
- 			hp = TALLOC(1, struct hst, "xxx");
- 			hostlist[i] = hp;
- 			hp->h_flag = 0;
- 			hp->h_result = 0;
- 			if (upkint(mp, &hp->h_tid)
- 			|| upkstralloc(mp, &hp->h_sopts)
- 			|| upkstralloc(mp, &hp->h_login)
- 			|| upkstralloc(mp, &hp->h_cmd)) {
- 				pvmlogerror("hoster() bad message format\n");
- 				pvmbailout(0);
- 			}
- 			if (debugmask & PDMSTARTUP) {
- 				sprintf(pvmtxt, "%d. t%x %s so=\"%s\"\n", i,
- 						hp->h_tid,
- 						hp->h_login,
- 						hp->h_sopts);
- 				pvmlogerror(pvmtxt);
- 			}
- 			if (p = CINDEX(hp->h_login, '@')) {
- 				hp->h_name = STRALLOC(p + 1);
- 				*p = 0;
- 				p = STRALLOC(hp->h_login);
- 				PVM_FREE(hp->h_login);
- 				hp->h_login = p;
- 
- 			} else {
- 				hp->h_name = hp->h_login;
- 				hp->h_login = 0;
- 			}
- 			if (!strcmp(hp->h_sopts, "pw"))
- 				hp->h_flag |= HST_PASSWORD;
- 			if (!strcmp(hp->h_sopts, "ms"))
- 				hp->h_flag |= HST_MANUAL;
- 		}
- 	}
- 
- 	/*
- 	* do it
- 	*/
- 
- 	pl_startup(num, hostlist);
- 
- 	/*
- 	* send results back to pvmd
- 	*/
- 
- 	mp2 = mesg_new(0);
- 	mp2->m_dst = mp->m_src;
- 	mp2->m_cod = DM_STARTACK;
- 	mp2->m_wid = mp->m_wid;
- 	pkint(mp2, num);
- 	for (i = 0; i < num; i++) {
- 		pkint(mp2, hostlist[i]->h_tid);
- 		pkstr(mp2, hostlist[i]->h_result
- 				? hostlist[i]->h_result : "PvmDSysErr");
- 	}
- 	if (debugmask & PDMSTARTUP)
- 		pvmlogerror("hoster() pvmd' sending back host table\n");
- 	sendmessage(mp2);
- 	work();		/* no return */
- 	return 0;	/* not reached */
- }
- 
- 
- /********************************************
- *  this is the new (parallel) startup code  *
- *                                           *
- ********************************************/
- 
- struct slot {
- 	struct slot *s_link, *s_rlink;		/* free/active list */
- 	struct hst *s_hst;					/* host table entry */
- 	struct timeval s_bail;				/* timeout time */
- 	int s_rfd, s_wfd, s_efd;			/* slave stdin/out/err */
- 	char s_buf[256];					/* config reply line */
- 	int s_len;							/* length of s_buf */
- };
- 
- 
- static struct slot slots[RSHNPLL+2];	/* state var/context for each slot */
- static struct slot *slfree = 0;			/* free list of slots */
- 
- close_slot(sp)
- 	struct slot *sp;
- {
- 	if (sp->s_wfd != -1)
- 		(void)close(sp->s_wfd);
- 	if (sp->s_rfd != -1)
- 		(void)close(sp->s_rfd);
- 	if (sp->s_efd != -1)
- 		(void)close(sp->s_efd);
- 	LISTDELETE(sp, s_link, s_rlink);
- 	LISTPUTBEFORE(slfree, sp, s_link, s_rlink);
- 	return 0;
- }
- 
- 
- pl_startup(num, hostlist)
- 	int num;
- 	struct hst **hostlist;
- {
- 	int nxth = 0;						/* next host in list to start */
- 	struct slot *slact = 0;				/* active list of slots */
- 	struct hst *hp;
- 	struct slot *sp, *sp2;
- 	struct timeval tnow;
- 	struct timeval tout;
- 	struct fd_set rfds;
- 	int nfds;
- 	int i;
- 	int n;
- 	char *p;
- 	char ebuf[256];						/* for reading stderr */
- 
- 	/* init slot free list */
- 
- 	slfree = &slots[RSHNPLL+1];
- 	slfree->s_link = slfree->s_rlink = slfree;
- 	slact = &slots[RSHNPLL];
- 	slact->s_link = slact->s_rlink = slact;
- 	for (i = RSHNPLL; i-- > 0; ) {
- 		LISTPUTAFTER(slfree, &slots[i], s_link, s_rlink);
- 	}
- 
- 	/*
- 	* keep at this until all hosts in table are completed
- 	*/
- 
- 	for (; ; ) {
- 
- 		/*
- 		* if empty slots, start on new hosts
- 		*/
- 
- 		for (; ; ) {
- 
- 			/* find a host for slot */
- 
- 			if (slfree->s_link != slfree && nxth < num)
- 				hp = hostlist[nxth++];
- 			else
- 				break;
- 
- 			sp = slfree->s_link;
- 			LISTDELETE(sp, s_link, s_rlink);
- 			sp->s_hst = hp;
- 			sp->s_len = 0;
- 			if (debugmask & PDMSTARTUP) {
- 				sprintf(pvmtxt, "pl_startup() trying %s\n", hp->h_name);
- 				pvmlogerror(pvmtxt);
- 			}
- 			phase1(sp);
- 			if (hp->h_result) {
- 				/* error or fully started (manual startup) */
- 
- 				LISTPUTBEFORE(slfree, sp, s_link, s_rlink);
- 
- 			} else {
- 				/* partially started */
- 
- 				LISTPUTBEFORE(slact, sp, s_link, s_rlink);
- 				gettimeofday(&sp->s_bail, (struct timezone*)0);
- 				tout.tv_sec = RSHTIMEOUT;
- 				tout.tv_usec = 0;
- 				TVXADDY(&sp->s_bail, &sp->s_bail, &tout);
- 			}
- 		}
- 
- 		/* if no hosts in progress, we are finished */
- 
- 		if (slact->s_link == slact)
- 			break;
- 
- 		/*
- 		* until next timeout, get output from any slot
- 		*/
- 
- 		FD_ZERO(&rfds);
- 		nfds = 0;
- 		TVCLEAR(&tout);
- 		gettimeofday(&tnow, (struct timezone*)0);
- 		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
- 			if (TVXLTY(&sp->s_bail, &tnow)) {
- 				sprintf(pvmtxt, "pl_startup() %s timed out after %d secs\n",
- 						sp->s_hst->h_name, RSHTIMEOUT);
- 				pvmlogerror(pvmtxt);
- 				sp->s_hst->h_result = STRALLOC("PvmCantStart");
- 				sp2 = sp->s_rlink;
- 				close_slot(sp);
- 				sp = sp2;
- 				continue;
- 			}
- 
- 			if (!TVISSET(&tout) || TVXLTY(&sp->s_bail, &tout))
- 				tout = sp->s_bail;
- 			if (sp->s_rfd >= 0)
- 				FD_SET(sp->s_rfd, &rfds);
- 			if (sp->s_rfd > nfds)
- 				nfds = sp->s_rfd;
- 			if (sp->s_efd >= 0)
- 				FD_SET(sp->s_efd, &rfds);
- 			if (sp->s_efd > nfds)
- 				nfds = sp->s_efd;
- 		}
- 
- 		if (slact->s_link == slact)
- 			break;
- 
- 		nfds++;
- 
- 		if (TVXLTY(&tnow, &tout)) {
- 			TVXSUBY(&tout, &tout, &tnow);
- 		} else {
- 			TVCLEAR(&tout);
- 		}
- 		if (debugmask & PDMSTARTUP) {
- 			sprintf(pvmtxt, "pl_startup() select timeout is %d.%06d\n",
- 					tout.tv_sec, tout.tv_usec);
- 			pvmlogerror(pvmtxt);
- 		}
- 		if ((n = select(nfds,
- #ifdef	FDSETISINT
- 				(int *)&rfds, (int *)0, (int *)0,
- #else
- 				&rfds, (fd_set *)0, (fd_set *)0,
- #endif
- 				&tout)) == -1) {
- 			if (errno != EINTR) {
- 				pvmlogperror("pl_startup() select");
- 				pvmbailout(0);
- 			}
- 		}
- 		if (debugmask & PDMSTARTUP) {
- 			(void)sprintf(pvmtxt, "pl_startup() select returns %d\n", n);
- 			pvmlogerror(pvmtxt);
- 		}
- 		if (n < 1) {
- 			if (n == -1 && errno != EINTR) {
- 				pvmlogperror("pl_startup() select");
- 				pvmbailout(0);	/* XXX this is too harsh */
- 			}
- 			continue;
- 		}
- 
- 		/*
- 		* check for response on stdout or stderr of any slave.
- 		*/
- 
- 		for (sp = slact->s_link; sp != slact; sp = sp->s_link) {
- 
- 			/*
- 			* stdout ready.  get complete line then scan config info from it.
- 			*/
- 			if (sp->s_rfd >= 0 && FD_ISSET(sp->s_rfd, &rfds)) {
- 				n = read(sp->s_rfd, sp->s_buf + sp->s_len,
- 						sizeof(sp->s_buf) - sp->s_len);
- 				if (n > 0) {
- 					sp->s_len += n;
- 					if (sp->s_len >= sizeof(sp->s_buf)) {
- 						sprintf(pvmtxt, "pl_startup() pvmd@%s: big read\n",
- 								sp->s_hst->h_name);
- 						pvmlogerror(pvmtxt);
- 						sp->s_hst->h_result = STRALLOC("PvmCantStart");
- 					}
- 					sp->s_buf[sp->s_len] = 0;
- 					if (p = CINDEX(sp->s_buf + sp->s_len - n, '\n')) {
- 						if (debugmask & PDMSTARTUP) {
- 							sprintf(pvmtxt, "pvmd@%s: %s",
- 									sp->s_hst->h_name, sp->s_buf);
- 							pvmlogerror(pvmtxt);
- 						}
- 						*p = 0;
- 						sp->s_hst->h_result = STRALLOC(sp->s_buf);
- 					}
- 
- 				} else {
- 					if (n) {
- 						sprintf(pvmtxt, "pl_startup() pvmd@%s",
- 								sp->s_hst->h_name);
- 						pvmlogperror(pvmtxt);
- 					} else {
- 						sprintf(pvmtxt, "pl_startup() pvmd@%s: EOF\n",
- 								sp->s_hst->h_name);
- 						pvmlogerror(pvmtxt);
- 					}
- 					sp->s_hst->h_result = STRALLOC("PvmCantStart");
- 				}
- 				if (sp->s_hst->h_result) {
- 					sp2 = sp->s_rlink;
- 					close_slot(sp);
- 					sp = sp2;
- 					continue;
- 				}
- 			}
- 
- 			/*
- 			* response on stderr.  log prefixed by remote's host name.
- 			*/
- 			if (sp->s_efd >= 0 && FD_ISSET(sp->s_efd, &rfds)) {
- 				if ((n = read(sp->s_efd, ebuf, sizeof(ebuf)-1)) > 0) {
- 					char *p = ebuf, *q, c;
- 
- 					ebuf[n] = 0;
- 					sprintf(pvmtxt, "pvmd@%s: ", sp->s_hst->h_name);
- 					q = pvmtxt + strlen(pvmtxt);
- 					while (c = *p++ & 0x7f) {
- 						if (isprint(c))
- 							*q++ = c;
- 
- 						else {
- 							*q++ = '^';
- 							*q++ = (c + '@') & 0x7f;
- 						}
- 					}
- 					*q++ = '\n';
- 					*q = 0;
- 					pvmlogerror(pvmtxt);
- 
- 				} else {
- 					(void)close(sp->s_efd);
- 					sp->s_efd = -1;
- 				}
- 			}
- 		}
- 	}
- 	return 0;
- }
- 
- 
- phase1(sp)
- 	struct slot *sp;
- {
- 	struct hst *hp;
- 	char *hn;
- 	char *av[16];			/* for rsh args */
- 	int ac;
- 	char buf[512];
- 	int pid = -1;			/* pid of rsh */
- 	char *p;
- 
- #ifndef NOREXEC
- 	struct servent *se;
- 	static u_short execport = 0;
- 
- 	if (!execport) {
- 		if (!(se = getservbyname("exec", "tcp"))) {
- 			sprintf(pvmtxt, "phase1() can't getservbyname(): %s\n", "exec");
- 			pvmbailout(0);
- 		}
- 		execport = se->s_port;
- 		endservent();
- 	}
- #endif
- 
- 	hp = sp->s_hst;
- 	hn = hp->h_name;
- 	sp->s_rfd = sp->s_wfd = sp->s_efd = -1;
- 
- 	/*
- 	* XXX manual startup hack... this is if we can't use rexec or rsh
- 	*/
- 
- 	if (hp->h_flag & HST_MANUAL) {
- 		fprintf(stderr, "*** Manual startup ***\n");
- 		fprintf(stderr, "Login to \"%s\" and type:\n", hn);
- 		fprintf(stderr, "%s\n", hp->h_cmd);
- 
- 	/* get version */
- 
- 		fprintf(stderr, "Type response: ");
- 		fflush(stderr);
- 		if (!(fgets(buf, sizeof(buf), stdin))) {
- 			sprintf(pvmtxt, "host %s read error\n", hn);
- 			pvmlogerror(pvmtxt);
- 			goto oops;
- 		}
- 		p = buf + strlen(buf) - 1;
- 		if (*p == '\n')
- 			*p = 0;
- 		hp->h_result = STRALLOC(buf);
- 		fprintf(stderr, "Thanks\n");
- 		fflush(stderr);
- 		return 0;
- 	}
- 
- 	/*
- 	* XXX end manual startup hack
- 	*/
- 
- 	if (!(hp->h_flag & HST_PASSWORD)) {		/* use rsh to start */
- 		int wpfd[2], rpfd[2], epfd[2];
- 		int i;
- 
- 		if (debugmask & PDMSTARTUP) {
- 			sprintf(pvmtxt, "phase1() trying rsh to %s\n", hn);
- 			pvmlogerror(pvmtxt);
- 		}
- 
- 	/* fork an rsh to startup the slave pvmd */
- 
- #ifdef	IMA_TITN
- 		if (socketpair(AF_UNIX, SOCK_STREAM, 0, wpfd) == -1
- 		|| socketpair(AF_UNIX, SOCK_STREAM, 0, rpfd) == -1
- 		|| socketpair(AF_UNIX, SOCK_STREAM, 0, epfd) == -1) {
- 			pvmlogperror("phase1() socketpair");
- 			goto oops;
- 		}
- #else
- 		if (pipe(wpfd) == -1 || pipe(rpfd) == -1 || pipe(epfd) == -1) {
- 			pvmlogperror("phase1() pipe");
- 			goto oops;
- 		}
- #endif
- 
- 		if (debugmask & PDMSTARTUP) {
- 			sprintf(pvmtxt, "phase1() pipes: %d %d %d %d %d %d\n",
- 					wpfd[0], wpfd[1], rpfd[0], rpfd[1], epfd[0], epfd[1]);
- 			pvmlogerror(pvmtxt);
- 		}
- 
- 		if ((pid = fork()) == -1) {
- 			pvmlogperror("phase1() fork");
- 			pvmbailout(0);
- 		}
- 		if (!pid) {
- 			(void)dup2(wpfd[0], 0);
- 			(void)dup2(rpfd[1], 1);
- 			(void)dup2(epfd[1], 2);
- 			for (i = getdtablesize(); --i > 2; )
- 				(void)close(i);
- 			ac = 0;
- 			av[ac++] = RSHCOMMAND;
- 			av[ac++] = hn;
- 			if (hp->h_login) {
- 				av[ac++] = "-l";
- 				av[ac++] = hp->h_login;
- 			}
- 			av[ac++] = hp->h_cmd;
- 			av[ac++] = 0;
- 			if (debugmask & PDMSTARTUP) {
- 				for (ac = 0; av[ac]; ac++)
- 					fprintf(stderr, "av[%d]=\"%s\" ", ac, av[ac]);
- 				fputc('\n', stderr);
- 			}
- 			execvp(av[0], av);
- 			fputs("phase1() execvp failed\n", stderr);
- 			fflush(stderr);
- 			_exit(1);
- 		}
- 		(void)close(wpfd[0]);
- 		(void)close(rpfd[1]);
- 		(void)close(epfd[1]);
- 		sp->s_wfd = wpfd[1];
- 		sp->s_rfd = rpfd[0];
- 		sp->s_efd = epfd[0];
- 
- 	} else {		/* use rexec to start */
- 
- #ifdef NOREXEC
- 		sprintf(pvmtxt, "slconfg() sorry, no rexec()\n");
- 		pvmlogerror(pvmtxt);
- 		goto oops;
- #else
- 		if (debugmask & PDMSTARTUP) {
- 			sprintf(pvmtxt, "phase1() rexec \"%s\"\n", hp->h_cmd);
- 			pvmlogerror(pvmtxt);
- 		}
- 		if ((sp->s_wfd = sp->s_rfd = rexec(&hn, execport,
- 				(hp->h_login ? hp->h_login : username),
- 				(char*)0, hp->h_cmd, &sp->s_efd))
- 		== -1) {
- 			sprintf(pvmtxt, "phase1() rexec failed for host %s\n", hn);
- 			pvmlogerror(pvmtxt);
- 			goto oops;
- 		}
- #endif
- 	}
- 	return 0;
- 
- oops:
- 	hp->h_result = STRALLOC("PvmCantStart");
- 	if (sp->s_wfd != -1)
- 		close(sp->s_wfd);
- 	if (sp->s_rfd != -1)
- 		close(sp->s_rfd);
- 	if (sp->s_efd != -1)
- 		close(sp->s_efd);
- 	sp->s_wfd = sp->s_rfd = sp->s_efd = -1;
- 	return 1;
  }
  
  
--- 809,814 ----
