Prereq: 335
*** ../netlib/pvm3.3.5/src/patchlevel.h	Wed Nov  9 10:58:20 1994
--- src/patchlevel.h	Tue Dec 20 11:24:36 1994
***************
*** 1,3 ****
  
! #define PATCHLEVEL 335
  
--- 1,3 ----
  
! #define PATCHLEVEL 336
  
*** ../netlib/pvm3.3.5/conf/ALPHAMP.def	Sat Jun  4 17:52:02 1994
--- conf/ALPHAMP.def	Tue Dec 20 11:19:52 1994
***************
*** 1,4 ****
! ARCHCFLAGS	= -DNOUNIXDOM
  ARCHDLIB	=
  ARCHDOBJ	=
  ARCHLIB	=
--- 1,4 ----
! ARCHCFLAGS	=	-DHASSTDLIB -DNOUNIXDOM
  ARCHDLIB	=
  ARCHDOBJ	=
  ARCHLIB	=
*** ../netlib/pvm3.3.5/conf/RS6K.def	Sun Sep  4 16:25:25 1994
--- conf/RS6K.def	Tue Dec 20 11:19:35 1994
***************
*** 1,5 ****
  ARCHCFLAGS	=	-DSYSVSIGNAL
! ARCHDLIB	=
  ARCHDOBJ	=
  ARCHLIB	=
  HASRANLIB	=	t
--- 1,5 ----
  ARCHCFLAGS	=	-DSYSVSIGNAL
! ARCHDLIB	=	-lbsd
  ARCHDOBJ	=
  ARCHLIB	=
  HASRANLIB	=	t
*** ../netlib/pvm3.3.5/examples/timing.c	Fri Jul  1 11:27:15 1994
--- examples/timing.c	Tue Dec 20 11:45:21 1994
***************
*** 14,26 ****
  *   6 Mar 1994  Geist  - synch tasks and add direct route
  */
  
  #include <stdio.h>
  #include <sys/time.h>
  #include <time.h>
- 
  #include <sys/types.h>
  #include <fcntl.h>
- #include <stdio.h>
  #include <math.h>
  #include "pvm3.h"
  
--- 14,27 ----
  *   6 Mar 1994  Geist  - synch tasks and add direct route
  */
  
+ #ifdef HASSTDLIB
+ #include <stdlib.h>
+ #endif
  #include <stdio.h>
  #include <sys/time.h>
  #include <time.h>
  #include <sys/types.h>
  #include <fcntl.h>
  #include <math.h>
  #include "pvm3.h"
  
*** ../netlib/pvm3.3.5/hoster/hoster.c	Wed May 18 09:50:29 1994
--- hoster/hoster.c	Tue Dec 20 11:45:40 1994
***************
*** 9,14 ****
--- 9,17 ----
  *	24 Jan 1994  Manchek
  */
  
+ #ifdef HASSTDLIB
+ #include <stdlib.h>
+ #endif
  #include <stdio.h>
  #include <sys/types.h>
  #include <errno.h>
*** ../netlib/pvm3.3.5/include/pvm3.h	Wed Nov  9 10:58:28 1994
--- include/pvm3.h	Tue Dec 20 11:46:25 1994
***************
*** 90,95 ****
--- 90,96 ----
  #define	PvmSelfOutputCode	11	/* stdout message tag */
  #define	PvmSelfTraceTid		12	/* trace destination for task */
  #define	PvmSelfTraceCode	13	/* trace message tag */
