Critical path generation for sdag is now optional. It would fail previously if charm...
authorIsaac Dooley <idooley2@illinois.edu>
Fri, 29 May 2009 17:59:09 +0000 (17:59 +0000)
committerIsaac Dooley <idooley2@illinois.edu>
Fri, 29 May 2009 17:59:09 +0000 (17:59 +0000)
src/xlat-i/sdag/CParsedFile.h
src/xlat-i/sdag/CSdagConstruct.C

index 90c7f8ffb5b5230e90976994c9eb173fbd5692ae..37eeff964babf3471344942698fbe5f0970d188f 100644 (file)
@@ -54,7 +54,9 @@ class CParsedFile {
       generateRegisterEp(output);              // for tracing Gengbin
       generateTraceEpDecl(output);             // for tracing Gengbin
 
+#ifdef USE_CRITICAL_PATH_HEADER_ARRAY
       generateDependencyMergePoints(output); // for Isaac's Critical Path Detection
+#endif
 
       output.line_append_padding('\\');
       output << "\n";
index f46bf92cae61be793c0b3758815bc6e259e5db47..932065bdd7a8ad722df114beac8ab7e142bd1fa0 100644 (file)
@@ -768,9 +768,11 @@ void SdagConstruct::generateWhen(XStr& op)
   }
 
   // max(current,merge) --> current, then reset the mergepath
+#ifdef USE_CRITICAL_PATH_HEADER_ARRAY
   op << "       " << label->charstar()  << "_PathMergePoint.updateMax(currentlyExecutingPath); /* Critical Path Detection */ \n";
   op << "       currentlyExecutingPath = " << label->charstar()  << "_PathMergePoint; /* Critical Path Detection */ \n";
   op << "       " << label->charstar()  << "_PathMergePoint.reset(); /* Critical Path Detection */ \n";
+#endif
 
   if (constructs != 0) {
     if (!constructs->empty() ) {
@@ -924,9 +926,11 @@ void SdagConstruct::generateWhen(XStr& op)
     el = el->next;
   }
 
+#ifdef USE_CRITICAL_PATH_HEADER_ARRAY
   // max(current,merge) --> current
   op << "       " << label->charstar()  << "_PathMergePoint.updateMax(currentlyExecutingPath); /* Critical Path Detection */ \n";
   op << "       currentlyExecutingPath = " << label->charstar()  << "_PathMergePoint; /* Critical Path Detection */ \n";
+#endif
 
   op << "       __cDep->Register(tr);\n";
   op << "       return 0;\n";
@@ -1238,12 +1242,16 @@ void SdagConstruct::generateOlist(XStr& op)
   //Accumulate all the bgParent pointers that the calling when_end functions give
   op << "    " << counter->charstar() << "->decrement();\n";
  
+#ifdef USE_CRITICAL_PATH_HEADER_ARRAY
  op << "    olist_" << counter->charstar() << "_PathMergePoint.updateMax(currentlyExecutingPath);  /* Critical Path Detection FIXME: is the currently executing path the right thing for this? The duration ought to have been added somewhere. */ \n";
+#endif
 
   op << "    if (" << counter->charstar() << "->isDone()) {\n";
-  op << "      currentlyExecutingPath = olist_" << counter->charstar() << "_PathMergePoint; /* Critical Path Detection */ \n";
 
+#ifdef USE_CRITICAL_PATH_HEADER_ARRAY
+  op << "      currentlyExecutingPath = olist_" << counter->charstar() << "_PathMergePoint; /* Critical Path Detection */ \n";
   op << "      olist_" << counter->charstar() << "_PathMergePoint.reset(); /* Critical Path Detection */ \n";
+#endif
 
   op << "      delete " << counter->charstar() << ";\n";