fixed so that it can report error when convert to int.
authorGengbin Zheng <gzheng@illinois.edu>
Sat, 30 Oct 2004 16:36:54 +0000 (16:36 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Sat, 30 Oct 2004 16:36:54 +0000 (16:36 +0000)
examples/pose/HiSim/Main/TCsim.C

index f1ca37de59447603b513b8badb732db57f6fe04d..56d485c4951603a36c508b0b25528689ce58b26e 100644 (file)
@@ -9,7 +9,7 @@ extern roarray<char, 1024>  appname;
 
 POSE_TimeType Task::convertToInt(double inp) 
 {
-  long long out = (long long)(inp*factor);
+  POSE_TimeType out = (long long)(inp*factor);
   if (out <0 && inp != -1.0) {
     CmiPrintf("Invalid value in convertToInt() - %ld %f\n", out, inp);
     CmiPrintf("Considering changing factor %e to a smaller value. \n", factor);
@@ -261,6 +261,7 @@ BGproc::BGproc(BGprocMsg *m)
                       procNum/numWth,  procNum/numWth,
                       procNum%numWth
                       );
+       CmiAssert(taskList[i].receiveTime >= 0);
         POSE_invoke(executeTask(tm), BGproc, myHandle, taskList[i].receiveTime);
       }
     }