Newsgroups: comp.parallel.pvm
Path: ukc!uknet!pipex!sunic!trane.uninett.no!eunet.no!EU.net!Germany.EU.net!netmbx.de!zrz.TU-Berlin.DE!zib-berlin.de!uni-paderborn.de!urmel.informatik.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!rz.uni-hildesheim.de!baghira.han.de!erni.escape.de!dagoba.escape.de!strauss
From: strauss@dagoba.escape.de (Frank Strauss)
Subject: Re: xab3 and Paragraph
References: <2m1tt6$jvn@due.uninett.no>
Organization: Private Site
Date: Wed, 16 Mar 1994 11:36:53 GMT
Message-ID: <1994Mar16.113653.2154@dagoba.escape.de>
Lines: 191

fredrikm@eik.ii.uib.no (Fredrik Manne) writes:

>I have installed xab3 and Paragraph in order to visualize pvm applications.
>I have a problem when using "pvmfmcast"  (one to many communication): This
>will cause an entry on the form:

>763648902 194847 4000f 2 23 pvm_mcast 0 1 2 4 40011 40010 

>to be generated in the *.xab trace file.  I convert the file with
>topg3 and load the file into Paragraph which then crashes...

I've had similar problems and posted a short patch for the awk script that
is used by topg3. A few days later I recognized that PMV's multicast may
produce different forms of XAB output, depending on it's invocation.
Here is another patch, which possibly has still a lot of bugs, but hopefully
it may solve your problem.


#Awk script for converting xab3 tracefiles to ParaGraph format
#8/23/93 Wilson Swee
# modifier par Marc BUFFAT pour pvm 3.2 11/11/93
# modified by Frank Strauss (strauss@ibr.cs.tu-bs.de) 02/15/94
# modified by Frank Strauss (strauss@ibr.cs.tu-bs.de) 02/19/94
BEGIN { curnode = 0;

		picl["trace_start"]	= 1;
		picl["open"] 		= 2;
		picl["load"] 		= 3;
		picl["send"] 		= 4;
		picl["recv"] 		= 6;
		picl["recv_blocking"] 	= 7;
		picl["recv_waking"] 	= 8;
		picl["message"] 	= 9;
		picl["sync"] 		= 10;
		picl["compstats"] 	= 11;
		picl["commstats"] 	= 12;
		picl["close"] 		= 13;
		picl["trace_level"] 	= 14;
		picl["trace_mark"] 	= 15;
		picl["trace_message"] 	= 16;
		picl["trace_stop"] 	= 17;
		picl["trace_flush"] 	= 18;
		picl["trace_exit"] 	= 19;
		picl["trace_begin"] 	= 20;
		picl["trace_end"] 	= 21;
		picl["host"]		= -32768;

		xab3["pvm_mytid"]	= 26;		#enroll,whoami
		xab3["pvm_spawn"]	= 49;		#initiate
		xab3["pvm_exit"]	= 9;		#leave
		xab3["pvm_recv_entry"]	= 42;		#rcv
		xab3["pvm_send"]	= 43;		#snd
		xab3["pvm_rcv_done"]	= 64;		#rcv_done
		xab3["pvm_mcast"]	= 23;
		}	

# get rid of the extra lines
/^[^0-9]/  { next; }

$5 == xab3["pvm_spawn"] {
	n=11+$9
	while (n <= NF) {
	k=$n
	if (node[k] == "") {
		while (length($2) < 6) $2 = "0" $2;
		ttime = $1 "." $2;
		test = ttime;
		ttime = ttime - bsec;
		xtime=sprintf("%6.6f", ttime);
		nsf = split(xtime, tsec, ".");
		while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";

		node[k] = curnode++
		print picl["trace_start"], tsec[1], tsec[2], node[k], 0, 0, 0
	}
	n++;
	}
}
# assign a node number 
$5 ==  xab3["pvm_mytid"] { 
	if (node[$3] == "") {
		while (length($2) < 6) $2 = "0" $2;
		ttime = $1 "." $2;
		test = ttime;
		ttime = ttime - bsec;
		xtime=sprintf("%6.6f", ttime);
		nsf = split(xtime, tsec, ".");
		while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";

		node[$3] = curnode++ 
		# store the base time
		if (bsec=="") {
		 while (length($2) < 6) $2 = "0" $2;
		 bsec = $1 "." $2;
                }
		# start tracing on this node
		print picl["trace_start"], tsec[1], tsec[2], node[$3], 0, 0, 0;
		}
	}