+ #define	PvmShowTids			14	/* pvm_catchout prints task ids with output */
  
  /*
  *	for pvm_[sg]ettmask
*** ../netlib/pvm3.3.5/lib/pvmgetarch	Wed Nov  9 10:58:28 1994
--- lib/pvmgetarch	Tue Dec 20 11:18:38 1994
***************
*** 53,59 ****
  	*,88k )                 ARCH=E88K ;;
  	*,mips )                ARCH=MIPS ;;
  	*,CRAY-2 )              ARCH=CRAY2 ;;
! 	Linux,i[34]86 )         ARCH=LINUX ;;
  	SUPER-UX,SX-3 )         ARCH=SX3 ;;
  	esac
  fi
--- 53,59 ----
  	*,88k )                 ARCH=E88K ;;
  	*,mips )                ARCH=MIPS ;;
  	*,CRAY-2 )              ARCH=CRAY2 ;;
! 	Linux,i[345]86 )        ARCH=LINUX ;;
  	SUPER-UX,SX-3 )         ARCH=SX3 ;;
  	esac
  fi
***************
*** 115,121 ****
  		fi
  
  		case "$os,$ht" in
! 		*,i[34]86 )             ARCH=SCO ;;
  		esac
  	fi
  fi
--- 115,121 ----
  		fi
  
  		case "$os,$ht" in
! 		*,i[345]86 )            ARCH=SCO ;;
  		esac
  	fi
  fi
*** ../netlib/pvm3.3.5/man/man3/pvm_catchout.3	Mon Jul 18 16:06:45 1994
--- man/man3/pvm_catchout.3	Wed Dec 21 16:51:21 1994
***************
*** 37,43 ****
  is also collected,
  provided the children don't reset \fIPvmOutputTid\fR.
  .PP
! Each line of output has one of the following forms:
  .nf
  	[txxxxx] BEGIN
  	[txxxxx] (text from child task)
--- 37,45 ----
  is also collected,
  provided the children don't reset \fIPvmOutputTid\fR.
  .PP
! If option \fIPvmShowTids\fR (see \fIpvm_setopt\fR) is true (nonzero),
! output is printed as shown below,
! tagged with the task id where the output originated:
  .nf
  	[txxxxx] BEGIN
  	[txxxxx] (text from child task)
***************
*** 47,52 ****
--- 49,56 ----
  The output from each task includes one BEGIN line and one END
  line,
  with whatever the task prints in between.
+ If PvmShowTids is false,
+ raw output is printed with no additional information.
  .PP
  In C,
  the output file descriptor may be specified.
*** /dev/null	Wed Dec 21 16:54:19 1994
--- man/man3/pvm_getfds.3	Tue Nov 22 00:09:19 1994
***************
*** 0 ****
--- 1,88 ----
+ .TH GETFDS 3PVM "22 Nov, 1994"
+ .SH NAME
+ pvm_getfds \- Get file descriptors in use by PVM.
+ 
+ .SH SYNOPSIS
+ .ft B
+ C	int nfds = pvm_getfds( int **fds )
+ .br
+ 
+ Fortran	Not Available
+ .fi
+ 
+ .SH PARAMETERS
+ .IP fds 0.8i
+ Returns integer array of file descriptors.
+ 
+ .SH DISCUSSION
+ A PVM task uses sockets to communicate between libpvm and other tasks
+ or the pvmd.
+ It is sometimes useful to know the file descriptor numbers of the sockets
+ in order to wait from input from either
+ PVM messages or an external source.
+ For example,
+ the PVM console waits on both keyboard input and notify messages.
+ Input can be multiplexed by polling all sources,
+ but this wastes cpu cycles.
+ Instead,
+ the select() system call can be used to wait until one or more
+ sources of input are ready.
+ 
+ If it completes successfully,
+ pvm_getfds
+ returns the number of sockets in use,
+ and the file descriptor numbers in an array (allocated and freed by libpvm).
+ At least one socket always exists (from task to pvmd),
+ and its descriptor is always fds[0].
+ The number of sockets varies as direct routes are established to other
+ tasks.
+ 
+ It can be difficult to track the set of file descriptors if direct routing
+ is enabled,
+ because routes are created as messages are either sent or received.
+ The simplest approach is to disable direct routing.
+ 
+ When select returns with a PVM file descriptor ready,
+ a complete message may be ready to be received,
+ or
+ instead only a fragment may be waiting.
+ pvm_nrecv or pvm_probe should be used test without blocking.
+ 
+ .SH EXAMPLES
+ The following program fragment waits until either keyboard input is
+ available,
+ or a PVM message has arrived.
+ 
+ .nf
+ 	int *d;
+ 	fd_set r;
+ 
+ 	pvm_setopt(PvmRoute, PvmDontRoute);
+ 	pvm_getfds(&d);
+ 
+ 	FD_ZERO(&r);
+ 	FD_SET(0, &r);
+ 	FD_SET(d[0], &r);
+ 	while (1) {
+ 		if (select(d[0] + 1, &r, (fd_set*)0, (fd_set*)0,
+ 		           (struct timeval*)0) > 0) {
+ 			if (FD_ISSET(0, &r))
+ 				...    /* read keyboard input */
+ 			if (FD_ISSET(d[0], &r) && pvm_nrecv(-1, -1) > 0)
+ 				...    /* got a PVM message */
+ 		}
+ 	}
+ .fi
+ 
+ .SH ERRORS
+ The following error condition can be returned by pvm_getfds:
+ .ta 0.5i 2.0i
+ .nf
+ 	PvmSysErr	pvmd not responding.
+ .fi
+ .SH RESTRICTIONS
+ pvm_getfds
+ is only availble when running PVM on a Unix or similar system.
+ .SH SEE ALSO
+ pvm_notify(3PVM),
+ pvm_trecv(3PVM)
*** ../netlib/pvm3.3.5/man/man3/pvm_getopt.3	Tue Jun 21 15:40:25 1994
--- man/man3/pvm_getopt.3	Wed Dec 21 16:47:13 1994
***************
*** 28,33 ****
--- 28,34 ----
  PvmSelfOutputCode  11    Output message tag
  PvmSelfTraceTid    12    Trace data destination
  PvmSelfTraceCode   13    Trace message tag
