Fixed a silly bug and made input parameters a little more clear.
authorTerry L. Wilmarth <wilmarth@uiuc.edu>
Tue, 25 Oct 2005 15:41:36 +0000 (15:41 +0000)
committerTerry L. Wilmarth <wilmarth@uiuc.edu>
Tue, 25 Oct 2005 15:41:36 +0000 (15:41 +0000)
examples/pose/PHOLD/Worker.C
examples/pose/PHOLD/phold.C

index ea7d40444b940fe19d9b288496a36dc20966ef4f..2971baa8c94aa83cb4e32d53008b699407466585 100644 (file)
@@ -14,7 +14,7 @@ worker::worker(WorkerData *m)
     for (int i=0; i<numMsgs; i++) {
       wm = new WorkMsg;
       wm->fromPE = -1;
-      POSE_invoke(work(wm), worker, POSE_rand()%numObjs, POSE_rand()%(tscale/100));
+      POSE_invoke(work(wm), worker, POSE_rand()%numObjs, 1+POSE_rand()%(tscale/100));
     }
   }
 }
@@ -58,7 +58,7 @@ void worker::work(WorkMsg *m)
   if (OVT() < tscale) {
     wm = new WorkMsg;
     wm->fromPE = myHandle;
-    offset = POSE_rand() % (tscale/100);
+    offset = 1 + POSE_rand() % (tscale/100);
     while ((nbr < 0) || (nbr >= numObjs)) {
       away = (POSE_rand() % locality) + 1;
       sign = POSE_rand() % 2;
index b74d0f0c9235420a535a72eabe53e2278277b10d..a5f42a38d88c5482898bf221cb01d12fcd618697 100644 (file)
@@ -16,7 +16,7 @@ main::main(CkArgMsg *m)
   char *text;
 
   if(m->argc<7) {
-    CkPrintf("Usage: phold <#LPs> <#initMsgs> <initMsgDist> <timestampIncFn> <moveFn> [ -g[f|m|c|z] | -t<granularity> ] <spacialLocality> <timescale>\n");
+    CkPrintf("Usage: phold <#LPs> <#initMsgs> <initMsgDist (RANDOM)> <timestampIncFn (RANDOM)> <moveFn (RANDOM)> [ -g[f|m|c|z] | -t<granularity> ] <spacialLocality (%)> <timescale (>=100)>\n");
     CkExit();
   }
   numLPs = atoi(m->argv[1]);