$5 == xab3["pvm_send"] {
	while (length($2) < 6) $2 = "0" $2;
	ttime = $1 "." $2;
	test = ttime;
	ttime = ttime - bsec;
	xtime=sprintf("%6.6f", ttime);
	nsf = split(xtime, tsec, ".");
	while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";
	   dest = node[$8];
# if dest is not assigned yet, give a new node number
	   if (dest == "") {
		node[$8] = curnode++;
		dest = node[$8];
		}
	   print picl["send"], tsec[1], tsec[2], node[$3], dest, $9, $10;
	   split(itime[$3], it, ".");
	   while(length(it[2]) < 6) it[2] = it[2] "0";
	   print picl["compstats"], tsec[1],tsec[2], node[$3], it[1], it[2];
}

$5 == xab3["pvm_mcast"] {
	while (length($2) < 6) $2 = "0" $2;
	ttime = $1"."$2;
	ttime = ttime - bsec;
	xtime=sprintf("%6.6f", ttime);
	nsf = split(xtime, tsec, ".");
	while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";
	if ($8 == 0) { p=10 } else { p=11 }
# parse through list of tids
	while (p <= NF){
		k=$p
		dest = node[k];
	   	if (dest == "") {
			node[k] = curnode++;
			dest = node[k];
		}
		print picl["send"], tsec[1], tsec[2], node[$3], dest, $8, $9
		p++;
		split(itime[$3], it, ".");
		while(length(it[2]) < 6) it[2] = it[2] "0";
	   	print picl["compstats"], tsec[1],tsec[2], node[$3], it[1], it[2];
		} 
      	}


# if it's rcv, generate the PICL event
$5 == xab3["pvm_recv_entry"] { 
	while (length($2) < 6) $2 = "0" $2;
	ttime = $1 "." $2;
	ttime = ttime - bsec;
	xtime=sprintf("%6.6f", ttime);
	rtime[$3]=xtime;
	split(xtime, tsec, ".");
	while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";
	print picl["recv_blocking"], tsec[1], tsec[2], node[$3], $9;
	split(itime[$3], it, ".");
	while(length(it[2]) < 6) it[2] = it[2] "0";
   	print picl["compstats"], tsec[1],tsec[2], node[$3], it[1], it[2];
	}

# if it's rcv_done
$5 == xab3["pvm_rcv_done"] {
	while (length($2) < 6) $2 = "0" $2;
	ttime = $1 "." $2;
	ttime = ttime - bsec;
	xtime=sprintf("%6.6f", ttime);
	itime[$3]=itime[$3] + xtime - rtime[$3];
	split(xtime, tsec, ".");
	while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";
	print picl["recv_waking"], tsec[1], tsec[2], node[$3], node[$8], $9, $10;
	split(itime[$3], it, ".");
	while(length(it[2]) < 6) it[2] = it[2] "0";
	print picl["compstats"], tsec[1], tsec[2], node[$3], it[1], it[2]
	}
	

# if it's leave
$5 == xab3["pvm_exit"] {
	while (length($2) < 6) $2 = "0" $2;
	ttime = $1 "." $2;
	ttime = ttime - bsec;
	xtime=sprintf("%6.6f", ttime);
	split(xtime, tsec, ".");
	while (length(tsec[2]) < 6) tsec[2] = tsec[2] "0";
	print picl["close"], tsec[1], tsec[2], node[$3]
	}

-- 
Frank Strauss, TU Braunschweig                  strauss@{ibr|ips}.cs.tu-bs.de
Buergerstr.13, 38118 BS, (0531)-503873    strauss@dagoba.{escape|priconet}.de