+ PvmShowTids        14    pvm_catchout prints task ids with output
  .fi
  .br
  .IP val
*** ../netlib/pvm3.3.5/man/man3/pvm_joingroup.3	Tue Jun 21 15:40:25 1994
--- man/man3/pvm_joingroup.3	Tue Dec 20 11:46:56 1994
***************
*** 61,65 ****
  	PvmBadParam	giving a NULL group name.
  	PvmDupGroup	trying to join a group you are already in.
  .fi
! SEE ALSO
  pvm_lvgroup(3PVM)
--- 61,65 ----
  	PvmBadParam	giving a NULL group name.
  	PvmDupGroup	trying to join a group you are already in.
  .fi
! .SH SEE ALSO
  pvm_lvgroup(3PVM)
*** ../netlib/pvm3.3.5/man/man3/pvm_setopt.3	Tue Jun 21 15:40:27 1994
--- man/man3/pvm_setopt.3	Wed Dec 21 16:47:03 1994
***************
*** 27,32 ****
--- 27,33 ----
  PvmSelfOutputCode  11    Output message tag
  PvmSelfTraceTid    12    Trace data destination
  PvmSelfTraceCode   13    Trace message tag
+ PvmShowTids        14    pvm_catchout prints task ids with output
  .fi
  .br
  .IP val
*** ../netlib/pvm3.3.5/patches/Contents	Wed Nov  9 10:58:32 1994
--- patches/Contents	Wed Dec 21 16:53:41 1994
***************
*** 1,5 ****
--- 1,44 ----
  patch #5
  version:
+     3.3.5 -> 3.3.6
+ files:
+     patch  src/patchlevel.h
+     patch  conf/ALPHAMP.def
+     patch  conf/RS6K.def
+     patch  examples/timing.c
+     patch  hoster/hoster.c
+     patch  include/pvm3.h
+     patch  lib/pvmgetarch
+     patch  man/man3/pvm_catchout.3
+     create man/man3/pvm_getfds.3
+     patch  man/man3/pvm_getopt.3
+     patch  man/man3/pvm_joingroup.3
+     patch  man/man3/pvm_setopt.3
+     patch  patches/Contents
+     patch  src/CM5/pvmdmimd.c
+     patch  src/CM5/pvmhost.c
+     patch  src/global.h
+     patch  src/lpvm.c
+     patch  src/lpvmcat.c
+     patch  src/lpvmmimd.c
+     patch  src/lpvmshmem.c
+     patch  src/pvmd.c
+     patch  tasker/tasker.c
+     patch  xep/mmain.c
+     patch  xep/mtile.c
+     patch  xep/xep.c
+ what:
+     + new setopt PvmShowTids determines whether pvm_catchout shows tids.
+       default setting is 1 now, will be 0 in release 3.4
+     + added xx586 cpu type to pvmgetarch script.
+     + new man page for pvm_getfds().
+     . fixed non-blocking socket code on RS6K - caused pvmd to hang.
+     . CM5 mpp_load() unsets TF_FORKD.
+     . ALPHAMP.def sets HASSTDLIB flag - caused pvmd to coredump.
+     . "EOF on pvmd sock" message no longer printed on halt.
+     . fixed typo in pvm_joingroup.3 man page.
+     . include <stdlib.h> in various examples.
+ version:
      3.3.4 -> 3.3.5
  files:
      patch  src/patchlevel.h
*** ../netlib/pvm3.3.5/src/CM5/pvmdmimd.c	Fri Jun  3 16:54:24 1994
--- src/CM5/pvmdmimd.c	Wed Dec 21 10:57:04 1994
***************
*** 86,91 ****
--- 86,96 ----
   *			tid: task ID.
   *
  $Log: pvmdmimd.c,v $
+  * Revision 1.4  1994/12/21  15:56:15  manchek
+  * mpp_load() assigns t_out of host process to tasks.
+  * allows output collection.
+  * mpp_load() unsets TF_FORKD
+  *
   * Revision 1.3  1994/06/03  20:54:24  manchek
   * version 3.3.0
   *
