Index: /trunk/cleanup.php
===================================================================
--- /trunk/cleanup.php	(revision 16)
+++ /trunk/cleanup.php	(revision 17)
@@ -344,4 +344,6 @@
    $noiseIDs   = array();
    $modelGUIDs = array();
+   $mrecsIDs   = array();
+   $fns_used   = array();
 
    foreach ( $files as $file )
@@ -362,4 +364,9 @@
       if ( preg_match( "/mdl.tmp$/", $fn ) )
          continue;
+
+      if ( in_array( $fn, $fns_used ) )
+         continue;
+
+      $fns_used[] = $fn;
 
       if ( filesize( $fn ) < 100 )
Index: /trunk/cluster_status.php
===================================================================
--- /trunk/cluster_status.php	(revision 16)
+++ /trunk/cluster_status.php	(revision 17)
@@ -165,6 +165,8 @@
    global $data;
 
-   //$clusters = array( "alamo", "lonestar", "stampede", "comet", "gordon" );
-   $clusters = array( "alamo", "lonestar", "stampede", "comet", "gordon", "jureca" );
+//   $clusters = array( "alamo", "lonestar", "lonestar5", "stampede",
+//                      "comet", "gordon" );
+   $clusters = array( "alamo", "lonestar", "lonestar5", "stampede",
+                      "comet", "gordon", "jureca", "jacinto" );
    foreach ( $clusters as $clname )
    {
@@ -186,4 +188,18 @@
             break;
          }
+         case 'jacinto':
+         {
+            $host   = "us3@jacinto.uthscsa.edu";
+            $qstat  = `ssh $host '/opt/torque/bin/qstat -B 2>&1|tail -1'`;
+            $sparts = preg_split( '/\s+/', $qstat );
+            $que    = $sparts[ 3 ];
+            $run    = $sparts[ 4 ];
+            $sta    = $sparts[ 9 ];
+            if ( $sta == "Active" )
+               $sta    = "up";
+            else
+               $sta    = "down";
+            break;
+         }
          case 'stampede':
          {
@@ -219,4 +235,24 @@
             break;
          }
+         case 'lonestar5':
+         {
+            $host   = "us3@ls5.tacc.utexas.edu";
+            $qstat  = `ssh $host '/usr/local/bin/showq 2>&1|tail -1'`;
+            $sparts = preg_split( '/\s+/', $qstat );
+            $tot    = $sparts[ 2 ];
+            $run    = '0';
+            $que    = '0';
+            $sta    = "up";
+            if ( $tot == ''  ||  $tot == '0' )
+            {
+               $sta    = "down";
+            }
+            else
+            {
+               $run    = $sparts[ 5 ];
+               $que    = $sparts[ 8 ];
+            }
+            break;
+         }
          case 'comet':
          {
@@ -250,14 +286,15 @@
          {
             $host   = "swus1@jureca.fz-juelich.de";
-            $qstat  = `ssh $host '/usr/bin/sinfo -s -p batch -o "%a %F" 2>&1|tail -1'`;
+            $qstat  = `ssh $host '~swus1/scripts/qstat-jureca 2>&1'`;
             $sparts = preg_split( '/\s+/', $qstat );
             $sta    = $sparts[ 0 ];
-            $knts   = $sparts[ 1 ];
-            $sparts = preg_split( '/\//', $knts );
-            $run    = $sparts[ 0 ];
-            $que    = $sparts[ 1 ];
+            $run    = $sparts[ 1 ];
+            $que    = $sparts[ 2 ];
             break;
          }
       }
+
+      if ( $sta == "" )
+         $sta    = "down";
 
       if ( $sta == "down" )
@@ -274,5 +311,5 @@
       $data[] = $a;
 
-      if ( $clname == 'alamo' )
+      if ( $clname == 'alamo'  ||  $clname == 'jacinto' )
       {
          $a[ 'cluster' ] = $clname . "-local";
Index: /trunk/gridctl.php
===================================================================
--- /trunk/gridctl.php	(revision 16)
+++ /trunk/gridctl.php	(revision 17)
@@ -83,4 +83,5 @@
    $status_in = $status;
    $status_gw = $status;
+   $status_ex = $status;
 
    // If entry is for Airvata/Thrift, get the true current status
@@ -169,8 +170,11 @@
       case "FINISHED":
       case "DONE":
-//         if ( is_aira_job( $gfacID ) )
-//         {
-//            complete();
-//         }
+         if ( is_aira_job( $gfacID ) )
+         {
+            $status_ex    = getExperimentStatus( $gfacID );
+write_log( "$loghdr     status=$status status_ex=$status_ex" );
+            if ( $status_ex === 'COMPLETED' )
+               complete();
+         }
       case "PROCESSING":
       default:
@@ -679,4 +683,13 @@
    {
       $status_ex    = getExperimentStatus( $gfacID );
+
+      if ( $status_ex == 'EXECUTING' )
+      {
+         if ( $gfac_status == 'SUBMITTED' )
+            $status_ex    = 'QUEUED';
+         if ( $gfac_status == 'RUNNING' )
+            $status_ex    = 'ACTIVE';
+      }
+
       $gfac_status  = standard_status( $status_ex );
 write_log( "$loghdr get_gfac_status: status_ex=$status_ex gfac_status=$gfac_status" );
