[mpich2-commits] r6605 - in mpich2/trunk/src/mpe2/src/slog2sdk: lib src/logformat/clog2TOdrawable src/viewer/timelines

chan at mcs.anl.gov chan at mcs.anl.gov
Sat May 1 23:51:20 CDT 2010


Author: chan
Date: 2010-05-01 23:51:20 -0500 (Sat, 01 May 2010)
New Revision: 6605

Modified:
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/clog2TOdrawable.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/clog2TOslog2.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/clog2print.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/clogTOdrawable.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/clogTOslog2.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/clogprint.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/jumpshot.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/jumpshot_launcher.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/logconvertor.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2filter.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2navigator.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2printrecur.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2printserial.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/traceTOslog2.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/lib/traceprint.jar
   mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdID.java
   mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdIDMap.java
   mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/Print.java
   mpich2/trunk/src/mpe2/src/slog2sdk/src/viewer/timelines/Makefile.in
Log:

fixed bug caused by insufficient check in adding new CommProcThdID in CommProcThdIDMap. The bug is caused by intercomm event in clog2 file. Intercomm event contains both IntraCommCreate and LocalIntraComm etype event which were
not distinguisable in CommProcThdIDMap.  Different CommProcThdIDs are indistinguisable in CommProcThdIDMap causes replacement of CommProcThdID's isUsed
value from true to false.



Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/clog2TOdrawable.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/clog2TOslog2.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/clog2print.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/clogTOdrawable.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/clogTOslog2.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/clogprint.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/jumpshot.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/jumpshot_launcher.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/logconvertor.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2filter.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2navigator.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2printrecur.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/slog2printserial.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/traceTOslog2.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/lib/traceprint.jar
===================================================================
(Binary files differ)

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdID.java
===================================================================
--- mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdID.java	2010-05-01 18:34:50 UTC (rev 6604)
+++ mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdID.java	2010-05-02 04:51:20 UTC (rev 6605)
@@ -42,4 +42,17 @@
     {
         return isUsed;
     }
+
+    public String toString()
+    {
+     return ( "CommProcThdID"
+               + "[ icomm=" + icomm
+               + ", rank=" + rank
+               + ", thd=" + thd
+               + ", wrank=" + wrank
+               + ", etype=" + RecComm.toCommTypeString( etype )
+               + ", gthdLineID=" + gthdLineID
+               + ", isUsed=" + isUsed
+               + " ]");
+    }
 }

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdIDMap.java
===================================================================
--- mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdIDMap.java	2010-05-01 18:34:50 UTC (rev 6604)
+++ mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/CommProcThdIDMap.java	2010-05-02 04:51:20 UTC (rev 6605)
@@ -9,6 +9,7 @@
 
 package logformat.clog2TOdrawable;
 
+import java.util.Map;
 import java.util.TreeMap;
 import java.util.List;
 import java.util.ArrayList;
@@ -48,12 +49,37 @@
            Added all possible thread lineIDs, 0...max_thread_count-1,
            for the given RecComm event.  A more scalable way of doing
            this is to log the thread event for the newly created thread.
+
+           Check if the CommProcThdIDMap already contains the gthdLineID Coord
+           key before adding another gthdLineID Coord and CommProcThdID pair.
+           Since the key is identified by gthdLineID (Coord is compared through
+           gthdLineID), so multiple keys with identical gthdLineID can be
+           added to the map resulting in existing Map.Entry being replaced
+           by a new Map.Entry where existing CommProcThdID's isUsed=true
+           value being erroneously erased.  Different CommProcThdIDs could
+           have identical gthdLineID but different etypes, like one with
+           etype=IntraCommCreate is being replaced by one that has
+           etype=LocalIntraComm.  That usually happens to the clog2 file which
+           contains an Intercomm event.  Since an Intercomm contains both
+           LocalIntraComm and RemoteIntraComm, but LocalIntraComm
+           is created by a IntraCommCreate event.  So clog2 file with
+           an Intercomm will contain both LocalIntraComm and IntraCommCreate
+           with identical gthdLineID.  Normally, CommProcThdID with
+           IntraCommCreate etype is added to the map first and its isUsed field
+           being updated with true when Drawables are added.  Later, another
+           CommProcThdID with identical gthdLineID but with LocalIntraComm
+           etype would be added to the map replacing the existing CommProcThdID.
+           If no more drawables of the same gthdLineID is found, the map would
+           contain the last CommProcThdID with isUsed=false.  A bug!
         */
         CommProcThdID  cptID;
+        Coord          key;
         int            thd;
         for ( thd = 0; thd < max_thread_count; thd++ ) {
              cptID = new CommProcThdID( comm, thd );
-             super.put( new Coord( 0.0, cptID.gthdLineID ), cptID );
+             key   = new Coord( 0.0, cptID.gthdLineID );
+             if ( ! super.containsKey( key ) )
+                 super.put( key, cptID );
         }
     }
 
@@ -86,14 +112,24 @@
     // finalize() overrides Object.finalize().
     public void finish()
     {
+        Map.Entry      coord_cptID;
         CommProcThdID  cptID;
         // Remove any "unUsed" CommProcThdID elements from the map;
+        /*
         Iterator cptID_itr  = super.values().iterator();
         while ( cptID_itr.hasNext() ) {
             cptID = (CommProcThdID) cptID_itr.next();
             if ( ! cptID.isUsed() )
                 cptID_itr.remove();
         }
+        */
+        Iterator coord_cptID_itr = super.entrySet().iterator();
+        while ( coord_cptID_itr.hasNext() ) {
+             coord_cptID = (Map.Entry) coord_cptID_itr.next();
+             cptID = (CommProcThdID) coord_cptID.getValue();
+             if ( ! cptID.isUsed() )
+                 coord_cptID_itr.remove();
+        }
     }
 
     public List createYCoordMapList()

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/Print.java
===================================================================
--- mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/Print.java	2010-05-01 18:34:50 UTC (rev 6604)
+++ mpich2/trunk/src/mpe2/src/slog2sdk/src/logformat/clog2TOdrawable/Print.java	2010-05-02 04:51:20 UTC (rev 6605)
@@ -21,10 +21,12 @@
         InputLog               dobj_ins;
         List                   objdefs;   // Primitive def'n
         Map                    shadefs;   // Shadow   def'n