***************
*** 150,156 ****
  
  /* private */
  
! static char rcsid[] = "$Id: pvmdmimd.c,v 1.3 1994/06/03 20:54:24 manchek Exp $";
  static struct nodeset *busynodes;	/* active nodes; ordered by proc type */
  static char etext[512];			/* scratch for error log */
  static int ptypemask;			/* mask; we use these bits of ptype in tids */
--- 155,161 ----
  
  /* private */
  
! static char rcsid[] = "$Id: pvmdmimd.c,v 1.4 1994/12/21 15:56:15 manchek Exp $";
  static struct nodeset *busynodes;	/* active nodes; ordered by proc type */
  static char etext[512];			/* scratch for error log */
  static int ptypemask;			/* mask; we use these bits of ptype in tids */
***************
*** 242,248 ****
  				/* ptype cannot be recycled */
  					busynodes->n_ptype = sp->n_ptype + 1;
  #endif
! 				if (tp = task_find(sp->n_ptid)) 
  					tp->t_flag |= TF_CLOSE;
  				LISTDELETE(sp, n_link, n_rlink);
  				PVM_FREE(sp);
--- 247,253 ----
  				/* ptype cannot be recycled */
  					busynodes->n_ptype = sp->n_ptype + 1;
  #endif
! 				if (tp = task_find(sp->n_ptid))
  					tp->t_flag |= TF_CLOSE;
  				LISTDELETE(sp, n_link, n_rlink);
  				PVM_FREE(sp);
***************
*** 271,276 ****
--- 276,282 ----
  	int err = 0;
  	struct nodeset *sp;
  	char c[32];
+ 	int hostout;
  
  	sp = mpp_new(count, ptid);
  	ptypepart = (sp->n_ptype << (ffs(tidtmask) - 1)) | TIDONNODE;
***************
*** 285,290 ****
--- 291,303 ----
  	tp->t_a_out = STRALLOC(c);
  	sp->n_ptid = tp->t_tid;			/* pvmhost's tid */
  	hosttxq = tp->t_txq;
+ 	hostout = tp->t_out;
+ 	tp->t_out = -1;
+ 	/* 
+      * pvmhost waits for pvmd to close its socket before exiting, so pvmd
+      * must clean up without SIGCHLD
+ 	 */
+ 	tp->t_flag &= ~TF_FORKD;
  
  	if (debugmask & PDMTASK) {
  		sprintf(etext, "mpp_load() %d type=%d ptid=%x t%x...\n",
***************
*** 302,307 ****
--- 315,321 ----
  		tids[j] = tp->t_tid;
  		PVM_FREE(tp->t_txq);
  		tp->t_txq = hosttxq;		/* node tasks share pvmhost's txq */
+ 		tp->t_out = hostout;		/* and stdout */
  	}
  	return 0;
  
*** ../netlib/pvm3.3.5/src/CM5/pvmhost.c	Wed Nov  9 10:58:34 1994
--- src/CM5/pvmhost.c	Wed Dec 21 10:57:19 1994
***************
*** 38,43 ****
--- 38,46 ----
   * 		changed mc_dsts[] to short from int.
   *
  $Log: pvmhost.c,v $
+  * Revision 1.6  1994/12/21  15:57:08  manchek
+  * use PMTPACK instead of CMMD_ANY_TAG to receive inPlace message
+  *
   * Revision 1.5  1994/11/09  14:26:05  manchek
   * more mpp fixes
   *
***************
*** 85,91 ****
  extern int pvmmyndf;
  extern int pvmtidhmask;
  
! static char rcsid[] = "$Id: pvmhost.c,v 1.5 1994/11/09 14:26:05 manchek Exp $";
  static char etext[512];         /* scratch for error log */
  static int tidnmask = TIDNODE;
  static int tidtmask = TIDPTYPE;
--- 88,94 ----
  extern int pvmmyndf;
  extern int pvmtidhmask;
  
! static char rcsid[] = "$Id: pvmhost.c,v 1.6 1994/12/21 15:57:08 manchek Exp $";
  static char etext[512];         /* scratch for error log */
  static int tidnmask = TIDNODE;
  static int tidtmask = TIDPTYPE;
***************
*** 182,188 ****
  					BCOPY(hdr->fr_dat, topvmd->fr_dat, txtogo);
  					fr_unref(hdr);
  				}
! 				CMMD_receive_block(CMMD_mcb_source(rmid), CMMD_ANY_TAG,
  				topvmd->fr_dat + txtogo, len - txtogo);
  				txtogo = len;
  			}
