added a command line option +workstealing to enable work stealing. By default it...
authorGengbin Zheng <gzheng@illinois.edu>
Thu, 4 Dec 2008 18:28:05 +0000 (18:28 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Thu, 4 Dec 2008 18:28:05 +0000 (18:28 +0000)
src/conv-ldb/cldb.neighbor.c

index 19e050d8b5b77afa79d85049bcd3ae27c71b8088..bbd3dbb7709dc945c4ced70c256b2505586e4f66 100644 (file)
@@ -21,6 +21,7 @@ typedef struct CldProcInfo_s {
 } *CldProcInfo;
 
 extern char *_lbtopo;                  /* topology name string */
+int _lbsteal = 0;                       /* work stealing flag */
 
 void gengraph(int, int, int, int *, int *);
 
@@ -518,11 +519,14 @@ void CldGraphModuleInit(char **argv)
   }
 
 #if 1
+  CmiGetArgStringDesc(argv, "+workstealing", &_lbsteal, "Enable work stealing at idle time");
+  if (_lbsteal) {
   /* register idle handlers - when idle, keep asking work from neighbors */
   CcdCallOnConditionKeep(CcdPROCESSOR_BEGIN_IDLE,
       (CcdVoidFn) CldStillIdle, NULL);
   CcdCallOnConditionKeep(CcdPROCESSOR_STILL_IDLE,
       (CcdVoidFn) CldStillIdle, NULL);
+  }
 #endif
 }