Index: /trunk/ippTasks/pantasks.pro
===================================================================
--- /trunk/ippTasks/pantasks.pro	(revision 10745)
+++ /trunk/ippTasks/pantasks.pro	(revision 10746)
@@ -7,6 +7,7 @@
 # $scripts = $HOME/src/pantasks/ipp/ippTasks
 $scripts = .
-$LOGDIR = `ipp_datapath.pl path://ESSENCE`
+# $LOGDIR = `ipp_datapath.pl path://ESSENCE`
 # $LOGDIR = `ipp_datapath.pl path://SIMTEST`
+$LOGDIR = `ipp_datapath.pl path://ISPTEST`
 
 $LOGDIR = $LOGDIR/logs
@@ -21,9 +22,13 @@
   if ($parallel) 
     controller exit true
-#    controller host add alala
-    controller host add sn2
-    controller host add sn3
-    controller host add sn4
-    controller host add sn5
+    controller host add po02
+    controller host add po03
+    controller host add po04
+    controller host add po05
+    controller host add po06
+    controller host add po07
+    controller host add po08
+    controller host add po09
+    controller host add po10
 #    controller host add sn6
 # sn7 serves the disk
@@ -34,12 +39,12 @@
 
 macro load.tasks
-#  input $scripts/phase0.pro
+  input $scripts/phase0.pro
 #  input $scripts/phase2.pro
 #  input $scripts/phase3.pro
-  input $scripts/detrend.process.pro
-  input $scripts/detrend.stack.pro
-  input $scripts/detrend.norm.pro
-  input $scripts/detrend.resid.pro
-  input $scripts/detrend.reject.pro
+#  input $scripts/detrend.process.pro
+#  input $scripts/detrend.stack.pro
+#  input $scripts/detrend.norm.pro
+#  input $scripts/detrend.resid.pro
+#  input $scripts/detrend.reject.pro
 end
 
Index: /trunk/ippTasks/phase0.pro
===================================================================
--- /trunk/ippTasks/phase0.pro	(revision 10745)
+++ /trunk/ippTasks/phase0.pro	(revision 10746)
@@ -79,10 +79,10 @@
   # locked list
   task.exit    default
-    showcommand
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand
+    showcommand failure
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
   end
 end
@@ -149,5 +149,5 @@
   # default exit status
   task.exit    default
-    showcommand
+    showcommand failure
     queuepush Phase0Imfiles -replace -key 1 "FAIL $options:0"
     $Phase0ImfileFail ++
@@ -156,5 +156,5 @@
   # operation times out?
   task.exit    timeout
-    showcommand
+    showcommand timeout
     queuepush Phase0Imfiles -replace -key 1 "TIMEOUT $options:0"
     $Phase0ImfileFail ++
Index: /trunk/ippTasks/phase2.pro
===================================================================
--- /trunk/ippTasks/phase2.pro	(revision 10745)
+++ /trunk/ippTasks/phase2.pro	(revision 10746)
@@ -14,9 +14,26 @@
 end
 
+$Phase2ImfileFail = 0
+
+if ($?VERBOSE == 0)
+  echo "VERBOSE not defined: load pantasks.pro first"
+  break
+end
+if ($?LOGDIR == 0)
+  echo "LOGDIR not defined: load pantasks.pro first"
+  break
+end
+$LOGSUBDIR = $LOGDIR/phase2
+exec mkdir -p $LOGSUBDIR
+
+macro phase2.status
+  queueprint Phase2Imfiles
+  echo "Phase2ImfileFail: $Phase2ImfileFail"
+end
+
 # select images ready for phase2 analysis
 # new entries are added to queue Phase2Imfiles
 # compare the new list with the ones already selected
 task	       phase2.imfile.load
-  command      p2tool -pendingimfile -simple
   host         local
 
@@ -25,6 +42,10 @@
   periods      -timeout 30
 
-  stdout phase2.imfile.log
-  stderr phase2.imfile.log
+  stdout $LOGSUBDIR/phase2.imfile.log
+  stderr $LOGSUBDIR/phase2.imfile.log
+
+  task.exec
+    command p2tool -pendingimfile -simple -limit {$Phase2ImfileFail + 20}
+  end
 
   # success
@@ -39,4 +60,7 @@
     for i 0 $Nqueue
       queuepop stdout -var line
+      if ($VERBOSE > 2)
+        echo $line
+      end
       list word -split $line
       $EXP_TAG  = $word:0
@@ -52,10 +76,10 @@
   # locked list
   task.exit    default
-    echo "phase2 pending imfiles: failure"
+    showcommand failure
   end
 
   # operation times out?
   task.exit    timeout
-    echo "phase2 pending imfiles: timeout"
+    showcommand timeout
   end
 end
@@ -96,11 +120,17 @@
 
     ## add 'p2' to the log files?
-    $LOG_DIR = `dirname $URI`
-    stdout $WORKDIR/$LOG_DIR/$EXP_TAG.$CLASS_ID.log
-    stderr $WORKDIR/$LOG_DIR/$EXP_TAG.$CLASS_ID.log
+    # XXX this is still a lame rule
+    $word = `basename $EXP_TAG | tr '.' ' '`
+    list word -split $word
+    $base = $word:0
+    stdout $LOGSUBDIR/$base/$EXP_TAG.$CLASS_ID.log
+    stderr $LOGSUBDIR/$base/$EXP_TAG.$CLASS_ID.log
+    exec mkdir -p $LOGSUBDIR/$base
 
     # create the command line
     options "$line"
-    echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
+    if ($VERBOSE > 1)
+      echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
+    end
     command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
   end
@@ -114,12 +144,14 @@
   # default exit status
   task.exit    default
-    echo "failure for phase2imfile.pl: $options:0"
+    showcommand failure
     queuepush Phase2Imfiles -replace -key 1:2 "FAIL $options:0"
+    $Phase2ImfileFail ++
   end
 
   # operation times out?
   task.exit    timeout
-    echo "timeout for phase2imfile.pl: $options:0"
+    showcommand timeout
     queuepush Phase2Imfiles -replace -key 1:2 "TIMEOUT $options:0"
+    $Phase2ImfileFail ++
   end
 end