--- 185,191 ----
  					BCOPY(hdr->fr_dat, topvmd->fr_dat, txtogo);
  					fr_unref(hdr);
  				}
! 				CMMD_receive_block(CMMD_mcb_source(rmid), PMTPACK,
  				topvmd->fr_dat + txtogo, len - txtogo);
  				txtogo = len;
  			}
***************
*** 226,232 ****
  				exit(0);
  			}
  			if (!n) {
! 				pvmlogerror("pvmhost: read EOF on pvmd sock\n");
  				exit(0);
  			}
  
--- 229,235 ----
  				exit(0);
  			}
  			if (!n) {
! 				/* pvmlogerror("pvmhost: read EOF on pvmd sock\n"); */
  				exit(0);
  			}
  
*** ../netlib/pvm3.3.5/src/global.h	Wed Nov  9 10:58:37 1994
--- src/global.h	Wed Dec 21 16:27:37 1994
***************
*** 32,37 ****
--- 32,40 ----
   *	Generic includes.
   *
  $Log: global.h,v $
+  * Revision 1.15  1994/12/21  21:27:34  manchek
+  * version 3.3.6
+  *
   * Revision 1.14  1994/10/15  19:05:01  manchek
   * version 3.3.5
   *
***************
*** 79,85 ****
  
  /* release version */
  
! #define	PVM_VER	"3.3.5"
  
  /* UDPMAXLEN should be set to the largest UDP message length
     your system can handle. */
--- 82,88 ----
  
  /* release version */
  
! #define	PVM_VER	"3.3.6"
  
  /* UDPMAXLEN should be set to the largest UDP message length
     your system can handle. */
*** ../netlib/pvm3.3.5/src/lpvm.c	Wed Nov  9 10:58:38 1994
--- src/lpvm.c	Tue Dec 20 11:29:07 1994
***************
*** 32,37 ****
--- 32,41 ----
   *	Libpvm core for unix environment.
   *
  $Log: lpvm.c,v $
+  * Revision 1.14  1994/12/20  16:28:19  manchek
+  * added PvmShowTids case to setopt.
+  * removed EOF message on pvmd socket close
+  *
   * Revision 1.13  1994/10/15  19:07:31  manchek
   * don't use fd_sets when select returns -1; will hang reading.
   * cast message tags for comparison as integers
***************
*** 256,261 ****
--- 260,266 ----
  int pvmtidhmask = TIDHOST;				/* mask for host field of tids */
  int pvmouttid = 0;						/* stdout dst and code */
  int pvmoutcod = 0;
+ int pvmshowtaskid = 1;					/* catchout shows task ids */
  int pvmtoplvl = 1;						/* function called from outside lib */
  int pvmtrctid = 0;						/* trace dst and code */
  int pvmtrccod = 0;
***************
*** 269,275 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvm.c,v 1.13 1994/10/15 19:07:31 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 */
--- 274,280 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvm.c,v 1.14 1994/12/20 16:28:19 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 */
***************
*** 1494,1503 ****
  		if (FD_ISSET(topvmd->tt_fd, &rfds) && !(mxfersingle && gotem)) {
  			up = pvmrxlist->ub_rlink;
  			if ((n = mxinput(topvmd)) < 0) {
! 				if (n == -1)
! 					pvmlogerror("mxfer() EOF on pvmd sock\n");
! 				else
  					pvmlogerror("mxfer() mxinput bad return on pvmd sock\n");
  				return PvmSysErr;
  			}
  
--- 1499,1508 ----
  		if (FD_ISSET(topvmd->tt_fd, &rfds) && !(mxfersingle && gotem)) {
  			up = pvmrxlist->ub_rlink;
  			if ((n = mxinput(topvmd)) < 0) {
! 				if (n != -1)
  					pvmlogerror("mxfer() mxinput bad return on pvmd sock\n");
+ 				else if (debugmask & (TDMSELECT|TDMMESSAGE|TDMPACKET))
+ 					pvmlogerror("mxfer() EOF on pvmd sock\n");
  				return PvmSysErr;
  			}
  
***************
*** 2242,2247 ****
--- 2247,2256 ----
  		rc = pvmtrccod;
  		break;
  
+ 	case PvmShowTids:
+ 		rc = pvmshowtaskid;
+ 		break;
+ 
  	default:
  		err = 1;
  		break;
***************
*** 2468,2473 ****
--- 2477,2487 ----
  			}
  			pvm_freebuf(pvm_setsbuf(sbf));
  		}