+        List                   ycoordmaps;
         Kind                   next_kind;
         Category               objdef;
         Topology               topo;
         Primitive              drawobj;
+        YCoordMap              ycoordmap;
         long                   Nobjs;
 
         if ( args.length != 1 ) {
@@ -33,10 +35,11 @@
             System.exit( 0 );
         }
 
-        filename = args[ 0 ];
-        objdefs  = new ArrayList();
-        shadefs  = new HashMap();
-        Nobjs    = 0;
+        filename    = args[ 0 ];
+        objdefs     = new ArrayList();
+        shadefs     = new HashMap();
+        ycoordmaps  = new ArrayList();
+        Nobjs       = 0;
 
         /* */    Date time1 = new Date();
         dobj_ins = new InputLog( filename );
@@ -50,7 +53,7 @@
             }
             if ( next_kind == Kind.YCOORDMAP ) {
                 // invoke InputLog().getNextYCoordMap() to get stream moving
-                dobj_ins.getNextYCoordMap();
+                ycoordmaps.add( dobj_ins.getNextYCoordMap() );
             }
             if ( next_kind == Kind.CATEGORY ) {
                 objdef = dobj_ins.getNextCategory();
@@ -63,31 +66,38 @@
         }
         dobj_ins.close();
         /* */    Date time3 = new Date();
-        System.err.println( "\n\t Shadow Category Definitions : " );
+        System.out.println( "\n\t Shadow Category Definitions : " );
         Iterator shadefs_itr = shadefs.entrySet().iterator();
         while ( shadefs_itr.hasNext() )
-            System.err.println( shadefs_itr.next() );
+            System.out.println( shadefs_itr.next() );
 
-        System.err.println( "\n\t Primitive Category Definitions : " );
+        System.out.println( "\n\t Primitive Category Definitions : " );
         Iterator objdefs_itr = objdefs.iterator();
         while ( objdefs_itr.hasNext() ) {
             objdef = (Category) objdefs_itr.next();
-            System.err.println( objdef.toString() );
+            System.out.println( objdef.toString() );
         }
 
-        System.err.println( "\n" );
-        System.err.println( "Number of Primitives = " + Nobjs );
-        System.err.println( "Number of Unmatched Events = "
+        System.out.println( "\n\t YCoordMap Definitions : " );
+        Iterator ymaps_itr = ycoordmaps.iterator();
+        while ( ymaps_itr.hasNext() ) {
+            ycoordmap = (YCoordMap) ymaps_itr.next();
+            System.out.println( ycoordmap.toString() );
+        }
+
+        System.out.println( "\n" );
+        System.out.println( "Number of Primitives = " + Nobjs );
+        System.out.println( "Number of Unmatched Events = "
                           + dobj_ins.getNumberOfUnMatchedEvents() );
 
-        System.err.println( "Total ByteSize of the logfile = "
+        System.out.println( "Total ByteSize of the logfile = "
                           + dobj_ins.getTotalBytesRead() );
-        // System.err.println( "time1 = " + time1 + ", " + time1.getTime() );
-        // System.err.println( "time2 = " + time2 + ", " + time2.getTime() );
-        // System.err.println( "time3 = " + time3 + ", " + time3.getTime() );
-        System.err.println( "timeElapsed between 1 & 2 = "
+        // System.out.println( "time1 = " + time1 + ", " + time1.getTime() );
+        // System.out.println( "time2 = " + time2 + ", " + time2.getTime() );
+        // System.out.println( "time3 = " + time3 + ", " + time3.getTime() );
+        System.out.println( "timeElapsed between 1 & 2 = "
                           + ( time2.getTime() - time1.getTime() ) + " msec" );
-        System.err.println( "timeElapsed between 2 & 3 = "
+        System.out.println( "timeElapsed between 2 & 3 = "
                           + ( time3.getTime() - time2.getTime() ) + " msec" );
     }
 }

Modified: mpich2/trunk/src/mpe2/src/slog2sdk/src/viewer/timelines/Makefile.in
===================================================================
--- mpich2/trunk/src/mpe2/src/slog2sdk/src/viewer/timelines/Makefile.in	2010-05-01 18:34:50 UTC (rev 6604)
+++ mpich2/trunk/src/mpe2/src/slog2sdk/src/viewer/timelines/Makefile.in	2010-05-02 04:51:20 UTC (rev 6605)
@@ -53,7 +53,8 @@
 	$(JAR) $(JARFLAGS)cfm $${jarfile} $(PACKAGE).manifest ; \
 	for dir in base/io/ base/topology/ base/drawable/ base/statistics/ \
 	           logformat/slog2/ logformat/slog2/input/ \
-	           viewer/common/ viewer/legends/ $(PKGDIR)/ ; do \
+	           viewer/common/ viewer/legends/ \
+	           viewer/zoomable/ viewer/histogram/ $(PKGDIR)/ ; do \
 	    classdir_prefix=@JPATH_START@$${dir}@JPATH_FINAL@ ; \
 	    $(JAR) $(JARFLAGS)uf $${jarfile} $${classdir_prefix}*.class ; \
 	done ; \



More information about the mpich2-commits mailing list