Index: trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7019)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7024)
@@ -111,4 +111,10 @@
    lines=`cat $todofile.txt | wc -l`
    echo "number of lines: "$lines >> $scriptlog 2>&1
+   while (( "$lines" < "$pno" ))
+   do
+      echo "# of lines ($lines) < # of processes ($pno) "
+      pno=`expr $pno / 2` 
+   done
+   echo "pno: "$pno
    nofiles=`expr $lines / \( $pno - 1 \)`
    echo "number of files: "$nofiles >> $scriptlog 2>&1