+ 		break;
+ 
+ 	case PvmShowTids:
+ 		rc = pvmshowtaskid;
+ 		pvmshowtaskid = val;
  		break;
  
  	default:
*** ../netlib/pvm3.3.5/src/lpvmcat.c	Wed Nov  9 10:58:38 1994
--- src/lpvmcat.c	Tue Dec 20 11:36:10 1994
***************
*** 32,37 ****
--- 32,40 ----
   *	Child task output collection.
   *
  $Log: lpvmcat.c,v $
+  * Revision 1.4  1994/12/20  16:35:57  manchek
+  * added ShowTids option
+  *
   * Revision 1.3  1994/11/07  21:34:49  manchek
   * cast message tag for comparison as int
   *
***************
*** 85,90 ****
--- 88,95 ----
  	int o_flag;							/* task state */
  #define	GOTSPAWN	1
  #define	GOTEOF		2
+ #define	GOTBOTH		(GOTSPAWN|GOTEOF)
+ #define	TASKSTATE	(GOTSPAWN|GOTEOF)
  };
  
  
***************
*** 102,107 ****
--- 107,113 ----
  extern int pvmtoplvl;					/* from lpvm.c */
  extern Pvmtmask pvmtrcmask;				/* from lpvm.c */
  extern int pvmtrctid;					/* from lpvm.c */
+ extern int pvmshowtaskid;				/* from lpvm.c */
  
  
  /***************
***************
*** 109,115 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmcat.c,v 1.3 1994/11/07 21:34:49 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static struct tobuf *tobuflist = 0;
  static FILE *outlogff = 0;
--- 115,121 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmcat.c,v 1.4 1994/12/20 16:35:57 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static struct tobuf *tobuflist = 0;
  static FILE *outlogff = 0;
***************
*** 247,253 ****
  		while (p = CINDEX(p, '\n')) {
  			*p++ = 0;
  			if (outlogff)
! 				fprintf(outlogff, "[t%x] %s\n", tid, op->o_buf);
  			op->o_len -= p - op->o_buf;
  			BCOPY(p, op->o_buf, op->o_len);
  			p = op->o_buf;
--- 253,262 ----
  		while (p = CINDEX(p, '\n')) {
  			*p++ = 0;
  			if (outlogff)
! 				if (pvmshowtaskid)
! 					fprintf(outlogff, "[t%x] %s\n", tid, op->o_buf);
! 				else
! 					fprintf(outlogff, "%s\n", op->o_buf);
  			op->o_len -= p - op->o_buf;
  			BCOPY(p, op->o_buf, op->o_len);
  			p = op->o_buf;
***************
*** 264,275 ****
  			}
  			if (op->o_len > 0) {
  				if (outlogff)
! 					fprintf(outlogff, "[t%x] %s\n", tid, op->o_buf);
  				op->o_len = 0;
  			}
  			op->o_flag |= GOTEOF;
! 			if (op->o_flag == (GOTSPAWN|GOTEOF)) {
! 				if (outlogff)
  					fprintf(outlogff, "[t%x] EOF\n", tid);
  				tobuf_free(op);
  			}
--- 273,287 ----
  			}
  			if (op->o_len > 0) {
  				if (outlogff)
! 					if (pvmshowtaskid)
! 						fprintf(outlogff, "[t%x] %s\n", tid, op->o_buf);
! 					else
! 						fprintf(outlogff, "%s\n", op->o_buf);
  				op->o_len = 0;
  			}
  			op->o_flag |= GOTEOF;
! 			if ((op->o_flag & TASKSTATE) == GOTBOTH) {
! 				if (outlogff && pvmshowtaskid)
  					fprintf(outlogff, "[t%x] EOF\n", tid);
  				tobuf_free(op);
  			}
***************
*** 278,289 ****
  		case -1:	/* spawn creating new task */
  			if (!(op = tobuf_find(tid))) {
  				op = tobuf_new(tid);
! 				if (outlogff)
  					fprintf(outlogff, "[t%x] BEGIN\n", tid);
  			}
  			op->o_flag |= GOTSPAWN;
! 			if (op->o_flag == (GOTSPAWN|GOTEOF)) {
! 				if (outlogff)
  					fprintf(outlogff, "[t%x] EOF\n", tid);
  				tobuf_free(op);
  			}
--- 290,301 ----
  		case -1:	/* spawn creating new task */
  			if (!(op = tobuf_find(tid))) {
  				op = tobuf_new(tid);
! 				if (outlogff && pvmshowtaskid)
  					fprintf(outlogff, "[t%x] BEGIN\n", tid);
  			}
  			op->o_flag |= GOTSPAWN;
! 			if ((op->o_flag & TASKSTATE) == GOTBOTH) {
! 				if (outlogff && pvmshowtaskid)
  					fprintf(outlogff, "[t%x] EOF\n", tid);
  				tobuf_free(op);
  			}
***************
*** 293,299 ****
  		case -2:	/* new task starting up */
  			if (!(op = tobuf_find(tid))) {
  				op = tobuf_new(tid);
! 				if (outlogff)
  					fprintf(outlogff, "[t%x] BEGIN\n", tid);
  			}
  			break;
--- 305,311 ----
  		case -2:	/* new task starting up */
  			if (!(op = tobuf_find(tid))) {
  				op = tobuf_new(tid);
! 				if (outlogff && pvmshowtaskid)
  					fprintf(outlogff, "[t%x] BEGIN\n", tid);
  			}
  			break;
***************
*** 323,329 ****
  
  	if (outlogff) {
  		if (tobuflist && tobuflist->o_link != tobuflist) {
! 			pvmlogerror("pvm_exit() child task(s).  waiting...\n");
  			while (tobuflist->o_link != tobuflist) {
  
  	/* XXX mroute() does return after ctrl messages received */
--- 335,342 ----
  
  	if (outlogff) {
  		if (tobuflist && tobuflist->o_link != tobuflist) {
! 			if (pvmshowtaskid)
! 				pvmlogerror("pvm_exit() child task(s).  waiting...\n");
  			while (tobuflist->o_link != tobuflist) {
  
  	/* XXX mroute() does return after ctrl messages received */
*** ../netlib/pvm3.3.5/src/lpvmmimd.c	Wed Nov  9 10:58:39 1994
--- src/lpvmmimd.c	Tue Dec 20 11:39:09 1994
***************
*** 32,37 ****
--- 32,40 ----
   *	Libpvm core for MPP environment.
   *
  $Log: lpvmmimd.c,v $
+  * Revision 1.7  1994/12/20  16:39:05  manchek
+  * added pvmshowtaskid variable
+  *
   * Revision 1.6  1994/11/07  22:39:59  manchek
   * Modify node_mcast() to handle DataInPlace correctly.
   * Modify pvm_precv() to deal with packets from service nodes.  Those
***************
*** 164,169 ****
--- 167,173 ----
  int pvmudpmtu = MAXFRAGSIZE;			/* max fragment size */
  int pvmouttid = 0;						/* stdout dst and code */
  int pvmoutcod = 0;
+ int pvmshowtaskid = 1;					/* catchout shows task ids */
  int pvmtoplvl = 1;                      /* function called from outside lib */
  int pvmtrctid = 0;						/* trace dst and code */
  int pvmtrccod = 0;
***************
*** 216,222 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmmimd.c,v 1.6 1994/11/07 22:39:59 manchek Exp $";
  static int debugmask = 0;				/* which debugging info */
  static char pvmtxt[512];					/* scratch for error log */
  static struct umbuf *rxfrag = 0;		/* not-assembled incm msgs */
--- 220,226 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmmimd.c,v 1.7 1994/12/20 16:39:05 manchek Exp $";
  static int debugmask = 0;				/* which debugging info */
  static char pvmtxt[512];					/* scratch for error log */
  static struct umbuf *rxfrag = 0;		/* not-assembled incm msgs */
***************
*** 1091,1096 ****
--- 1095,1104 ----
  		rc = pvmtrccod;
  		break;
  
+ 	case PvmShowTids:
+ 		rc = pvmshowtaskid;
+ 		break;
+ 
  	default:
  		err = 1;
  		break;
***************
*** 1302,1307 ****
--- 1310,1320 ----
  			err = 1;
  		}
  		pvm_freebuf(pvm_setsbuf(sbf));
+ 		break;
+ 
+ 	case PvmShowTids:
+ 		rc = pvmshowtaskid;
+ 		pvmshowtaskid = val;
  		break;
  
  	default:
*** ../netlib/pvm3.3.5/src/lpvmshmem.c	Wed Nov  9 10:58:41 1994
--- src/lpvmshmem.c	Tue Dec 20 11:39:00 1994
***************
*** 32,37 ****
--- 32,40 ----
   *	Libpvm core for MPP environment.
   *
  $Log: lpvmshmem.c,v $
+  * Revision 1.5  1994/12/20  16:38:44  manchek
+  * added pvmshowtaskid variable
+  *
   * Revision 1.4  1994/11/07  22:42:39  manchek
   * general damage control and cleanup:
   * initialize variables
***************
*** 189,194 ****
--- 192,198 ----
  int pvmtidlmask = TIDLOCAL;				/* mask for local field of tids */
  int pvmouttid = 0;                      /* stdout dst and code */
  int pvmoutcod = 0;
+ int pvmshowtaskid = 1;					/* catchout shows task ids */
  int pvmtoplvl = 1;                      /* function called from outside lib */
  int pvmtrctid = 0;                      /* trace dst and code */
  int pvmtrccod = 0;
***************
*** 213,219 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmshmem.c,v 1.4 1994/11/07 22:42:39 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 */
--- 217,223 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvmshmem.c,v 1.5 1994/12/20 16:38:44 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 */
***************
*** 1260,1265 ****
--- 1264,1273 ----
  		rc = pvmtrccod;
  		break;
  
+ 	case PvmShowTids:
+ 		rc = pvmshowtaskid;
+ 		break;
+ 
  	default:
  		err = 1;
  		break;
***************
*** 1473,1478 ****
--- 1481,1491 ----
  			err = 1;
  		}
  		pvm_freebuf(pvm_setsbuf(sbf));
+ 		break;
+ 
+ 	case PvmShowTids:
+ 		rc = pvmshowtaskid;
+ 		pvmshowtaskid = val;
  		break;
  
  	default:
*** ../netlib/pvm3.3.5/src/pvmd.c	Wed Nov  9 10:58:42 1994
--- src/pvmd.c	Tue Dec 20 11:40:51 1994
***************
*** 32,37 ****
--- 32,40 ----
   *	Mr. pvm daemon.
   *
  $Log: pvmd.c,v $
+  * Revision 1.20  1994/12/20  16:40:35  manchek
+  * use O_NONBLOCK for RS6K
+  *
   * Revision 1.19  1994/11/08  19:05:07  manchek
   * mpp fix?
   *
***************
*** 261,267 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmd.c,v 1.19 1994/11/08 19:05:07 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 */
--- 264,270 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmd.c,v 1.20 1994/12/20 16:40:35 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 */
***************
*** 1780,1790 ****
--- 1783,1798 ----
  		if ((i = fcntl(tp->t_sock, F_GETFL, 0)) == -1)
  			pvmlogperror("loclconn: fcntl");
  		else {
+ #ifdef	IMA_RS6K
+ 	/* did you ever feel as though your mind had started to erode? */
+ 			i |= O_NONBLOCK;
+ #else	/*IMA_RS6K*/
  #ifdef O_NDELAY
  			i |= O_NDELAY;
  #else
  			i |= FNDELAY;
  #endif
+ #endif	/*IMA_RS6K*/
  			(void)fcntl(tp->t_sock, F_SETFL, i);
  		}
  		wrk_fds_add(tp->t_sock, 1);
*** ../netlib/pvm3.3.5/tasker/tasker.c	Wed Nov  9 10:58:44 1994
--- tasker/tasker.c	Tue Dec 20 11:48:03 1994
***************
*** 8,13 ****
--- 8,16 ----
  */
  
  
+ #ifdef HASSTDLIB
+ #include <stdlib.h>
+ #endif
  #include <stdio.h>
  #include <signal.h>
  #include <sys/types.h>
*** ../netlib/pvm3.3.5/xep/mmain.c	Fri Mar 11 11:43:11 1994
--- xep/mmain.c	Tue Dec 20 11:48:31 1994
***************
*** 42,47 ****
--- 42,50 ----
   *	02 Sep 92  - ported to v3
   */
  
+ #ifdef HASSTDLIB
+ #include <stdlib.h>
+ #endif
  #include <sys/types.h>
  #include <fcntl.h>
  #include <stdio.h>
*** ../netlib/pvm3.3.5/xep/mtile.c	Thu May 26 22:49:07 1994
--- xep/mtile.c	Tue Dec 20 11:48:38 1994
***************
*** 38,43 ****
--- 38,46 ----
   *	02 Sep 92 - ported to v3
   */
  
+ #ifdef HASSTDLIB
+ #include <stdlib.h>
+ #endif
  #include <sys/types.h>
  #include <fcntl.h>
  #include <stdio.h>
*** ../netlib/pvm3.3.5/xep/xep.c	Wed Nov  9 10:58:44 1994
--- xep/xep.c	Tue Dec 20 11:48:51 1994
***************
*** 35,40 ****
--- 35,43 ----
   */
  
  
+ #ifdef HASSTDLIB
+ #include <stdlib.h>
+ #endif
  #include <stdio.h>
  #include <math.h>
  #include <X11/Xlib.h>
